diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua index 94d56fcc..4cdecf33 100644 --- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua +++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua @@ -169,6 +169,7 @@ function M:connect(host, groupId, callback) group.isWatch = res.Data.isWatch group.messageCount = res.Data.messageCount group.isShow = res.Data.isShow + group.isOpenStartRoom = res.Data.isShowBeginRoom group.joinsData = {} else self.code = SocketCode.ExceptionOnConnect diff --git a/lua_probject/base_project/Game/Controller/NewGroupController.lua b/lua_probject/base_project/Game/Controller/NewGroupController.lua index 4c95b85a..529cde4f 100644 --- a/lua_probject/base_project/Game/Controller/NewGroupController.lua +++ b/lua_probject/base_project/Game/Controller/NewGroupController.lua @@ -43,7 +43,7 @@ function M:FG_GroupList(callback) group.show_num = tem.show_num group.isShow = tem.isShow group.isOpenChatRoom = tem.isOpenChatRoom - group.isOpenStartRoom = tem.isShowBeginRoom or 0 -- --是否显示开始房间 0显示 1隐藏 + -- group.isOpenStartRoom = tem.isShowBeginRoom or 0 -- --是否显示开始房间 0显示 1隐藏 group.isWatch = tem.isWatch group.wechatId = tem.wechatId group.groupDiamo = tem.groupDiamo diff --git a/lua_probject/base_project/Game/Controller/RoomController.lua b/lua_probject/base_project/Game/Controller/RoomController.lua index 09224ae8..5c63a189 100644 --- a/lua_probject/base_project/Game/Controller/RoomController.lua +++ b/lua_probject/base_project/Game/Controller/RoomController.lua @@ -183,7 +183,8 @@ function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid) ExtendHotupdate.UpdateGame(game_info, function() -- res.ReturnCode = -2 -- callback(res) - self:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid) + + self:PublicJoinRoom(Protocol.WEB_FG_JOIN_ROOM, json["room_id"], tem, callback, group_id, pid) end) return end diff --git a/lua_probject/base_project/Game/ControllerManager.lua b/lua_probject/base_project/Game/ControllerManager.lua index 9c04c5d8..927d396f 100644 --- a/lua_probject/base_project/Game/ControllerManager.lua +++ b/lua_probject/base_project/Game/ControllerManager.lua @@ -39,14 +39,16 @@ end function ControllerManager.ChangeController(type) printlog("lingmeng code ChangeController", _currenController, type) - pt("lingmeng code ChangeController", _currenController, type) - printlog("lingmeng code ChangeController", _currenController ~= nil) - if (_currenController ~= nil and not string.find(_currenController.class, "GameController")) then + pt(_currenController) + pt(type) + printlog("lingmeng code ChangeController", type == GameController) + if (_currenController ~= nil and not (string.find(_currenController.class, "GameController") and type == GameController)) then _currenController:OnExit() end _currenController = ControllerManager.GetController(type) printlog("lingmeng code ChangeController2", _currenController, type) - pt("lingmeng code ChangeController2", _currenController, type) + pt(_currenController) + pt(type) _currenController:OnEnter() return _currenController end diff --git a/lua_probject/base_project/Game/ExtendHotupdate.lua b/lua_probject/base_project/Game/ExtendHotupdate.lua index 523e872a..34439364 100644 --- a/lua_probject/base_project/Game/ExtendHotupdate.lua +++ b/lua_probject/base_project/Game/ExtendHotupdate.lua @@ -58,11 +58,13 @@ function ExtendHotupdate.UpdateGameList(list, callback) end local _version_view = UIPackage.CreateObjectFromURL("ui://Hotupdate/Version") - _version_view.x = (GRoot.inst.width - _version_view.width) / 2 + -- _version_view.x = (GRoot.inst.width - _version_view.width) / 2 _version_view:GetChild("tex_info").text = "正在检查资源。。。" local _pd = _version_view:GetChild("pb_progress") _pd.value = 0 GRoot.inst:AddChild(_version_view) + _version_view:MakeFullScreen() + _version_view:AddRelation(GRoot.inst, RelationType.Size) coroutine.start(__update_check, list, function(progress, finish) _pd.value = progress * 100 diff --git a/lua_probject/base_project/Game/View/Family/FamilAllRank.lua b/lua_probject/base_project/Game/View/Family/FamilAllRank.lua index 9ab05f7a..d91fd8f8 100644 --- a/lua_probject/base_project/Game/View/Family/FamilAllRank.lua +++ b/lua_probject/base_project/Game/View/Family/FamilAllRank.lua @@ -153,6 +153,11 @@ function M:RecursionSearchRank(fgCtr, index, begin_time, end_time) table.sort(self.scoreRanks, function(a, b) return a.score > b.score end) + if #self.roundRanks > 0 then + self._view:GetController('noPeople').selectedIndex = 0 + else + self._view:GetController('noPeople').selectedIndex = 1 + end self._viewList_round.numItems = #self.roundRanks self._viewList_score.numItems = #self.winRanks self._viewList_win.numItems = #self.scoreRanks diff --git a/lua_probject/base_project/Game/View/Family/FamilyNumberDetail.lua b/lua_probject/base_project/Game/View/Family/FamilyNumberDetail.lua index be090ce0..e906ecae 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyNumberDetail.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyNumberDetail.lua @@ -59,7 +59,11 @@ function M:init(url, lev, res) inputData.showText = "小提示\n1.设置为0分时表示进入牌局不受限制\n2.每天未读的输分高于设置的分数后无法进入牌局" ViewUtil.ShowOneInput(inputData, function(text) -- print("lingmeng修改扑克进入限制分", text) - fgCtr:FG_SetJoinScore(self.groupId, info.uid, tonumber(text), MJScore, function(res) + if text == "" then + ViewUtil.ShowOneChooose({ showText = "请输入正确的权限分" }) + return + end + fgCtr:FG_SetJoinScore(self.groupId, info.uid, tonumber(text) or 0, MJScore, function(res) if res.ReturnCode ~= 0 then ViewUtil.ErrorTip(res.ReturnCode, "修改限制分失败") else @@ -79,7 +83,11 @@ function M:init(url, lev, res) inputData.showText = "小提示\n1.设置为0分时表示进入牌局不受限制\n2.每天未读的输分高于设置的分数后无法进入牌局" ViewUtil.ShowOneInput(inputData, function(text) -- print("lingmeng修改扑克进入限制分", text) - fgCtr:FG_SetJoinScore(self.groupId, info.uid, MJScore, tonumber(text), function(res) + if text == "" then + ViewUtil.ShowOneChooose({ showText = "请输入正确的权限分" }) + return + end + fgCtr:FG_SetJoinScore(self.groupId, info.uid, MJScore, tonumber(text) or 0, function(res) if res.ReturnCode ~= 0 then ViewUtil.ErrorTip(res.ReturnCode, "修改限制分失败") else diff --git a/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua b/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua index b25bcec9..ef999a3a 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyNumberRecord.lua @@ -202,7 +202,11 @@ function FamilyNumberRecord.New(root, page) else day = 2 end - fgCtr:FG_SetJoinScore(group_id, 0, tonumber(text), self.MJScore, function(res) + if text == "" then + ViewUtil.ShowOneChooose({ showText = "请输入正确的权限分" }) + return + end + fgCtr:FG_SetJoinScore(group_id, 0, tonumber(text) or 0, self.MJScore, function(res) if res.ReturnCode ~= 0 then ViewUtil.ErrorTip(res.ReturnCode, "修改限制分失败") else @@ -228,7 +232,11 @@ function FamilyNumberRecord.New(root, page) else day = 2 end - fgCtr:FG_SetJoinScore(group_id, 0, self.MJScore, tonumber(text), function(res) + if text == "" then + ViewUtil.ShowOneChooose({ showText = "请输入正确的权限分" }) + return + end + fgCtr:FG_SetJoinScore(group_id, 0, self.MJScore, tonumber(text) or 0, function(res) if res.ReturnCode ~= 0 then ViewUtil.ErrorTip(res.ReturnCode, "修改限制分失败") else @@ -302,6 +310,19 @@ function FamilyNumberRecord.New(root, page) self.rankNumber.round = 0 end + local btn_reflash = self._view:GetChild('btn_reflash') + btn_reflash.onClick:Set(function() + btn_reflash.touchable = false + btn_reflash.grayed = true + self:OnClickNumberRank(group_id, self.rankNumber.uid, 0) + self._view:GetChild('text_numberRecordTime').text = os.date('%Y-%m-%d %H:%M:%S', os.time()) + coroutine.start(function() + coroutine.wait(3) + btn_reflash.touchable = true + btn_reflash.grayed = false + end) + end) + fgCtr:FG_GetConsumeStat(group_id, self._data_leftTime, self._data_rightTime, function(res) if res.ReturnCode ~= 0 then ViewUtil.ErrorTip(res.ReturnCode, "获取总信息失败") @@ -561,6 +582,8 @@ function M:NumverRankRenderer(groupId) tonumber(info.score)) obj:GetChild('btn_lookRecord').onClick:Set(function() self.ctr_numberRecord.selectedIndex = 1 + self.rankNumber.uid = info.uid + self.rankNumber.round = info.round if self._ctr_day.selectedIndex ~= self._ctr_myday.selectedIndex then self._ctr_myday.selectedIndex = self._ctr_day.selectedIndex else @@ -569,8 +592,6 @@ function M:NumverRankRenderer(groupId) self._view:GetChild('text_numberRecordName').text = info.nick self._view:GetChild('text_numberRecordID').text = string.format("ID:%s", info.uid) ImageLoad.Load(info.portrait, self._view:GetChild('btn_numberRecordHead')._iconObject) - self.rankNumber.uid = info.uid - self.rankNumber.round = info.round end) end end @@ -584,7 +605,7 @@ function M:OnClickSortType() end function M:RecursionGetNumberRank(fgCtr, index, round, win, cost) - fgCtr:FG_GetMemberRank_2(self.group_id, 0, index * 2, 2, self._data_leftTime, self._data_rightTime, + fgCtr:FG_GetMemberRank_2(self.group_id, 0, index * 67, 67, self._data_leftTime, self._data_rightTime, self._data_seletedType, self._data_sortType, function(res) if res.ReturnCode ~= 0 then @@ -602,6 +623,18 @@ function M:RecursionGetNumberRank(fgCtr, index, round, win, cost) else round = math.floor(round / 2) self.showRank = self.rank + table.sort(self.showRank, function(a, b) + if self._data_sortType and self._data_sortType == 1 then + return a.score < b.score + else + return a.score > b.score + end + end) + if #self.showRank > 0 then + self._view:GetController('noPeople').selectedIndex = 0 + else + self._view:GetController('noPeople').selectedIndex = 1 + end self._viewList_numverRecord.numItems = #self.showRank end diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index 38cccc1e..3e843fbd 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -639,6 +639,7 @@ function M:UpdateFamilyRoom(fgCtr, id) local show_num = all_num if self._group.lev == 3 and self._group.isOpenStartRoom == 1 then show_num = #playList + #readyRoom + self._view:GetChild('n364').text = string.format("已开启***桌游戏") end self._view:GetChild('btn_showALlStartRoom'):GetController('isOpen').selectedIndex = self._group.isOpenStartRoom list_room.itemRenderer = function(index, obj) @@ -664,7 +665,7 @@ function M:UpdateFamilyRoom(fgCtr, id) roomCtr:PublicJoinRoom( Protocol.WEB_FG_JOIN_ROOM, readyRoom[newIndex].id, - id, + true, function(response) if (response.ReturnCode == -1) then ViewUtil.CloseModalWait2() @@ -735,7 +736,7 @@ function M:UpdateFamilyRoom(fgCtr, id) roomCtr:PublicJoinRoom( Protocol.WEB_FG_MATCH_ROOM, "", - false, + true, function(response) if (response.ReturnCode == -1) then ViewUtil.CloseModalWait2() @@ -795,7 +796,7 @@ function M:FillSameRoomInfo(obj, type, playInfo) local roomName = playInfo.name roomName = Utils.TextOmit(roomName, 6, "") obj:GetChild('game_type').emojies = EmojiDitc.EmojiesDitc - obj:GetChild('game_type').text = string.format("(%s)%s", playInfo.game_name, roomName) + obj:GetChild('game_type').text = string.format(" (%s) %s", playInfo.game_name, roomName) obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = type obj:GetChild('btn_watch').visible = self._group.isWatch and self._group.isWatch == 1 obj:GetChild('btn_jiesan').visible = self._group.lev < 3 diff --git a/lua_probject/base_project/Game/View/Lobby/LobbyGiftDiamond.lua b/lua_probject/base_project/Game/View/Lobby/LobbyGiftDiamond.lua index c68f516d..e844f5b5 100644 --- a/lua_probject/base_project/Game/View/Lobby/LobbyGiftDiamond.lua +++ b/lua_probject/base_project/Game/View/Lobby/LobbyGiftDiamond.lua @@ -49,9 +49,14 @@ function M:init(url) ViewUtil.ErrorTip(-1, "请输入正确的用户ID") return end + if not tonumber(text_num) or tonumber(text_num) == 0 then + ViewUtil.ErrorTip(-1, "请输入赠送数量") + return + end local _curren_msg = MsgWindow.new(self._root_view, - string.format("是否要赠送%s房卡给用户:%s(%d)", text_num, self._view:GetChild('text_name').text, text_id), + string.format("确定赠送玩家(%s)%s房卡吗?", self._view:GetChild('text_name').text, text_num), MsgWindow.MsgMode.OkAndCancel) + _curren_msg._new_hide = false _curren_msg.onOk:Add(function() local lobbyCtr = ControllerManager.GetController(LoddyController) lobbyCtr:GiftDiamond( diff --git a/lua_probject/base_project/Game/View/LobbyView.lua b/lua_probject/base_project/Game/View/LobbyView.lua index f0821b54..1f9196e5 100644 --- a/lua_probject/base_project/Game/View/LobbyView.lua +++ b/lua_probject/base_project/Game/View/LobbyView.lua @@ -154,7 +154,14 @@ function M:InitView(url) local btn_diamo = self._view:GetChild("btn_diamo") btn_diamo.onClick:Add(function() - + btn_diamo.touchable = false + btn_diamo:GetChild('n6').grayed = true + self:GetPlayerInfoData() + coroutine.start(function() + coroutine.wait(3) + btn_diamo.touchable = true + btn_diamo:GetChild('n6').grayed = false + end) end) local btn_customerService = self._view:GetChild("btn_customerService") diff --git a/lua_probject/base_project/Game/View/LoginView.lua b/lua_probject/base_project/Game/View/LoginView.lua index 9c233cda..19882e6b 100644 --- a/lua_probject/base_project/Game/View/LoginView.lua +++ b/lua_probject/base_project/Game/View/LoginView.lua @@ -10,6 +10,7 @@ function LoginView.new() local self = setmetatable({}, { __index = M }) self.class = "LoginView" self._full = true + self._full_offset = false self:init() return self end @@ -29,6 +30,7 @@ function M:init() -- -- print(GameApplication.Instance.accountTest and 1 or 0) view:GetController("test").selectedIndex = GameApplication.Instance.accountTest and 1 or 0 self.agree = view:GetController("agree"); + self.agree.selectedIndex = 1 -- Utils.LoadBg("loginbg", view) if GameApplication.Instance.accountTest then local json_data = Utils.LoadLocalFile("userId") diff --git a/lua_probject/base_project/Game/View/PlayBackView.lua b/lua_probject/base_project/Game/View/PlayBackView.lua index 229d3c38..fef08f79 100644 --- a/lua_probject/base_project/Game/View/PlayBackView.lua +++ b/lua_probject/base_project/Game/View/PlayBackView.lua @@ -27,7 +27,8 @@ function M:init() UIPackage.AddPackage('base/chat/ui/Chat') self.cmdList = self._room.cmdList self._eventmap = {} - -- self._full = true + self._full = true + self._full_offset = false self._put_map = false self._new_hide = false self._queue = false diff --git a/lua_probject/base_project/Game/View/ResultView.lua b/lua_probject/base_project/Game/View/ResultView.lua index 249a2f0c..8c06cc3e 100644 --- a/lua_probject/base_project/Game/View/ResultView.lua +++ b/lua_probject/base_project/Game/View/ResultView.lua @@ -101,7 +101,7 @@ end function M:init(url, isBigFull) self._animation = false - self._scale = true + -- self._scale = true self._full = false if self._root then self._view = UIPackage.CreateObjectFromURL(url) diff --git a/lua_probject/base_project/Game/View/WitnessView.lua b/lua_probject/base_project/Game/View/WitnessView.lua index 91f7505c..b516266f 100644 --- a/lua_probject/base_project/Game/View/WitnessView.lua +++ b/lua_probject/base_project/Game/View/WitnessView.lua @@ -13,7 +13,8 @@ function M:init() UIPackage.AddPackage('base/chat/ui/Chat') self._eventmap = {} - self._scale = true + -- self._scale = true + self._full = true self._full_offset = false self.class = "MainView" self._style = 1 @@ -42,6 +43,10 @@ function M:InitView(url) self._state = self._view:GetController("state") self.com_notice = self._view:GetChild("com_notice") + + if self._room.self_player.entrust then + self:MarkSelfTuoguan() + end end function M:EventInit() @@ -191,11 +196,14 @@ function M:EventInit() -- 托管状态变化 if t == 5 then if p == DataManager.CurrenRoom.self_player then + local player_info = self._player_info[self:GetPos(p.seat)] if p.entrust then self:closeTipOnTuoguan() self:MarkSelfTuoguan() + player_info:MarkTuoguan() else self:UnmarkSelfTuoguan() + player_info:UnmarkTuoguan() end else local player_info = self._player_info[self:GetPos(p.seat)] @@ -209,6 +217,17 @@ function M:EventInit() end) _gamectr:AddEventListener(GameEvent.AddScore, handler(self, self.OnAddScoreAnimation)) + + _gamectr:AddEventListener( + GameEvent.PlayerState, + function(...) + printlog("lingmeng OnEventOnlineState") + local arg = { ... } + local p = arg[1] + local info = self._player_info[self:GetPos(p.seat)] + info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0 + end + ) end -- 标记自己托管 @@ -217,10 +236,11 @@ function M:MarkSelfTuoguan() return end - self._com_tuoguan = UIPackage.CreateObjectFromURL('ui://Common/com_tuoguan_self') local com_tuoguan = self._com_tuoguan - GRoot.inst:AddChild(com_tuoguan) + self._view:AddChildAt(com_tuoguan, self._view:GetChildIndex(self._view:GetChild('btn_setting')) - 1) + -- GRoot.inst:AddChild(com_tuoguan) + com_tuoguan:GetChild('btn_cancel_tuoguan').visible = false com_tuoguan:MakeFullScreen() com_tuoguan:Center() end @@ -358,22 +378,52 @@ function M:OnUpdate() end end - local _left_time = self._left_time - if _left_time and (_left_time > 0) then + local _left_time = self._left_time or 0 + if (_left_time > 0) then _left_time = _left_time - deltaTime _left_time = math.max(0, _left_time) local leftTime = math.floor(_left_time) + --旧的拼接方式 + -- if leftTime < 10 then + -- self._tex_leftTime.text = '0' .. tostring(leftTime) + -- for i = 2, 4 do + -- local text = self["_tex_leftTime" .. i] + -- if text then + -- text.text = '0' .. tostring(leftTime) + -- end + -- end + -- else + -- self._tex_leftTime.text = tostring(leftTime) + -- for i = 2, 4 do + -- local text = self["_tex_leftTime" .. i] + -- if text then + -- text.text = tostring(leftTime) + -- end + -- end + -- end self._tex_leftTime.text = string.format("%02d", _left_time) self._left_time = _left_time -- 桌面計時器聲音 if not self._curtime then self._curtime = 15 end - if leftTime <= 3 and self._curtime ~= leftTime and leftTime ~= 0 then + if leftTime <= self._leftTime_xiangling and self._curtime ~= leftTime and leftTime ~= 0 then self._curtime = leftTime GameApplication.Instance:PlaySound('base/common/sound/timeup_alarm.mp3') end + if self._leftTime_bianhong then + if leftTime <= 5 then + if self._tex_leftTime:GetController('poker_Color') then + self._tex_leftTime:GetController('poker_Color').selectedIndex = 1 + end + else + if self._tex_leftTime:GetController('poker_Color') then + self._tex_leftTime:GetController('poker_Color').selectedIndex = 0 + end + end + end else + self:onLeftTimeOver() if self._tex_leftTime then self._tex_leftTime.text = '00' end @@ -386,6 +436,10 @@ function M:OnUpdate() end end +function M:onLeftTimeOver() + +end + function M:DestroyPlayerInfo() for i = 1, #self._player_info do self._player_info[i]:Destroy() diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua index 0d77fa79..a645970f 100644 --- a/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua +++ b/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua @@ -208,12 +208,21 @@ function M:FillWitnessData(pd_data) room.left_count = _tableInfo["left_card"] room.banker_seat = bank_seat room.curren_turn_seat = active_seat + local playerList = _tableInfo["playerData"] room.curren_round = _tableInfo["round"] room.witness_player_list = _tableInfo["playerSpectatorData"] + room._flag_updateWitness = true + self:FillPlayerData(playerList) + local jing = _tableInfo["jing"] + if jing then + room.jing = jing + end local _info_list = _tableInfo["playerData"] for i = 1, #_info_list do + local tem = _info_list[i] local _jp = _info_list[i] - local p = room:NewPlayer() + local playerid = tem["aid"] + local p = room:GetPlayerById(playerid) p.seat = _jp["seat"] local online = _jp["online"] p.line_state = online diff --git a/lua_probject/extend_project/extend/majiang/jinxi/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/jinxi/ExtendConfig.lua index 59278399..16377136 100644 --- a/lua_probject/extend_project/extend/majiang/jinxi/ExtendConfig.lua +++ b/lua_probject/extend_project/extend/majiang/jinxi/ExtendConfig.lua @@ -217,16 +217,21 @@ function M:FillWitnessData(pd_data) room.left_count = _tableInfo["left_card"] room.banker_seat = bank_seat room.curren_turn_seat = active_seat + local playerList = _tableInfo["playerData"] room.curren_round = _tableInfo["round"] room.witness_player_list = _tableInfo["playerSpectatorData"] + room._flag_updateWitness = true + self:FillPlayerData(playerList) local jing = _tableInfo["jing"] if jing then room.jing = jing end local _info_list = _tableInfo["playerData"] for i = 1, #_info_list do + local tem = _info_list[i] local _jp = _info_list[i] - local p = room:NewPlayer() + local playerid = tem["aid"] + local p = room:GetPlayerById(playerid) p.seat = _jp["seat"] local online = _jp["online"] p.line_state = online diff --git a/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua index 088885a4..df25365c 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua @@ -218,16 +218,21 @@ function M:FillWitnessData(pd_data) room.left_count = _tableInfo["left_card"] room.banker_seat = bank_seat room.curren_turn_seat = active_seat + local playerList = _tableInfo["playerData"] room.curren_round = _tableInfo["round"] room.witness_player_list = _tableInfo["playerSpectatorData"] + room._flag_updateWitness = true + self:FillPlayerData(playerList) local jing = _tableInfo["jing"] if jing then room.jing = jing end local _info_list = _tableInfo["playerData"] for i = 1, #_info_list do + local tem = _info_list[i] local _jp = _info_list[i] - local p = room:NewPlayer() + local playerid = tem["aid"] + local p = room:GetPlayerById(playerid) p.seat = _jp["seat"] local online = _jp["online"] p.line_state = online diff --git a/lua_probject/extend_project/extend/majiang/nancheng/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/nancheng/ExtendConfig.lua index c70eb79b..c260e4b6 100644 --- a/lua_probject/extend_project/extend/majiang/nancheng/ExtendConfig.lua +++ b/lua_probject/extend_project/extend/majiang/nancheng/ExtendConfig.lua @@ -209,12 +209,21 @@ function M:FillWitnessData(pd_data) room.left_count = _tableInfo["left_card"] room.banker_seat = bank_seat room.curren_turn_seat = active_seat + local playerList = _tableInfo["playerData"] room.curren_round = _tableInfo["round"] room.witness_player_list = _tableInfo["playerSpectatorData"] + room._flag_updateWitness = true + self:FillPlayerData(playerList) + local jing = _tableInfo["jing"] + if jing then + room.jing = jing + end local _info_list = _tableInfo["playerData"] for i = 1, #_info_list do + local tem = _info_list[i] local _jp = _info_list[i] - local p = room:NewPlayer() + local playerid = tem["aid"] + local p = room:GetPlayerById(playerid) p.seat = _jp["seat"] local online = _jp["online"] p.line_state = online diff --git a/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua index 1bc9e548..c9edd5ca 100644 --- a/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua +++ b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua @@ -21,6 +21,10 @@ function M:FillData(view, index) -- if oldGameVersion == 1 then self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Label_Detail_Play") + + local com_editSetting = self._config:GetChild("com_editSetting") + + com_editSetting:GetController("cGps").selectedIndex = 2 -- else -- self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast_yueyang") -- end diff --git a/lua_probject/extend_project/extend/poker/runfast/EXWitnessView.lua b/lua_probject/extend_project/extend/poker/runfast/EXWitnessView.lua index 4b993274..6704c5ce 100644 --- a/lua_probject/extend_project/extend/poker/runfast/EXWitnessView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/EXWitnessView.lua @@ -631,6 +631,7 @@ function M:EventInit() self.result_view = RunFast_ResultView.new(self, info, self._room.room_id, over, win_seat, 0, remaincards) + self._ctr_inClear.selectedIndex = 0 self.result_view:SetDestroryCallback(function() for i = 1, #self._player_card_info do local card_info = self._player_card_info[i] @@ -742,6 +743,19 @@ function M:EventInit() head_info:UpdateScore(player.total_score) end end) + + --覆盖原始闹钟,原始闹钟仅限麻将使用 + _gamectr:AddEventListener( + GameEvent.TupGuanOpen, + function(...) + ---- print("刷新托管数据=====") + local arg = { ... } + local p = arg[1] + local player_card_info = self._player_card_info[self:GetPos(p.seat)] + self._tex_leftTime = player_card_info._view_comp_clock + self._left_time = tonumber(arg[3]) or 0 + end + ) end function M:NewPlayerCardInfoView(tem, index) diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua index 870719c0..7ffd2254 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua @@ -1169,6 +1169,17 @@ function M:EventInit() self._popEvent = true end) end) + + _gamectr:AddEventListener( + GameEvent.PlayerState, + function(...) + printlog("lingmeng OnEventOnlineState") + local arg = { ... } + local p = arg[1] + local info = self._player_info[self:GetPos(p.seat)] + info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0 + end + ) end function M:ReConnectForStart() diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua index f0235c8f..7798f79d 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua @@ -4,7 +4,7 @@ local M = RunFast_RightPanelView local function __init(self, mainView, view) local right_panel = view - local btn_setting = mainView._view:GetChild("Btn_Setting") + local btn_setting = mainView._view:GetChild("btn_setting") btn_setting.onClick:Set(function() local _settingView = mainView:NewSettingView() _settingView:Show() diff --git a/lua_probject/extend_project/extend/poker2/suoha/ExRightPanelView.lua b/lua_probject/extend_project/extend/poker2/suoha/ExRightPanelView.lua index dc2639b7..21ac172d 100644 --- a/lua_probject/extend_project/extend/poker2/suoha/ExRightPanelView.lua +++ b/lua_probject/extend_project/extend/poker2/suoha/ExRightPanelView.lua @@ -4,7 +4,7 @@ local M = EXRightPanelView local function __init(self, mainView, view) local right_panel = view - local btn_setting = mainView._view:GetChild("Btn_Setting") + local btn_setting = mainView._view:GetChild("btn_setting") btn_setting.onClick:Set(function() local _settingView = mainView:NewSettingView() _settingView:Show() diff --git a/lua_probject/main_project/main/majiang/MJWitnessView.lua b/lua_probject/main_project/main/majiang/MJWitnessView.lua index cd8acd8f..4670421d 100644 --- a/lua_probject/main_project/main/majiang/MJWitnessView.lua +++ b/lua_probject/main_project/main/majiang/MJWitnessView.lua @@ -32,7 +32,6 @@ end function M:InitView() local room = self._room - UIPackage.AddPackage("base/main_majiang/ui/Main_Majiang") getmetatable(M).__index.InitView(self, string.format("ui://Main_Majiang/Main_new_%d_jiangxi", room.room_config.people_num)) @@ -59,6 +58,8 @@ function M:InitView() self._view:GetChild('wanfa_text').text = gamePlay self._laiziMove = self._view:GetTransition('laiziMove') + self._leftTime_xiangling = 3 + self._left_time = 0 end function M:ClickSetting() diff --git a/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_2.xml b/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_2.xml index b6a078f2..40a4f341 100644 --- a/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_2.xml +++ b/wb_new_ui/assets/Extend_Poker_RunFastNew/RunFast_Main_New_2.xml @@ -1,6 +1,6 @@ - + @@ -9,7 +9,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -226,24 +226,6 @@ - - - - - - - - -