From a30616a9fc96f247249d7cd3143ce824eab958ea Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Sat, 22 May 2021 15:26:30 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=B1=B1=E6=B2=B3=E7=A4=BE=E7=A8=B7?= =?UTF-8?q?=E5=9B=BE=E3=80=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/FightLevel/FightLevelManager.lua | 2 +- .../FightLevelSingleChapterPanel.lua | 21 ++++++++++++------- .../View/FightLevelInfoPopup_MainLevel.lua | 2 +- .../~Lua/Modules/Net/IndicationManager.lua | 5 +++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua index 8ec19d6b01..2e63adbde0 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua @@ -136,7 +136,7 @@ end function this.HardStageReportRequset(_fightLevelData, callBack) NetManager.HardStageReportRequset( _fightLevelData.nodeId,function (msg)--FIGHT_LEVEL _fightLevelData.config.Chapter, if msg.player and #msg.player > 0 then - UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.BackBattle,msg.player,_fightLevelData) + UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.BackBattle,msg.player,_fightLevelData,callBack) else PopupTipPanel.ShowTip("尚无符合条件的回放!") end diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelSingleChapterPanel.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelSingleChapterPanel.lua index dacdc4215d..3ce1583d7b 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelSingleChapterPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelSingleChapterPanel.lua @@ -102,10 +102,15 @@ function this.OnShowPanel() end function this.ShowChapterPoint() + local allNodeDatas = {} + for key, value in pairs(chapterData.node) do + table.insert(allNodeDatas,value) + end + table.sort(allNodeDatas, function(a,b) return a.nodeId < b.nodeId end) local num = 0 - for i = 1, #chapterData.node do - if chapterData.node[i].config.UselessPoint then - for j = 1, #chapterData.node[i].config.UselessPoint do + for i = 1, #allNodeDatas do + if allNodeDatas[i].config.UselessPoint then + for j = 1, #allNodeDatas[i].config.UselessPoint do num = num + 1 end end @@ -123,13 +128,13 @@ function this.ShowChapterPoint() go.gameObject:SetActive(false) end local index = 0 - for i = 1, #chapterData.node do - local isOpen = this.GetCurLevelIsOpen(chapterData.node[i])-- -1 未开启 0 开启 1 需解锁上一关 2 等级不足 - if chapterData.node[i].config.UselessPoint then - for j = 1, #chapterData.node[i].config.UselessPoint do + for i = 1, #allNodeDatas do + local isOpen = this.GetCurLevelIsOpen(allNodeDatas[i])-- -1 未开启 0 开启 1 需解锁上一关 2 等级不足 + if allNodeDatas[i].config.UselessPoint then + for j = 1, #allNodeDatas[i].config.UselessPoint do index = index + 1 allSmallPoint[index].gameObject:SetActive(true) - allSmallPoint[index].transform.localPosition = Vector3.New(chapterData.node[i].config.UselessPoint[j][1],chapterData.node[i].config.UselessPoint[j][2],0) + allSmallPoint[index].transform.localPosition = Vector3.New(allNodeDatas[i].config.UselessPoint[j][1],allNodeDatas[i].config.UselessPoint[j][2],0) local image = allSmallPoint[index]:GetComponent("Image") image.sprite = this.spLoader:LoadSprite(isOpen == 0 and point[1] or point[2]) end diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/View/FightLevelInfoPopup_MainLevel.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/View/FightLevelInfoPopup_MainLevel.lua index 8a71fd9e22..1ec17caef1 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/View/FightLevelInfoPopup_MainLevel.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/View/FightLevelInfoPopup_MainLevel.lua @@ -44,7 +44,7 @@ function this:BindEvent() end) Util.AddClick(this.BackBattleBtn, function() FightLevelManager.HardStageReportRequset(fightLevelData, function() - -- UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.MainLevel,fightLevelData) + UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.MainLevel,fightLevelData) end) end) Util.AddClick(this.rewardBtn, function() diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua index de6582351b..7ebaff02f4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua @@ -17,7 +17,7 @@ function this.RegisterMessage(network) --监听红点推送 socket:RegistNetMessage(MessageTypeProto_pb.SEND_RED_POINT_INDICATION, this.ReceiveRedPoint) --福利红包推送 - socket:RegistNetMessage(MessageTypeProto_pb.WELFARE_RED_PACKET_INFO, this.WelfareRedPacketPush) + -- socket:RegistNetMessage(MessageTypeProto_pb.WELFARE_RED_PACKET_INFO, this.WelfareRedPacketPush) socket:RegistNetMessage(MessageTypeProto_pb.UPDATE_BAG_INDICATION, this.BackUpDataBagItemIdNumber) socket:RegistNetMessage(MessageTypeProto_pb.SEND_CHAT_INFO_INDICATION, this.ReceiveFriendChat) @@ -920,7 +920,8 @@ function this.BackPatFaceData(buffer) msg:ParseFromString(data) PatFaceManager.SetPatFaceDaqta(msg) end ---后端拍脸推送 + +--山河社稷图推送 function this.HardStageResponse(buffer) local data = buffer:DataByte() local msg = PlayerInfoProto_pb.HardStageResponse()