diff --git a/lua_probject/extend_project/extend/majiang/hechi/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/hechi/EXClearingView.lua index c9ef0138..1d8cbb81 100644 --- a/lua_probject/extend_project/extend/majiang/hechi/EXClearingView.lua +++ b/lua_probject/extend_project/extend/majiang/hechi/EXClearingView.lua @@ -227,7 +227,35 @@ function M:FillItemData(room, data, item, active_player, niao) ImageLoad.Load(p.self_user.head_url, item:GetChild('head')._iconObject) -- 手牌 local hand_cards = data["hand_card"] - table.sort( hand_cards, ViewUtil.HandCardSort) + --table.sort( hand_cards, ViewUtil.HandCardSort) + + -- 癞子(501)排第一,其他牌按 ViewUtil.HandCardSort 规则排序 + if hand_cards and #hand_cards > 1 then + table.sort(hand_cards, function(a, b) + local isLaiziA = (a == 501) + local isLaiziB = (b == 501) + -- 1. 如果 A 是癞子,B 不是,A 排前面 (返回 true) + if isLaiziA and not isLaiziB then + return true + end + -- 2. 如果 A 不是癞子,B 是,A 排后面 (返回 false) + if not isLaiziA and isLaiziB then + return false + end + -- 3. 如果两者都是癞子,或都不是癞子,使用标准排序规则 + -- 尝试获取比较结果 + local result = ViewUtil.HandCardSort(a, b) + + -- 兼容处理:如果 ViewUtil.HandCardSort 返回的是数字 (-1, 0, 1) + if type(result) == "number" then + return result < 0 + end + -- 如果返回的是布尔值,直接返回 + return result + end) + end + + local hand_list_view = item:GetChild("hand_card_list") hand_list_view:RemoveChildrenToPool() for i=1,#hand_cards do @@ -534,10 +562,10 @@ function M:FillItemData2(room, data, list) player_list[i].param[1].value = tostring(data[i].settle_log.zimo) player_list[i].param[2]={} player_list[i].param[2].key = "接炮次数:" - player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[2].value = tostring(data[i].settle_log.jiepao) player_list[i].param[3]={} player_list[i].param[3].key = "点炮次数:" - player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[3].value = tostring(data[i].settle_log.fangpao) player_list[i].param[4]={} player_list[i].param[4].key = "暗杠次数:" player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) @@ -564,7 +592,7 @@ function M:FillItemData2(room, data, list) local list_param = com_p:GetChild("list_param") for j = 1, list_param.numChildren do local tem = list_param:GetChildAt(j - 1) - tem:GetChild("txt_value").textFormat.size = 30 + --tem:GetChild("txt_value").textFormat.size = 30 end if show_detail then local score = 0 diff --git a/lua_probject/extend_project/extend/majiang/hechi/EXGameController.lua b/lua_probject/extend_project/extend/majiang/hechi/EXGameController.lua index f3a751dd..69e7e737 100644 --- a/lua_probject/extend_project/extend/majiang/hechi/EXGameController.lua +++ b/lua_probject/extend_project/extend/majiang/hechi/EXGameController.lua @@ -1,6 +1,8 @@ local TX_Protocol = import(".Protocol") local FZTipList = require("main.majiang.FZData") local TX_GameEvent = import(".GameEvent") +local Hu_Type_Name = import(".CS_Win_Type") + local M = {} @@ -75,7 +77,35 @@ function M:SendOutCard(card, callback) _room.curren_outcard_seat = -1 list_remove(p.card_list, card) - table.sort(p.card_list, ViewUtil.HandCardSort) + --table.sort(p.card_list, ViewUtil.HandCardSort) + + -- 癞子(501)排第一,其他牌按 ViewUtil.HandCardSort 规则排序 + if p.card_list and #p.card_list > 1 then + table.sort(p.card_list, function(a, b) + local isLaiziA = (a == 501) + local isLaiziB = (b == 501) + -- 1. 如果 A 是癞子,B 不是,A 排前面 (返回 true) + if isLaiziA and not isLaiziB then + return true + end + -- 2. 如果 A 不是癞子,B 是,A 排后面 (返回 false) + if not isLaiziA and isLaiziB then + return false + end + -- 3. 如果两者都是癞子,或都不是癞子,使用标准排序规则 + -- 尝试获取比较结果 + local result = ViewUtil.HandCardSort(a, b) + + -- 兼容处理:如果 ViewUtil.HandCardSort 返回的是数字 (-1, 0, 1) + if type(result) == "number" then + return result < 0 + end + -- 如果返回的是布尔值,直接返回 + return result + end) + end + + p.hand_left_count = p.hand_left_count - 1 if not p.outcard_list then p.outcard_list = {} end p.outcard_list[#p.outcard_list + 1] = card @@ -155,7 +185,32 @@ function M:OnEventSendCards(evt_data) end p.card_list = handcards self._room.self_player.hand_left_count = #handcards - table.sort(handcards, ViewUtil.HandCardSort) + --table.sort(handcards, ViewUtil.HandCardSort) + -- 癞子(501)排第一,其他牌按 ViewUtil.HandCardSort 规则排序 + if handcards and #handcards > 1 then + table.sort(handcards, function(a, b) + local isLaiziA = (a == 501) + local isLaiziB = (b == 501) + -- 1. 如果 A 是癞子,B 不是,A 排前面 (返回 true) + if isLaiziA and not isLaiziB then + return true + end + -- 2. 如果 A 不是癞子,B 是,A 排后面 (返回 false) + if not isLaiziA and isLaiziB then + return false + end + -- 3. 如果两者都是癞子,或都不是癞子,使用标准排序规则 + -- 尝试获取比较结果 + local result = ViewUtil.HandCardSort(a, b) + + -- 兼容处理:如果 ViewUtil.HandCardSort 返回的是数字 (-1, 0, 1) + if type(result) == "number" then + return result < 0 + end + -- 如果返回的是布尔值,直接返回 + return result + end) + end DispatchEvent(self._dispatcher, TX_GameEvent.SendCards, p) end) end @@ -312,8 +367,32 @@ function M:OnEventHu(evt_data) self._cacheEvent:Enqueue(function() win_p.card_list = cards table.sort(win_p.card_list, ViewUtil.HandCardSort) - DispatchEvent(self._dispatcher, TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, - win_list) + + -- 【新增代码开始】过滤 win_list 中的无效数据 + local filtered_win_list = {} + for i = 1, #win_list do + local item = win_list[i] + if not item then goto continue end + + local huType = item.type + local huName = Hu_Type_Name[huType] + + -- 1. 基本有效性检查:必须有名字,且名字不为空 + if huName and huName ~= "" then + -- 2. 特定过滤逻辑:如果是 "吃三比",则跳过 + if huName ~= "吃三比" then + -- 可选:如果分数为0也不想要,可以加上 and item.score > 0 + table.insert(filtered_win_list, item) + end + else + -- 如果没有对应的名字,也视为无效数据,跳过 + -- 或者你可以选择保留它,取决于策划需求 + end + ::continue:: + end + -- 使用过滤后的列表派发事件 + DispatchEvent(self._dispatcher, TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, + filtered_win_list) end) end diff --git a/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView.lua b/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView.lua index 16307174..26cf953e 100644 --- a/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView.lua +++ b/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView.lua @@ -90,31 +90,6 @@ function M:UpdateHandCard(getcard, mp) local cards = DataManager.CurrenRoom.self_player.card_list - for i = 1, #cards do - if cards[i] > 400 then - local temp = cards[i]%10 + math.floor(cards[i]/100)*10 - cards[i] = temp - end - if cards[i] == 51 then - cards[i] = 1 - end - end - - if cards and #cards > 1 then - table.sort(cards, function(a, b) - return a < b - end) - end - - for i = 1, #cards do - if cards[i] < 100 then - local temp = cards[i]%10 + math.floor(cards[i]/10)*100 - cards[i] = temp - end - if cards[i] == 1 then - cards[i] = 501 - end - end if (not mp) then for i = 0, (#cards) - 1 do diff --git a/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info b/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info index e643b110..5927871c 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info +++ b/wb_new_ui/.objs/metas/m7iejg46/jgh8hwv.info @@ -1,18 +1,29 @@ { "objectStatus": { - "n181_b8zx": { + "n213_yvb2": { + "hidden": true + }, + "n212_yvb2": { "hidden": true }, "n220_yvb2": { "hidden": true }, + "n184_b5ny": { + "hidden": true + }, "n218_yvb2": { "hidden": true }, - "n184_b5ny": { + "n211_yvb2": { + "hidden": true + }, + "n214_yvb2": { + "hidden": true + }, + "n181_b8zx": { "hidden": true } }, - "adaptiveTest": true, "fitScreen": "FitSize" } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/l679hwn.info b/wb_new_ui/.objs/metas/m7iejg46/l679hwn.info index e7479945..95391ef8 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/l679hwn.info +++ b/wb_new_ui/.objs/metas/m7iejg46/l679hwn.info @@ -2,6 +2,9 @@ "objectStatus": { "n98_k5m9": { "hidden": true + }, + "n102_t8gf": { + "hidden": true } }, "adaptiveTest": true, diff --git a/wb_new_ui/.objs/workspace.json b/wb_new_ui/.objs/workspace.json index 553388ff..0b3c637d 100644 --- a/wb_new_ui/.objs/workspace.json +++ b/wb_new_ui/.objs/workspace.json @@ -2,24 +2,23 @@ "libview.firstColumnWidth": 384, "libview.iconScale": 0, "doc.openedDocs": [ - "ui://m7iejg46yvb27ik0", "ui://m7iejg46hsbhhjn", - "ui://v0j9abjygq7md1", - "ui://v0j9abjygq7mct", - "ui://27vd145bl0lz9", - "ui://27vd145bcjli6", - "ui://v0j9abjygq7md3", + "ui://m7iejg46jgh8hwv", + "ui://v0j9abjygq7m8f", + "ui://v0j9abjygq7m8k", "ui://v0j9abjygq7med", - "ui://2d9xdj6zfn7fao", + "ui://v0j9abjygq7mdj", + "ui://v0j9abjygq7mdo", + "ui://v0j9abjygq7mdv", "ui://v0j9abjygq7mcu", - "ui://v0j9abjygq7m3", - "ui://v0j9abjygq7m85", - "ui://m7iejg46t1hqhy5" + "ui://m7iejg46yvb27ijw", + "ui://m7iejg46n5sxha2", + "ui://m7iejg46yvb27ijz" ], "test.device": "iPhone XR", "canvasColor": 10066329, "auxline2": true, - "doc.activeDoc": "ui://2d9xdj6zfn7fao", + "doc.activeDoc": "ui://v0j9abjygq7mcu", "libview.twoColumn": false, "libview.expandedNodes": [ "27vd145b", @@ -36,6 +35,14 @@ "/images/", "27vd145b", "/images/COMMui/", + "hrxsdiix", + "/", + "hrxsdiix", + "/component/", + "hrxsdiix", + "/component/hu_effect/", + "hrxsdiix", + "/component/hu_effect/image/", "2d9xdj6z", "/", "2d9xdj6z", @@ -75,11 +82,7 @@ "m7iejg46", "/mgr/component/", "m7iejg46", - "/mgr/component/game/", - "m7iejg46", - "/mgr/imgs/", - "m7iejg46", - "/mgr/imgs/member/" + "/mgr/imgs/" ], "auxline1": true, "snapToGrid": true, diff --git a/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he2(2).png b/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he2(2).png deleted file mode 100644 index dc9d74fd..00000000 Binary files a/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he2(2).png and /dev/null differ diff --git a/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he2.png b/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he2.png index 441f1750..dc9d74fd 100644 Binary files a/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he2.png and b/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he2.png differ diff --git a/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he21.png b/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he21.png index 866d62ba..441f1750 100644 Binary files a/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he21.png and b/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he21.png differ diff --git a/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he21f.png b/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he21f.png new file mode 100644 index 00000000..866d62ba Binary files /dev/null and b/wb_new_ui/assets/Extend_MJ_HeChi/component/hu_effect/image/he21f.png differ diff --git a/wb_new_ui/assets/Extend_MJ_HeChi/package.xml b/wb_new_ui/assets/Extend_MJ_HeChi/package.xml index b258f791..481a3c16 100644 --- a/wb_new_ui/assets/Extend_MJ_HeChi/package.xml +++ b/wb_new_ui/assets/Extend_MJ_HeChi/package.xml @@ -202,8 +202,8 @@ - - + + @@ -232,7 +232,7 @@ - + \ No newline at end of file diff --git a/wb_new_ui/assets/NewGroup/NGMui/Frame 121711.png b/wb_new_ui/assets/NewGroup/NGMui/Frame 121711.png new file mode 100644 index 00000000..7f2e7cfb Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Frame 121711.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Frame 1300.png b/wb_new_ui/assets/NewGroup/NGMui/Frame 1300.png new file mode 100644 index 00000000..3a2a68c7 Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Frame 1300.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Frame 1301.png b/wb_new_ui/assets/NewGroup/NGMui/Frame 1301.png new file mode 100644 index 00000000..6eb7dd3f Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Frame 1301.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Frame 1375.png b/wb_new_ui/assets/NewGroup/NGMui/Frame 1375.png new file mode 100644 index 00000000..bda31f9d Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Frame 1375.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Frame 1376.png b/wb_new_ui/assets/NewGroup/NGMui/Frame 1376.png new file mode 100644 index 00000000..5cd59291 Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Frame 1376.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Frame 1377.png b/wb_new_ui/assets/NewGroup/NGMui/Frame 1377.png new file mode 100644 index 00000000..768be0ad Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Frame 1377.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Polygon 13.png b/wb_new_ui/assets/NewGroup/NGMui/Polygon 13.png new file mode 100644 index 00000000..92eaa13f Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Polygon 13.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Polygon 14.png b/wb_new_ui/assets/NewGroup/NGMui/Polygon 14.png new file mode 100644 index 00000000..5a5368c6 Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Polygon 14.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Polygon 15.png b/wb_new_ui/assets/NewGroup/NGMui/Polygon 15.png new file mode 100644 index 00000000..0c1c52bd Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Polygon 15.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Polygon 16.png b/wb_new_ui/assets/NewGroup/NGMui/Polygon 16.png new file mode 100644 index 00000000..fdb48686 Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Polygon 16.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Polygon 5.png b/wb_new_ui/assets/NewGroup/NGMui/Polygon 5.png new file mode 100644 index 00000000..5d3f4950 Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Polygon 5.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Polygon 6.png b/wb_new_ui/assets/NewGroup/NGMui/Polygon 6.png new file mode 100644 index 00000000..d9a45061 Binary files /dev/null and b/wb_new_ui/assets/NewGroup/NGMui/Polygon 6.png differ diff --git a/wb_new_ui/assets/NewGroup/NGMui/Rectangle 29110.png b/wb_new_ui/assets/NewGroup/NGMui/Rectangle 29110.png index 98846a83..52e7d889 100644 Binary files a/wb_new_ui/assets/NewGroup/NGMui/Rectangle 29110.png and b/wb_new_ui/assets/NewGroup/NGMui/Rectangle 29110.png differ diff --git a/wb_new_ui/assets/NewGroup/Win_ManagerView.xml b/wb_new_ui/assets/NewGroup/Win_ManagerView.xml index b1bd5b75..2e526e2a 100644 --- a/wb_new_ui/assets/NewGroup/Win_ManagerView.xml +++ b/wb_new_ui/assets/NewGroup/Win_ManagerView.xml @@ -1,9 +1,9 @@ - - - + + +