diff --git a/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua b/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua index d5b7555a..fdc26dae 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua @@ -241,7 +241,7 @@ function M:InitBoxType() table.insert(values, tostring(games[i].game_id)) end - self._data_seletedType = 0 + self._data_seletedType = "0" return items, values end diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/CardCheck.lua b/lua_probject/extend_project/extend/majiang/fuzhou/CardCheck.lua index 71dd7f8e..b8724844 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/CardCheck.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/CardCheck.lua @@ -314,13 +314,13 @@ local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) return self:checkQidui() or self:tryWin() end -local specialCardList={400,403,406,409,412,415,418} -function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) - --printlog("isZhong",isZhong) - --printlog("qidui",qidui) - --printlog("eightLaizi",eightLaizi) - --pt(cardInhand) - local self = setmetatable({}, {__index = M}) +local specialCardList = { 401, 402, 403, 404, 405, 406, 407 } +function M.tingPai(cardInhand, isZhong, qidui, eightLaizi) + -- printlog("isZhong", isZhong) + -- printlog("qidui", qidui) + -- printlog("eightLaizi", eightLaizi) + -- pt(cardInhand) + local self = setmetatable({}, { __index = M }) local tingList = {} if not cardInhand or #cardInhand == 0 then return tingList diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua index d5b583a2..e7066e1f 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua @@ -51,7 +51,6 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne if result then result.cardList = json.decode(result.cardList) - --排序 --table.sort(result.cardList) end self.list_lastCard = self._view:GetChild('list_lastCard') @@ -97,13 +96,12 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne if self._witnessCallbak then self._witnessCallbak() end - --self:DestroyWithCallback() + self:DestroyWithCallback() else local _gamectr = ControllerManager.GetController(GameController) _gamectr:PlayerReady() - --self:DestroyWithCallback() + self:DestroyWithCallback() end - self:DestroyWithCallback() end) elseif over == 1 then mainCtr.selectedIndex = 1 diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua index 74c28773..1223259e 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua @@ -59,7 +59,6 @@ function M:InitView(url) --]] local config = ExtendManager.GetExtendConfig(room.game_id) local mode = config:GetGameInfo() - pt("lingmeng", room) local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.config.hpData)) self._view:GetChild('wanfa_text').text = gamePlay @@ -233,6 +232,7 @@ function M:EventInit() _gamectr:AddEventListener(TX_GameEvent.SendCards, function(...) -- self:ShowHuTip() + --测试用记录出牌权次数 --self._viewText_testName.text = 0 self:UpdateRound() self._state.selectedIndex = 1 @@ -251,7 +251,7 @@ function M:EventInit() end) _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) local arg = { ... } - self._left_time = 15 + -- self._left_time = 15 local seat = arg[1] self:UpdateCardBox(self:GetPos(seat)) -- if seat == self._room.self_player.seat then @@ -268,7 +268,6 @@ function M:EventInit() local _gcm_outcard_url = "ui://Main_Majiang/Gcm_OutCard" _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) self:__CloseTip() - self._left_time = 0 local arg = { ... } local p = arg[1] local card = arg[2] @@ -354,41 +353,38 @@ function M:EventInit() end if _room.curren_round ~= _room.room_config.round then -- if #niao == 0 then self._view:GetChild("n13").visible = false end - self._clearingView:InitData(0, _room, result, nil, function(...)]] - - --[[ + self._clearingView:InitData(0, _room, result, nil, function(...) for i = 1, #data do local p = _room:GetPlayerBySeat(data[i].seat) - p.total_score = data[i].total_score - local card_info = self._player_card_info[self:GetPos(p.seat)] - local info = self._player_info[self:GetPos(p.seat)] - card_info:Clear() - card_info:ResetCardType() - if _room:checkHpNonnegative() then - p.cur_hp = data[i].total_score - end - -- info:UpdateScore() - info._view:GetChild("zhanji").visible = true - local num = data[i].total_score - if num >= 0 then - info._view:GetController("text_color").selectedIndex = 0 - info._view:GetChild("text_jifen").text = "+" .. num - else - info._view:GetController("text_color").selectedIndex = 1 - info._view:GetChild("text_jifen").text = num - end + if p then + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].total_score + end + -- info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].total_score + if num >= 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. num + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = num + end - info._view:GetChild("mask_piao").title = "" - info._view:GetController("piao_niao").selectedIndex = 0 - p.fz_list = {} + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end end DataManager.CurrenRoom.self_player.card_list = {} self._state.selectedIndex = 2 self._clearingView = nil - ]] - --[[ end) - end -- self._player_card_info[1]:ShowHuTip()]] end) @@ -486,6 +482,7 @@ function M:OutCard(card) info:UpdateHandCard() info:UpdateOutCardList(nil, card, self._cursor) + info._ctr_tip.selectedIndex = 0 self:PlaySound("FuZhou_MJ", self._room.self_player.self_user.sex, tostring(card)) self:PlayMJSound("chupai.mp3") -- self:ShowHuTip() diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua index bacbade9..8a8413a1 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua @@ -20,7 +20,7 @@ end function M:InitView(url) local room = self._room UIPackage.AddPackage("extend/majiang/fuzhou/ui/Extend_MJ_FuZhou") - MJPlayBackView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num) + MJPlayBackView.InitView(self, string.format("ui://Main_Majiang/Main_new_%d_jiangxi", room.room_config.people_num)) local _cardbox = self._view:GetChild("cardbox") --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false self._ctr_cardbox = _cardbox:GetController("c1") diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua index 139594cf..bdfb8424 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua @@ -74,7 +74,8 @@ function M:FillRoomData(s2croom) room.room_config = EXRoomConfig.new(_config) local playerList = _tableInfo["playerData"] room.curren_round = _tableInfo["round"] - + room.witness_player_list = _tableInfo["playerSpectatorData"] + room._flag_updateWitness = true self:FillPlayerData(playerList) if (reload) then diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua index 3c3c528c..33f1bcdb 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua @@ -73,9 +73,9 @@ function M:SendOutCard(card, callback) _room.curren_outcard_seat = -1 list_remove(p.card_list, card) - pt(p.card_list) table.sort(p.card_list, self.HandCardSortAndJing) + 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 diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXGameInfo.lua index 3b6006f7..2ef54bac 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXGameInfo.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXGameInfo.lua @@ -141,8 +141,8 @@ function M:SelectedConfigData() end function M:LoadConfigData(data) - printlog("加载房间配置=========>>>") - pt(data) + --printlog("加载房间配置=========>>>") + --pt(data) local _config = self._config _config:GetController("round").selectedIndex = data.opt - 1 _config:GetController("peopleNum").selectedIndex = data.maxPlayers - 2 diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua index 5e15cd14..5acd3654 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua @@ -167,7 +167,6 @@ function M:InitPlayerInfoView() local tem = self._view:GetChild(string.format("player_info%d_%d", i, (self._state.selectedIndex % 2) + 1)) _player_info[i] = PlayerInfoView.new(tem, self) tem.visible = false - printlog("lingmeng _player_info init", tem, i) end end @@ -267,8 +266,6 @@ function M:EventInit() local _gcm_outcard_url = "ui://Main_Majiang/Gcm_OutCard" _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) self:__CloseTip() - - local arg = { ... } local p = arg[1] local card = arg[2] @@ -293,12 +290,10 @@ function M:EventInit() self._tex_LeftCard.text = string.format("余%d张", arg[3]) -- self:UpdateRoomInfo() local info = self._player_card_info[self:GetPos(seat)] - print("lingmeng log GetCard", self:GetPos(seat)) info:UpdateHandCard(true) end) _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) - print("========================OnEventFzTips1") local arg = { ... } local _tip = arg[1] local weight = arg[2] @@ -450,7 +445,6 @@ function M:EventInit() self._popEvent = true end) end - if _room.curren_round ~= _room.room_config.round then -- if #niao == 0 then self._view:GetChild("n13").visible = false end self._clearingView:InitData(0, _room, result, nil, function(...) @@ -493,7 +487,6 @@ function M:EventInit() self:PlayMJSound("end_music.mp3") self:UnmarkSelfTuoguan() self._left_time = 0 - self:UpdateCardBox(0) self._ctr_cardbox.selectedIndex = 0 local arg = { ... } @@ -577,7 +570,6 @@ function M:OutCard(card) printlog("当前出牌为===>>>" .. card) local _gamectr = ControllerManager.GetController(GameController) self._room.curren_outcard_seat = -1 - -- _gamectr:SendAction(0) _gamectr:SendOutCard(card, function() local info = self._player_card_info[1] self:RemoveCursor() @@ -707,8 +699,6 @@ function M:__FangziTip(tip, weight) end) end end - printlog("__FangziTip2") - _ctr_tips.selectedIndex = 1 _lit_fanzi.numItems = tip.tip_num + 1 end diff --git a/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua index 77fd052c..b9c0b3cb 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua @@ -120,10 +120,7 @@ function M:FillRoomData(s2croom) fz.from_seat = op["from_seat"] p.fz_list[#p.fz_list + 1] = fz end - print("=======================在此进入", playing) - if not playing and room.curren_round > 0 then - print("=======================在此进入") self.GetGameController():PlayerReady() end end