【跨服聊天】重新分配跨服分组时,清空跨服聊天
parent
a8e7641ca7
commit
64077a2e28
|
|
@ -491,5 +491,6 @@ GameEvent = {
|
|||
UpdateHeightLadderPanel="JumpServerHeightLadder.UpdateHeightLadderPanel",-- 刷新跨服天梯主界面
|
||||
-- UpdateHeightLadderNum="JumpServerHeightLadder.UpdateHeightLadderNum",-- 刷新跨服天梯主界面挑战次数
|
||||
UpdateWordLv="JumpServerHeightLadder.UpdateWordLv",-- 刷新世界等级
|
||||
CrossStateChange = "JumpServerHeightLadder.CrossStateChange", -- 跨服状态改变
|
||||
},
|
||||
}
|
||||
|
|
@ -48,6 +48,15 @@ function this.Initialize()
|
|||
|
||||
--跑马灯的速度(1秒移动的像素)
|
||||
this.horseRunSpeed=tonumber(specialConfig[31].Value)
|
||||
|
||||
-- 跨服状态改变,清空跨服聊天
|
||||
Game.GlobalEvent:AddEvent(GameEvent.JumpServerHeightLadder.CrossStateChange, function()
|
||||
this.SetMsgIdFlag(CHAT_CHANNEL.JUMP_SERVER, 0)
|
||||
this.ChatList[CHAT_CHANNEL.JUMP_SERVER] = {}
|
||||
NetManager.RequestChatMsg(CHAT_CHANNEL.JUMP_SERVER, 0, function(data)
|
||||
this.ChatDataAdapter(CHAT_CHANNEL.JUMP_SERVER, data)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
-- 每两秒刷新一次数据
|
||||
|
|
|
|||
|
|
@ -1001,5 +1001,6 @@ function this.IsCrossIndication(buffer)
|
|||
local msg = PlayerInfoProto_pb.IsCrossIndication()
|
||||
msg:ParseFromString(data)
|
||||
PlayerManager.isCross = msg.isCross
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.JumpServerHeightLadder.CrossStateChange)
|
||||
end
|
||||
return this
|
||||
Loading…
Reference in New Issue