1006调整
parent
2b4403f0b6
commit
682b3aa1aa
|
|
@ -183,7 +183,9 @@ function M:SendInteraction(playid, type, parm, callback)
|
|||
_data['parm'] = parm
|
||||
_data['gid'] = 1
|
||||
_client:send(Protocol.GAME_INTERACTION, _data, function(res)
|
||||
callback(res)
|
||||
if callback then
|
||||
callback(res)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ function GroupMgrController.new()
|
|||
self._eventmap[Protocol.WEB_FG_REFLASH] = self.FG_Data_Family_Reflash
|
||||
self._eventmap[Protocol.WEB_FG_MEMBER_OUT] = self.OnMemberOut
|
||||
self._eventmap[Protocol.WEB_FG_MEMBER_ONLINE] = self.OnMemberOnline
|
||||
self._eventmap[Protocol.WEB_FG_MEMBER_GAME_STATE] = self.OnMemberGameState
|
||||
self._eventmap[Protocol.FGMGR_EVT_Ref_NumberBan] = self.OnRefNumberBan
|
||||
-- self:connect(callback)
|
||||
return self
|
||||
|
|
@ -590,7 +591,7 @@ function M:OnMemberOut(evt_data)
|
|||
end
|
||||
|
||||
function M:OnMemberOnline(evt_data)
|
||||
|
||||
--[[
|
||||
print("收到在线成员推送")
|
||||
pt(evt_data)
|
||||
|
||||
|
|
@ -608,6 +609,26 @@ function M:OnMemberOnline(evt_data)
|
|||
end
|
||||
end
|
||||
|
||||
DispatchEvent(self._dispatcher, GroupMgrEvent.OnMemberState, evt_data)
|
||||
Broadcast.Send(BroadcastEvent.OnMemberChange)
|
||||
]]
|
||||
end
|
||||
|
||||
function M:OnMemberGameState(evt_data)
|
||||
print("收到成员游戏状态推送")
|
||||
pt(evt_data)
|
||||
|
||||
local uid = tonumber(evt_data.uid)
|
||||
local state = evt_data.playing
|
||||
|
||||
local group = DataManager.groups:get(self.groupId)
|
||||
|
||||
for _, player in pairs(group.members) do
|
||||
if player.uid == uid then
|
||||
player.playing = state
|
||||
end
|
||||
end
|
||||
|
||||
DispatchEvent(self._dispatcher, GroupMgrEvent.OnMemberState, evt_data)
|
||||
Broadcast.Send(BroadcastEvent.OnMemberChange)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -290,6 +290,9 @@ Protocol = {
|
|||
-- 在线成员推送
|
||||
WEB_FG_MEMBER_ONLINE = "13009",
|
||||
|
||||
-- 游戏状态成员
|
||||
WEB_FG_MEMBER_GAME_STATE = "push_game_state",
|
||||
|
||||
-- 获得申请列表的数量
|
||||
WEB_FG_APPLYCOUNT = "group/request_apply_count",
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@ local function Send(self, Missile)
|
|||
_data.targetSeat = self.player.seat
|
||||
_data.Missile = Missile
|
||||
local _gamectr = ControllerManager.GetController(GameController)
|
||||
_gamectr:SendInteraction(DataManager.SelfUser.account_id, _type, _data)
|
||||
_gamectr:SendInteraction(DataManager.SelfUser.account_id, _type, _data, function(res)
|
||||
print("收到1006协议返回")
|
||||
pt(res)
|
||||
if res.ReturnCode ~= 0 then
|
||||
ViewUtil.ErrorTip(res.ReturnCode)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function playerDetailView.New()
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ Table_Error_code_Map = {
|
|||
[1041]={id=1041,note="不能退出大联盟"},
|
||||
[1047]={id=1047,note="携带值超越上线, 请保存到保险箱里"},
|
||||
[1048]={id=1048,note="玩家携带值值超越上线, 请提醒保险箱里"},
|
||||
[1049]={id=1049,note="本房间禁止扔表情"},
|
||||
[10000]={id=10000,note="微信登录失败,请重新登录"},
|
||||
[10001]={id=10001,note="Error: capacity is full."},
|
||||
[10002]={id=10002,note="Error: The Queue is empty."}
|
||||
|
|
|
|||
Loading…
Reference in New Issue