diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua index 8f8d57cc..30a47765 100644 --- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua +++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua @@ -348,8 +348,8 @@ function M:FG_Get_Online_Member(groupId, callback) local _data = {} _data.id = groupId _data.uid = DataManager.SelfUser.account_id - local _client = ControllerManager.GroupClient - _client:send(Protocol.WEB_FG_GET_ONLINE_MEMBER, _data, function(res) + --local _client = ControllerManager.GroupClient + self._mgr_client:send(Protocol.WEB_FG_GET_ONLINE_MEMBER, _data, function(res) callback(res) end) end @@ -359,8 +359,8 @@ function M:FG_Get_Offline_Member(groupId, callback) local _data = {} _data.id = groupId _data.uid = DataManager.SelfUser.account_id - local _client = ControllerManager.GroupClient - _client:send(Protocol.WEB_FG_GET_OFFLINE_MEMBER, _data, function(res) + --local _client = ControllerManager.GroupClient + self._mgr_client:send(Protocol.WEB_FG_GET_OFFLINE_MEMBER, _data, function(res) callback(res) end) end diff --git a/lua_probject/base_project/Game/Protocol.lua b/lua_probject/base_project/Game/Protocol.lua index 543aafa5..f84a6725 100644 --- a/lua_probject/base_project/Game/Protocol.lua +++ b/lua_probject/base_project/Game/Protocol.lua @@ -401,7 +401,8 @@ Protocol = { FGMGR_EVT_NEWCHAT = "12011", -- 设置是否允许观战 WEB_FG_SET_CANWATCH = "group/set_group_guest", - + -- 家族成员在线状态推送 + FGMGR_EVT_Member_State = "13007", --end::::::::::::::牌友圈协议:::::::::::::::::::: -------------------Game ---------------------------- diff --git a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua index 0e122973..21b72fe0 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua @@ -25,6 +25,7 @@ function FamilyEventView.new(root) mgr_ctr:AddEventListener(GroupMgrEvent.ChatRoomData, handler(self, self._evtChatRoomData)) mgr_ctr:AddEventListener(GroupMgrEvent.OnNewApply, handler(self, self._evtOnNewApply)) mgr_ctr:AddEventListener(GroupMgrEvent.OnNewRecord, handler(self, self._evtOnNewRecord)) + mgr_ctr:AddEventListener(GroupMgrEvent.OnMemberState, handler(self, self._evtOnMemberState)) return self end @@ -156,4 +157,10 @@ function M:_evtOnNewRecord(...) view.com_FamilyChatRoom:OnNewChatRefalsh(arg[1]) end +function M:_evtOnMemberState(...) + print("_evtOnMemberState") + local arg = {...} + pt(arg) +end + return M diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index 51af1cb7..650dcfa4 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -23,16 +23,16 @@ FamilyView = {} local M = FamilyView -local function FamilyOnline(groupId) - local fgCtr = ControllerManager.GetController(GroupMgrController) - fgCtr:FG_Get_Online_Member(groupId, function(res) +local function FamilyOnline(groupId, self) + --localfgCtr = ControllerManager.GetController(GroupMgrController) + self._mgr_ctr:FG_Get_Online_Member(groupId, function(res) end) end -local function FamilyOffline(groupId) - local fgCtr = ControllerManager.GetController(GroupMgrController) - fgCtr:FG_Get_Offline_Member(groupId, function(res) +local function FamilyOffline(groupId, self) + --local fgCtr = ControllerManager.GetController(GroupMgrController) + self._mgr_ctr:FG_Get_Offline_Member(groupId, function(res) end) end @@ -134,9 +134,8 @@ function M:InitCloseClick() self.btn_close.onClick:Set(function() print("lingmengfamily", self.lastType, self.familyType.selectedIndex) if not self.lastType or self.familyType.selectedIndex == 1 then - if self._group then - FamilyOffline(self._group.id) + FamilyOffline(self._group.id, self) end ControllerManager.ChangeController(LoddyController) @@ -341,10 +340,6 @@ function M:ChangeNumber(fgCtr, group_id, limit, num, minus_only, sort_type) end function M:ConnetFamilyRoom(fgCtr, id) - if self._group then - FamilyOffline(self._group.id) - end - fgCtr:FG_EnterGroup(id, function(res) ViewUtil:CloseModalWait() if res.ReturnCode ~= 0 then @@ -359,7 +354,7 @@ function M:ConnetFamilyRoom(fgCtr, id) pt(res) end) - FamilyOnline(self._group.id) + FamilyOnline(self._group.id, self) return 1 end @@ -561,6 +556,11 @@ function M:UpdateFamilyRoom(fgCtr, id) end function M:ConnetFamily(index, groups, isCreate) + + if self._group then + FamilyOffline(self._group.id, self) + end + UpdateBeat:Remove(self.OnUpdate, self) ViewUtil:CloseModalWait() diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0.png index 623c5df0..aa055221 100644 Binary files a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0.png and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_1.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_1.png index 60c21ddc..ec819adc 100644 Binary files a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_1.png and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_2.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_2.png index 5e0a196c..832d38e8 100644 Binary files a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_2.png and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_2.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_3.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_3.png index 9ed2d1fc..e5c00301 100644 Binary files a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_3.png and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_3.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_4.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_4.png index b3f5cef4..33a6dc14 100644 Binary files a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_4.png and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_4.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_5.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_5.png index dfe33b42..a88dfac7 100644 Binary files a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_5.png and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_5.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_6.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_6.png index a3fd11e8..5cb64cb9 100644 Binary files a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_6.png and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_6.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_9.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_9.png index b672483d..0257d3a5 100644 Binary files a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_9.png and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_9.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_fui.bytes b/wb_unity_pro/Assets/ART/base/common/ui/Common_fui.bytes index 27a919a8..e6628631 100644 Binary files a/wb_unity_pro/Assets/ART/base/common/ui/Common_fui.bytes and b/wb_unity_pro/Assets/ART/base/common/ui/Common_fui.bytes differ