dp-s_doc/CallBack/CheckMoveTown/CheckMoveTown.md

1.1 KiB
Raw Permalink Blame History

CheckMoveTown 回调函数文档

回调说明 CheckMoveTown类用于在服务端中持续执行的HOOK。


注册方法

  • Cb_WongWork_CDungeonClear_getClearedDungeonDiffMap.rawset(Key,Function)

参数

  • 角色对象
  • 下一个城镇的ID

特殊说明

  • 如果返回值不为 -99 则不允许进入下一个城镇
  • 所有此类回调函数中只要有一个不满足-99条件即为失败

例子

function Test_Function(SUser,NextVillageId) 
{
    return -99;
}
Cb_WongWork_CDungeonClear_getClearedDungeonDiffMap.rawset("Test", Test_Function);

or

function Test_Function(SUser,NextVillageId) 
{
    return -99;
}
Cb_WongWork_CDungeonClear_getClearedDungeonDiffMap.Test <- Test_Function;

or

function Test_Function(SUser,NextVillageId) 
{
    return -99;
}
Cb_WongWork_CDungeonClear_getClearedDungeonDiffMap["Test"] <- Test_Function;

or

Cb_WongWork_CDungeonClear_getClearedDungeonDiffMap.Test <- function (SUser,NextVillageId) 
{
    return -99;
};