1111
This commit is contained in:
@@ -49,6 +49,7 @@ class Anton {
|
||||
function base_input_hook(CUser, CmdString) {
|
||||
if (!CUser) return true;
|
||||
local SUser = User(CUser);
|
||||
|
||||
//安图恩频道
|
||||
if (Sq_Game_GetConfig().find("18") != null) {
|
||||
local Localtion = SUser.GetLocation();
|
||||
@@ -69,6 +70,28 @@ class Anton {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function base_input_hook2(args) {
|
||||
local type = args[2];
|
||||
local SUser = User(args[1]);
|
||||
local msg = args[3];
|
||||
if ((type == 8 || type == 3) && Sq_Game_GetConfig().find("18") != null) {
|
||||
local Localtion = SUser.GetLocation();
|
||||
if (Localtion.Area <= 1) {
|
||||
return true;
|
||||
} else {
|
||||
local Jso = {
|
||||
op = 20064027,
|
||||
uid = SUser.GetUID(),
|
||||
cid = SUser.GetCID(),
|
||||
msg = msg
|
||||
}
|
||||
Socket.SendGateway(Jso);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//玩家消息分发
|
||||
function PlayerNotiMsgDistribute(Jso) {
|
||||
local SUser = World.GetUserByUidCid(Jso.uid, Jso.cid);
|
||||
@@ -82,7 +105,7 @@ class Anton {
|
||||
local SUserName = SUser.GetCharacName();
|
||||
local Type = Jso.type;
|
||||
|
||||
Jso.msg = Jso.msg.slice(0, Jso.msg.len() - 11);
|
||||
Jso.msg = Jso.msg;
|
||||
if (Type == -1) {
|
||||
Jso.Name <- SUserName;
|
||||
foreach(_Index, Value in RealList) {
|
||||
@@ -211,8 +234,10 @@ class Anton {
|
||||
//注册HOOK
|
||||
Cb_Insert_User_Func.Anton <- insert_user_hook.bindenv(this); //区域添加角色
|
||||
Cb_Move_Area_Func.Anton <- move_area_hook.bindenv(this); //区域移动
|
||||
Base_InputHookFunc_Handle.Anton <- base_input_hook.bindenv(this); //玩家发送消息
|
||||
//Base_InputHookFunc_Handle.Anton <- base_input_hook.bindenv(this); //玩家发送消息
|
||||
Cb_reach_game_world_Func.Anton <- Login_Hook.bindenv(this); //上线HOOK
|
||||
Cb_Server_Chat_Log_Leave_Func.Anton <- base_input_hook2.bindenv(this); //玩家发送消息
|
||||
|
||||
|
||||
//注册收包
|
||||
GatewaySocketPackFuncMap.rawset(20064010, AntonSendAreaUserCallBack.bindenv(this)); //玩家移动后的区域广播包
|
||||
|
||||
Reference in New Issue
Block a user