From 3e97cddb8ae9f06aa57d8ba42d88a84712b2a5e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=AE=B6=E7=82=9C?= <2029049582@qq.com> Date: Sun, 6 Jul 2025 05:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E7=89=8C=E9=80=9F=E5=BA=A6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E6=88=98=E5=86=B5=E6=98=BE=E7=A4=BA=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E6=88=98=E7=BB=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Game/Controller/GameController.lua | 30 +++-- .../View/NewGroup/GroupManagerStagView.lua | 4 +- .../Game/View/NewGroup/GroupManagerView.lua | 23 ++-- .../MngView/GroupMngPartnerStatView.lua | 126 +++++++++--------- .../MngView/GroupMngPartnerStatViewAlone.lua | 7 +- .../zipai/fanpaofa/EXGameController.lua | 6 +- .../extend/zipai/fanpaofa/EXMainView.lua | 12 +- wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info | 11 +- .../NewGroup/mgr/View_GroupPartnerStat.xml | 15 +-- 9 files changed, 120 insertions(+), 114 deletions(-) diff --git a/lua_probject/base_project/Game/Controller/GameController.lua b/lua_probject/base_project/Game/Controller/GameController.lua index 1d6c0ff4..739e700c 100644 --- a/lua_probject/base_project/Game/Controller/GameController.lua +++ b/lua_probject/base_project/Game/Controller/GameController.lua @@ -405,20 +405,22 @@ function M:OnEventInteraction(evt_data) end -- GPS更新事件 --- function M:OnEventUpdateGPS(evt_data) --- self._cacheEvent:Enqueue( --- function() --- local seat = evt_data['seat'] --- local pos = evt_data['pos'] --- if seat == 0 or seat == 'skip' then --- return --- end --- local p = self._room:GetPlayerBySeat(seat) --- p.self_user.location = Location.new(pos) --- end --- ) --- end - +function M:OnEventUpdateGPS(evt_data) + self._cacheEvent:Enqueue( + function() + if self._callback_popEvent then + self._callback_popEvent(true) + end + local seat = evt_data['seat'] + local pos = evt_data['pos'] + if seat == 0 or seat == 'skip' then + return + end + local p = self._room:GetPlayerBySeat(seat) + p.self_user.location = Location.new(pos) + end + ) +end -- 被踢出房间事件 function M:OnEventKicked() diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupManagerStagView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupManagerStagView.lua index cc62862c..31ac520f 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupManagerStagView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupManagerStagView.lua @@ -131,7 +131,9 @@ function M:RecursionGetNumber1(index, id, tempTable) ViewUtil.CloseModalWait() else for i = 1, #numbers do - table.insert(tempTable, numbers[i]) + if numbers[i].partnerLev ~= 0 then + table.insert(tempTable, numbers[i]) + end end self:RecursionGetNumber1(index + 1, id, tempTable) end diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua index 6b106f6e..28774960 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua @@ -39,7 +39,12 @@ end function M:init(btn_type) local url - if btn_type == 2 then + local group = DataManager.groups:get(self.group_id) + local lev = group.lev + if lev == 3 and group.partnerLev == 0 then + lev = 4 + end + if btn_type == 2 and lev ~= 4 then url = "ui://NewGroup/Win_ManagerView" else url = "ui://NewGroup/Win_ManagerView_old" @@ -55,19 +60,15 @@ function M:init(btn_type) -- end local lst_index = self._view:GetChild("lst_index") lst_index:RemoveChildrenToPool() - local group = DataManager.groups:get(self.group_id) --根据玩家权限,加载不同的界面配置 - local lev = group.lev - if lev == 3 and group.partnerLev == 0 then - lev = 4 - end + self.ctr_index = self._view:GetController("index") self._ctr_tongji = self._view:GetController('tongji') self.page_config = MngPageConfig.Config[btn_type][lev] local gmsv - if btn_type == 2 then + if btn_type == 2 and lev ~= 4 then --绑定统计代码 self._child_statView = GroupManagerStagView.new(self) -- 初始界面 --战况是用新界面 @@ -241,7 +242,13 @@ end -- quick_access_id 是快速访问标志,打开对应id的页面 function M:Show(quick_access_id) local index = self.ctr_index.selectedIndex - if self._data_btn_type == 2 then + local group = DataManager.groups:get(self.group_id) + local lev = group.lev + if lev == 3 and group.partnerLev == 0 then + lev = 4 + end + + if self._data_btn_type == 2 and lev ~= 4 then self._child_statView:InitInfo() end diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua index df5c4d56..737f4103 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua @@ -61,9 +61,18 @@ function M:InitView() self.lst_record.itemRenderer = function(index, obj) self:OnRenderRecordItem(index, obj) end - self.lst_record.scrollPane.onPullUpRelease:Set(function() - self:GetRecordData(self.lst_record.numItems) - end) + -- self.lst_record.scrollPane.onPullUpRelease:Set(function() + -- self:GetRecordData(self.lst_record.numItems) + -- end) + + self.lst_record_find = self._view:GetChild("lst_member_find") + self.lst_record_find:SetVirtual() + self.lst_record_find.itemRenderer = function(index, obj) + self:OnRenderRecordItem(index, obj) + end + -- self.lst_record.scrollPane.onPullUpRelease:Set(function() + -- self:GetRecordData(self.lst_record.numItems) + -- end) self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0, function() @@ -103,7 +112,7 @@ function M:InitView() local ctr_search = self._view:GetController('search') self._view:GetChild('btn_search').onClick:Set( function() - --printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111") + -- printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111") ViewUtil.ShowModalWait(nil) local text = self._view:GetChild('tex_id').text local qid, qnick @@ -112,46 +121,40 @@ function M:InitView() ViewUtil.ErrorTip(nil, '输入不能为空') return end + self._view:GetChild('tex_id').text = "" qid = tonumber(text) or 0 - qnick = text - local time_type = self._view:GetController("type").selectedIndex - if self.begin_time ~= nil and self.end_time ~= nil then - time_type = 0 - end local fgCtr = ControllerManager.GetController(NewGroupController) - fgCtr:FG_FindPartnerStat( - self.group_id, - qid, 0, 6, time_type, self.begin_time, self.end_time, + fgCtr:FG_GetMemberStat(self.group_id, qid, DataManager.SelfUser.account_id, + 0, 6, 3, self.begin_time, self.end_time, function(res) - -- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222") - -- pt(res) - ViewUtil.CloseModalWait() - if self._is_destroy then + if res.ReturnCode == 0 then + local members = res.Data.members + self.record_data_find = {} + for i = 1, #members do + if members[i].round > 0 then + members[i].pump = 0 - members[i].pump + self.record_data_find[#self.record_data_find + 1] = members[i] + end + end + ctr_search.selectedIndex = 1 + ViewUtil.CloseModalWait() + print("lingmeng record_data_find", #self.record_data_find) + self.lst_record_find.numItems = #self.record_data_find + else + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(res.ReturnCode) return end - if res.ReturnCode ~= 0 then - ViewUtil.ErrorTip(res.ReturnCode, '找不到成员') - else - self._view:GetChild('tex_id').text = '' - ctr_search.selectedIndex = 1 - local item_result = self._view:GetChild('lst_member_find') - item_result:RemoveChildrenToPool() - - for j = 1, #res.Data.members do - local tem = item_result:AddItemFromPool() - self:FillRecordItem(res.Data.members[j], tem) - end - end - end - ) + end) end ) local btn_back = self._view:GetChild('btn_back') btn_back.onClick:Set( function() + ctr_search.selectedIndex = 0 table.sort(self.record_data, function(a, b) - return a.total_round > b.total_round + return a.round > b.round end) self.lst_record.numItems = #self.record_data end @@ -168,11 +171,11 @@ function M:InitView() if type.selectedIndex == 1 then table.sort(self.record_data, function(a, b) - return a.total_win > b.total_win + return a.score > b.score end) elseif type.selectedIndex == 2 then table.sort(self.record_data, function(a, b) - return a.total_win < b.total_win + return a.score < b.score end) end self.lst_record:RefreshVirtualList() @@ -189,11 +192,11 @@ function M:InitView() type.selectedIndex = type.selectedIndex == 0 and 1 or 3 - type.selectedIndex if type.selectedIndex == 1 then table.sort(self.record_data, function(a, b) - return a.total_round > b.total_round + return a.round > b.round end) elseif type.selectedIndex == 2 then table.sort(self.record_data, function(a, b) - return a.total_round < b.total_round + return a.round < b.round end) end self.lst_record:RefreshVirtualList() @@ -211,11 +214,11 @@ function M:InitView() if type.selectedIndex == 1 then table.sort(self.record_data, function(a, b) - return a.win_round > b.win_round + return a.win > b.win end) elseif type.selectedIndex == 2 then table.sort(self.record_data, function(a, b) - return a.win_round < b.win_round + return a.win < b.win end) end self.lst_record:RefreshVirtualList() @@ -233,11 +236,11 @@ function M:InitView() if type.selectedIndex == 1 then table.sort(self.record_data, function(a, b) - return a.reward_hp > b.reward_hp + return a.pump > b.pump end) elseif type.selectedIndex == 2 then table.sort(self.record_data, function(a, b) - return a.reward_hp < b.reward_hp + return a.pump < b.pump end) end self.lst_record:RefreshVirtualList() @@ -269,20 +272,17 @@ end function M:RecursionGetRecoedData(index) ViewUtil.ShowModalWait("正在获取数据中") local fgCtr = ControllerManager.GetController(NewGroupController) - fgCtr:FG_GetMemberStat(self.group_id, 0, - self._data_choosePlayyer.parentId or self._data_choosePlayyer.uid, - index * 67, 67, 0, self.begin_time, self.end_time, + fgCtr:FG_GetMemberStat(self.group_id, 0, self._data_choosePlayyer.uid, + index * 67, 67, 3, self.begin_time, self.end_time, function(res) - - end) - fgCtr:FG_GetPartnerStatMember(self.group_id, self._data_choosePlayyer.uid, - self._data_choosePlayyer.parentId or self._data_choosePlayyer.uid, - index * 67, 67, 0, self.begin_time, self.end_time, function(res) if res.ReturnCode == 0 then local members = res.Data.members if members and #members > 0 then for i = 1, #members do - self.record_data[#self.record_data + 1] = members[i] + if members[i].round > 0 then + members[i].pump = 0 - members[i].pump + self.record_data[#self.record_data + 1] = members[i] + end end self:RecursionGetRecoedData(index + 1) else @@ -292,7 +292,7 @@ function M:RecursionGetRecoedData(index) self.btn_total:GetController("type").selectedIndex = 0 self.btn_reward:GetController("type").selectedIndex = 0 table.sort(self.record_data, function(a, b) - return a.total_round > b.total_round + return a.round > b.round end) self.lst_record.numItems = #self.record_data end @@ -312,13 +312,14 @@ function M:RecursionGetRankData(index) local ranks = res.Data.ranks if ranks and #ranks > 0 then for i = 1, #ranks do + -- ranks[i].pump = 0 - ranks[i].pump self.record_data[#self.record_data + 1] = ranks[i] end self:RecursionGetRankData(index + 1) else ViewUtil.CloseModalWait() table.sort(self.record_data, function(a, b) - return a.total_round > b.total_round + return a.round > b.round end) self.lst_record.numItems = #self.record_data end @@ -356,9 +357,9 @@ function M:FillRecordItem(data, obj) ctr_show_total.selectedIndex = 0 end - obj:GetChild("tex_round_valid").text = d2ad(data.reward_hp + data.total_win) --d2ad(data.reward_hp) --data.valid_round / 100 - obj:GetChild("tex_round_total").text = data.total_round - obj:GetChild("tex_total").text = d2ad(data.total_win) + obj:GetChild("tex_round_valid").text = d2ad(data.pump + data.score) --d2ad(data.pump) --data.valid_round / 100 + obj:GetChild("tex_round_total").text = data.round + obj:GetChild("tex_total").text = d2ad(data.score) obj:GetChild("tex_round_youxiao").text = data.valid_round / 100 @@ -381,7 +382,7 @@ function M:FillRecordItem(data, obj) local btn_award = obj:GetChild("btn_award") - btn_award.text = d2ad(data.reward_hp) --d2ad(data.reward_hp+data.total_win) + btn_award.text = d2ad(data.pump) --d2ad(data.pump+data.score) btn_award.onClick:Set(function() local time_type = self._view:GetController("type").selectedIndex local gniv = GroupPartnerStatPlay.new(self.group_id, data.uid, data.partnerLev, DataManager.SelfUser.account_id, @@ -436,14 +437,19 @@ end function M:FillRecordItem2(data, obj) obj:GetChild('tex_name').text = data.nick obj:GetChild('tex_id').text = data.uid - obj:GetChild('tex_total').text = d2ad(data.total_win) - obj:GetChild('tex_round_total').text = data.total_round - obj:GetChild('tex_win').text = data.win_round or 0 - obj:GetChild('tex_reward').text = d2ad(data.reward_hp) + obj:GetChild('tex_total').text = d2ad(data.score) + obj:GetChild('tex_round_total').text = data.round + obj:GetChild('tex_win').text = data.win or 0 + obj:GetChild('tex_reward').text = d2ad(data.pump) end function M:OnRenderRecordItem(index, obj) - local data = self.record_data[index + 1] + local dataList = self.record_data + if self._view:GetController('search').selectedIndex == 1 then + dataList = self.record_data_find + end + print("lingmeng dataList", #dataList) + local data = dataList[index + 1] self:FillRecordItem2(data, obj) end diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua index 4cda2de6..7576b066 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatViewAlone.lua @@ -440,11 +440,12 @@ function M:OnRenderRecordItemNew(obj, mainRecord, root_id) else ctr_show_total.selectedIndex = 0 end - obj:GetChild("tex_round_valid").text = d2ad(mainRecord.reward_hp + mainRecord.total_win) --d2ad(data.reward_hp) --data.valid_round / 100 + obj:GetChild("tex_round_valid").text = d2ad((mainRecord.reward_tongji or mainRecord.reward_hp) + mainRecord + .total_win) --d2ad(data.reward_hp) --data.valid_round / 100 obj:GetChild("tex_round_total").text = mainRecord.total_round obj:GetChild("tex_total").text = d2ad(mainRecord.total_win) obj:GetChild("tex_round_youxiao").text = mainRecord.valid_round / 100 - obj:GetChild('tex_reward').text = d2ad(mainRecord.reward_hp) + obj:GetChild('tex_reward').text = d2ad(mainRecord.reward_tongji or mainRecord.reward_hp) obj:GetChild("btn_more").visible = not mainRecord.partnerLev or mainRecord.partnerLev > 0 obj:GetController("more").onChanged:Set(function() end) obj:GetController("more").selectedIndex = 0 @@ -651,7 +652,7 @@ function M:RecursionGetPropLog(members, index) local info = res.Data self.groupumberTemp.total_round = info.count self.groupumberTemp.valid_round = info.valid_count * 100 - self.groupumberTemp.reward_hp = 0 + self.groupumberTemp.reward_hp = info.pump self.groupumberTemp.total_win = 0 ViewUtil.CloseModalWait() fgCtr:FG_GetMembersCount(self.group_id, function(res) diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua index e211507b..49ce7484 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua @@ -247,9 +247,6 @@ function M:OnEventOutCard(evt_data) local p = self._room:GetPlayerBySeat(seat) self._cacheEvent:Enqueue(function() - if self._callback_popEvent then - self._callback_popEvent(true) - end local _room = self._room if (seat == _room.self_player.seat) then list_remove(_room.self_player.handcard_list, card) @@ -299,6 +296,9 @@ function M:OnAddCard(evt_data) local p = _room:GetPlayerBySeat(seat) self._cacheEvent:Enqueue(function() + if self._callback_popEvent then + self._callback_popEvent(true) + end p.DiceCard = card p.hand_left_count = p.hand_left_count + 1 if (seat == _room.self_player.seat) then diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua index 5d410d6d..4ec46d4b 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua @@ -483,6 +483,12 @@ function M:EventInit() card_info:UpdateFzList(p.fz_list, false, p.seat) end end + coroutine.start( + function() + coroutine.wait(0.23) + self._popEvent = true + end + ) end ) @@ -1184,7 +1190,7 @@ function M:OnFangziAction(...) pNode:AddChild(effect) coroutine.start( function() - coroutine.wait(0.5) + coroutine.wait(0.66) effect:Dispose() end ) @@ -1203,7 +1209,7 @@ function M:OnFangziAction(...) if fz.type ~= RB_FZType.Kan then local time = 0.01 if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti or fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then - time = 0.5 + time = 0.66 end local removeOutcard = _player_card_info[self:GetPos(fz.from_seat)] coroutine.start( @@ -1259,7 +1265,7 @@ function M:OnFangziAction(...) local time = 0.01 if fz.type ~= RB_FZType.Kan then if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti or fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then - time = time + 0.5 + time = time + 0.66 end end diff --git a/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info b/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info index 2a3f691f..db5d0af5 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info +++ b/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info @@ -3,16 +3,9 @@ "n213_yvb2": { "hidden": true }, - "n189_dji9": { - "hidden": true, - "collapsed": true - }, - "n212_yvb2": { + "n181_b8zx": { "hidden": true }, - "n83_kwi0": { - "collapsed": true - }, "n184_b5ny": { "hidden": true }, @@ -22,7 +15,7 @@ "n214_yvb2": { "hidden": true }, - "n181_b8zx": { + "n212_yvb2": { "hidden": true } }, diff --git a/wb_new_ui/assets/NewGroup/mgr/View_GroupPartnerStat.xml b/wb_new_ui/assets/NewGroup/mgr/View_GroupPartnerStat.xml index 28b6558d..3592071d 100644 --- a/wb_new_ui/assets/NewGroup/mgr/View_GroupPartnerStat.xml +++ b/wb_new_ui/assets/NewGroup/mgr/View_GroupPartnerStat.xml @@ -2,7 +2,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -35,17 +35,6 @@ - - - - - - - - - -