diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua index 3fda579d..e059652a 100644 --- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua +++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua @@ -486,6 +486,15 @@ end function M:FG_Isopen_ChatRoom(evt_data) print("收到是否开启聊天室推送") + + local groupId = evt_data.groupId + local group = DataManager.groups:get(groupId) + local isOpenChatRoom = evt_data.chat_id + + if group == nil then return end + + group.isOpenChatRoom = isOpenChatRoom + pt(evt_data) DispatchEvent(self._dispatcher, GroupMgrEvent.IsOpenChatRoom, evt_data) end diff --git a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua index b134beed..425315cd 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyEventView.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyEventView.lua @@ -207,7 +207,7 @@ end function M:_evtIsOpenChatRoom(...) local arg = { ... } - + self:ReflashChatRoomBtn() print("_evtIsOpenChatRoom") pt(arg) end diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index c5ebc8bd..0c0128d9 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -557,6 +557,8 @@ function M:OnEnterGroupCallBack() ReflashJoinsRedPoint(self) + self:ReflashChatRoomBtn() + fgCtr:FG_Get_Online_Member(self._group.id, function(res) end) @@ -892,7 +894,7 @@ function M:OnUpdate() self:UpdateFamilyRoom(fgCtr, self._group.id) end - local HeartbeatTime = 15 + local HeartbeatTime = 60 if newTime - self.lastTime > HeartbeatTime then fgCtr:FG_SetFamilyHeartbeat(self._group.id, DataManager.SelfUser.account_id, function(res) print(res) @@ -1144,4 +1146,11 @@ function M:Close() BaseView.Close(self) end +function M:ReflashChatRoomBtn() + self.btn_chatRoom.visible = true + if self._group.lev == 3 and self._group.isOpenChatRoom == 0 then + self.btn_chatRoom.visible = false + end +end + return M diff --git a/lua_probject/base_project/Game/View/PlayerInfoView.lua b/lua_probject/base_project/Game/View/PlayerInfoView.lua index 04e933ea..dbe7848b 100644 --- a/lua_probject/base_project/Game/View/PlayerInfoView.lua +++ b/lua_probject/base_project/Game/View/PlayerInfoView.lua @@ -202,17 +202,17 @@ end function M:UpdateScore(score, doAnimation) if not score then score = self._player.total_score - local room = DataManager.CurrenRoom - if room:checkHpNonnegative() then - if self._player.cur_hp then + --local room = DataManager.CurrenRoom + --if room:checkHpNonnegative() then + -- if self._player.cur_hp then -- -- print(self._player.total_hp) -- if self._player.total_hp then -- score = d2ad(self._player.total_hp).."/"..d2ad(self._player.cur_hp) -- else - score = d2ad(self._player.cur_hp) + --score = d2ad(self._player.cur_hp) -- end - end - end + -- end + --end end if doAnimation then @@ -393,7 +393,9 @@ function M:ScoreAnimation(score) end self._list_scoreAnimation.numItems = #imgs - local obj = self._list_scoreAnimation:AddItemFromPool() + --local obj = self._list_scoreAnimation:AddItemFromPool() + local obj = self._list_scoreAnimation:GetFromPool("ui://v0j9abjyuans1b1") + self._list_scoreAnimation:AddChildAt(obj, 0) local loader = obj:GetChild("n1") loader.url = symbol diff --git a/lua_probject/extend_project/extend/majiang/100zhang/EXMainView.lua b/lua_probject/extend_project/extend/majiang/100zhang/EXMainView.lua index 99bdb2ac..a930d8cb 100644 --- a/lua_probject/extend_project/extend/majiang/100zhang/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/100zhang/EXMainView.lua @@ -369,13 +369,13 @@ function M:EventInit() end info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num > 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" @@ -681,13 +681,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/changsha/EXMainView.lua b/lua_probject/extend_project/extend/majiang/changsha/EXMainView.lua index ac89fd5b..f37e72f0 100644 --- a/lua_probject/extend_project/extend/majiang/changsha/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/changsha/EXMainView.lua @@ -346,13 +346,13 @@ function M:EventInit() end info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num > 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" @@ -1054,13 +1054,13 @@ function M:ReloadRoom(bskip) local info = self._player_card_info[self:GetPos(p.seat)] local head_info = self._player_info[self:GetPos(p.seat)] head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.win_count ~= nil and p.win_count >= 3 then diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/chaoshan/EXMainView.lua index 67368cb9..d6ffeb53 100644 --- a/lua_probject/extend_project/extend/majiang/chaoshan/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/chaoshan/EXMainView.lua @@ -369,13 +369,13 @@ function M:EventInit() end info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num > 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" @@ -681,13 +681,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/EXMainView.lua b/lua_probject/extend_project/extend/majiang/chaozhou/EXMainView.lua index 0ca8febb..0252a77a 100644 --- a/lua_probject/extend_project/extend/majiang/chaozhou/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/chaozhou/EXMainView.lua @@ -379,13 +379,13 @@ function M:EventInit() end info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num > 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" @@ -746,13 +746,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/EXMainView.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/EXMainView.lua index 05f61fe8..df6d724b 100644 --- a/lua_probject/extend_project/extend/majiang/chaozhougui/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/EXMainView.lua @@ -379,13 +379,13 @@ function M:EventInit() end info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num > 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" @@ -746,13 +746,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua index 28eb9065..2fce60df 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua @@ -805,13 +805,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] -- head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXWitnessView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXWitnessView.lua index d80b2f24..f682eae2 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXWitnessView.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXWitnessView.lua @@ -273,13 +273,13 @@ function M:EventInit() end -- info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num >= 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" diff --git a/lua_probject/extend_project/extend/majiang/gejiu/EXMainView.lua b/lua_probject/extend_project/extend/majiang/gejiu/EXMainView.lua index 16986612..9df721c9 100644 --- a/lua_probject/extend_project/extend/majiang/gejiu/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/gejiu/EXMainView.lua @@ -370,13 +370,13 @@ function M:EventInit() end info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num > 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" @@ -724,13 +724,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/EXMainView.lua b/lua_probject/extend_project/extend/majiang/hongzhong/EXMainView.lua index 11e9063a..b005af4a 100644 --- a/lua_probject/extend_project/extend/majiang/hongzhong/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/hongzhong/EXMainView.lua @@ -288,13 +288,13 @@ function M:EventInit() end info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num > 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" @@ -657,13 +657,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXGameController.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXGameController.lua index c49be0c7..65a57d3b 100644 --- a/lua_probject/extend_project/extend/majiang/jinxi/EXGameController.lua +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXGameController.lua @@ -316,12 +316,13 @@ function M:OnEventHu(evt_data) local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) local win_card = evt_data["win_card"] local win_list = evt_data["win_list"] + local scoreData = evt_data["result"].info_list self._cacheEvent:Enqueue(function() win_p.card_list = cards table.sort(win_p.card_list, self.HandCardSortAndJing) DispatchEvent(self._dispatcher, TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, - win_list) + win_list, scoreData) end) end diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXMainView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXMainView.lua index d53d76f7..2c36ab8b 100644 --- a/lua_probject/extend_project/extend/majiang/jinxi/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXMainView.lua @@ -899,13 +899,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] -- head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXWitnessView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXWitnessView.lua index a74f193e..d6223c81 100644 --- a/lua_probject/extend_project/extend/majiang/jinxi/EXWitnessView.lua +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXWitnessView.lua @@ -272,13 +272,13 @@ function M:EventInit() end -- info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num >= 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua index 32a47f1b..ebe1623c 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua @@ -317,12 +317,13 @@ function M:OnEventHu(evt_data) local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) local win_card = evt_data["win_card"] local win_list = evt_data["win_list"] + local scoreData = evt_data["result"].info_list self._cacheEvent:Enqueue(function() win_p.card_list = cards table.sort(win_p.card_list, self.HandCardSortAndJing) DispatchEvent(self._dispatcher, TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, - win_list) + win_list, scoreData) end) end diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua index bc9b0295..2678ba90 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua @@ -901,13 +901,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] -- head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua index 811422bc..87ad2468 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua @@ -297,13 +297,13 @@ function M:EventInit() end -- info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num >= 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXGameController.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXGameController.lua index 36c3b4e3..7fad7121 100644 --- a/lua_probject/extend_project/extend/majiang/nancheng/EXGameController.lua +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXGameController.lua @@ -316,12 +316,13 @@ function M:OnEventHu(evt_data) local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) local win_card = evt_data["win_card"] local win_list = evt_data["win_list"] + local scoreData = evt_data["result"].info_list self._cacheEvent:Enqueue(function() win_p.card_list = cards table.sort(win_p.card_list, self.HandCardSortAndJing) DispatchEvent(self._dispatcher, TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, - win_list) + win_list, scoreData) end) end diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua index 98e39341..071cf20a 100644 --- a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua @@ -900,13 +900,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] -- head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXWitnessView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXWitnessView.lua index 3c45cf98..5fe70e9a 100644 --- a/lua_probject/extend_project/extend/majiang/nancheng/EXWitnessView.lua +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXWitnessView.lua @@ -272,13 +272,13 @@ function M:EventInit() end -- info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num >= 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/EXMainView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/EXMainView.lua index d24fb1e9..44209780 100644 --- a/lua_probject/extend_project/extend/majiang/qizhiba/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/qizhiba/EXMainView.lua @@ -371,13 +371,13 @@ function M:EventInit() end info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num > 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" @@ -737,13 +737,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/EXMainView.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/EXMainView.lua index 1c4cba27..ef199437 100644 --- a/lua_probject/extend_project/extend/majiang/tuidaohu/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/EXMainView.lua @@ -369,13 +369,13 @@ function M:EventInit() end info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num > 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" @@ -681,13 +681,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXMainView.lua index f838faff..dcb6b3ad 100644 --- a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXMainView.lua @@ -283,13 +283,13 @@ function M:EventInit() end info:UpdateScore() info._view:GetChild("zhanji").visible = true - local num = data[i].hp_info.total_hp + local num = data[i].hp_info.total_score if num > 0 then info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + info._view:GetChild("text_jifen").text = "+" .. num --d2ad(num) else info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = d2ad(num) + info._view:GetChild("text_jifen").text = num --d2ad(num) end info._view:GetChild("mask_piao").title = "" @@ -641,13 +641,13 @@ function M:ReloadRoom(bskip) local head_info = self._player_info[self:GetPos(p.seat)] head_info:UpdateScore() head_info._view:GetChild('zhanji').visible = true - local num = p.total_hp or 0 + local num = p.total_score or 0 if num > 0 then head_info._view:GetController('text_color').selectedIndex = 0 - head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + head_info._view:GetChild('text_jifen').text = "+" .. num --d2ad(num) else head_info._view:GetController('text_color').selectedIndex = 1 - head_info._view:GetChild('text_jifen').text = d2ad(num) + head_info._view:GetChild('text_jifen').text = num --d2ad(num) end if p.seat == room.last_outcard_seat then diff --git a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua index b3fa7b4f..b60a6d67 100644 --- a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua +++ b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua @@ -465,11 +465,21 @@ function M:ResetCardType() end function M:ShowHand(cards) + self._view_handCardList:RemoveChildren() + + local list = self._view_handCardList + local cardType = self._viewText_cardInfo["Out_Card"] + if self._viewText_cardInfo['IS_SIDE'] == "true" then + list = self._view:GetChild('List_HandCard2') + cardType = self._viewText_cardInfo["Hand_Card"] + end + + --list:RemoveChildren() for _, card in pairs(cards) do if self.winCard ~= card then - local obj = self._view_handCardList:AddItemFromPool() - obj:GetChild("icon").url = 'ui://Main_Majiang/' .. self._viewText_cardInfo['Out_Card'] .. card + local obj = list:AddItemFromPool() + obj:GetChild("icon").url = 'ui://Main_Majiang/' .. cardType .. card end end end diff --git a/wb_new_ui/assets/Lobby/Main_New.xml b/wb_new_ui/assets/Lobby/Main_New.xml index 91c33574..e608fbfa 100644 --- a/wb_new_ui/assets/Lobby/Main_New.xml +++ b/wb_new_ui/assets/Lobby/Main_New.xml @@ -72,10 +72,10 @@ - + - + diff --git a/wb_new_ui/assets/Lobby/component/Main/Component/notice/c_message.xml b/wb_new_ui/assets/Lobby/component/Main/Component/notice/c_message.xml index d9ba2451..4fc512a5 100644 --- a/wb_new_ui/assets/Lobby/component/Main/Component/notice/c_message.xml +++ b/wb_new_ui/assets/Lobby/component/Main/Component/notice/c_message.xml @@ -1,8 +1,8 @@ - + + - \ No newline at end of file diff --git a/wb_new_ui/assets/Lobby/component/notice_old/Cgm_message.xml b/wb_new_ui/assets/Lobby/component/notice_old/Cgm_message.xml index 038c01a6..cea2c5e3 100644 --- a/wb_new_ui/assets/Lobby/component/notice_old/Cgm_message.xml +++ b/wb_new_ui/assets/Lobby/component/notice_old/Cgm_message.xml @@ -1,6 +1,7 @@ - + + diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Image/4918b5270e436c54b44d48f0bb79114 3(1).png b/wb_new_ui/assets/Main_Majiang/Main_new/Image/4918b5270e436c54b44d48f0bb79114 3(1).png new file mode 100644 index 00000000..9f754bb6 Binary files /dev/null and b/wb_new_ui/assets/Main_Majiang/Main_new/Image/4918b5270e436c54b44d48f0bb79114 3(1).png differ diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_E.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_E.xml index fbed5c1d..88f10012 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_E.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_E.xml @@ -13,7 +13,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -86,6 +86,6 @@ - + \ No newline at end of file diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_N.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_N.xml index f2148788..1aa1ec49 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_N.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_N.xml @@ -1,16 +1,16 @@ - + - + - + @@ -25,14 +25,14 @@ - + - - + + @@ -67,7 +67,7 @@ - + diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_S.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_S.xml index 917785d9..2103437a 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_S.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_S.xml @@ -20,7 +20,7 @@ - + @@ -35,7 +35,7 @@ - + diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_W.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_W.xml index f2db1eb2..769f5940 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_W.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2/Player_card_info_W.xml @@ -5,7 +5,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -84,6 +84,6 @@ - + \ No newline at end of file diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml index 9f03c518..0b2e63f8 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_2_jiangxi.xml @@ -1,6 +1,6 @@ - + @@ -28,7 +28,7 @@ - + @@ -37,11 +37,12 @@ - + + @@ -283,6 +284,5 @@ - \ No newline at end of file diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_3_jiangxi.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_3_jiangxi.xml index d1fb5315..c601ea21 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_3_jiangxi.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_3_jiangxi.xml @@ -45,6 +45,7 @@ + @@ -284,6 +285,5 @@ - \ No newline at end of file diff --git a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_4_jiangxi.xml b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_4_jiangxi.xml index 2c144d06..49f85627 100644 --- a/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_4_jiangxi.xml +++ b/wb_new_ui/assets/Main_Majiang/Main_new/Main_new_4_jiangxi.xml @@ -15,16 +15,16 @@ - + - + - + - + @@ -55,6 +55,7 @@ + @@ -293,6 +294,5 @@ - \ No newline at end of file diff --git a/wb_new_ui/assets/Main_Majiang/package.xml b/wb_new_ui/assets/Main_Majiang/package.xml index 30ded132..65f60b1f 100644 --- a/wb_new_ui/assets/Main_Majiang/package.xml +++ b/wb_new_ui/assets/Main_Majiang/package.xml @@ -1539,6 +1539,7 @@ + \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes index 23617b2a..b73de100 100644 Binary files a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes b/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes index e286560f..925b0546 100644 Binary files a/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/Main_Majiang_fui.bytes differ