From a9b13b206c4985ed7e8e33f35599b879db115726 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Fri, 2 Jun 2023 16:09:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=B1=E6=B2=B3=E8=AE=BE=E8=AE=A1=E5=9B=BE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=80=E6=9C=8D=E6=97=B6=E9=97=B4=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FightLevel/FightLevelChapterPanel.lua | 17 +++++++++++++---- .../Modules/FightLevel/FightLevelManager.lua | 8 +++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelChapterPanel.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelChapterPanel.lua index 6aa618cdc5..32730b1f48 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelChapterPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelChapterPanel.lua @@ -124,6 +124,8 @@ function this.SingleChapterDataShow(go, data,index) curCurIndexImageList[i] = Util.GetGameObject(curIndexImageParent, "curIndexImage (" .. i .. ")") curCurIndexImageList[i]:SetActive(#data.config.BigNumber == i) end + local curTime=GetTimeStamp() + local isTimeOpen= curTime>=PlayerManager.GetServerOpenTime()+data.config.OpenTime*24*60*60 Util.GetGameObject(go, "redPoint"):SetActive(FightLevelManager.GetSingleChapterRewardBoxRedPoint(data.chapterId)) if curChapterId == data.chapterId then if npc then @@ -169,16 +171,23 @@ function this.SingleChapterDataShow(go, data,index) PopupTipPanel.ShowTip(Language[11131]) return end - if PlayerManager.level >= data.config.Open then + if PlayerManager.level < data.config.Open then + PopupTipPanel.ShowTip(string.format("到达%s级后解锁!",data.config.Open)) + return + end + if not isTimeOpen then + PopupTipPanel.ShowTip(string.format("开服%s天后解锁!",data.config.OpenTime)) + return + end if curChapterId >= data.chapterId then UIManager.OpenPanel(UIName.FightLevelSingleChapterPanel,data.chapterId) FightLevelManager.curSelect = index elseif curChapterId < data.chapterId then PopupTipPanel.ShowTip("通关上一章后解锁!") end - else - PopupTipPanel.ShowTip(string.format("到达%s级后解锁!",data.config.Open)) - end + + + end) end diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua index d06f70ce9b..2f009e8af8 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua @@ -58,7 +58,13 @@ function this.UpdataChapterData(msg,isEnd,_isShowChapterOpenPopup) local singleHardStageChapter = allChapterData[msg.chapter[i].chapterId] ----Log("chapterId:"..msg.chapter[i].chapterId)--.." stars"..msg.chapter[i].stars.." node"..#msg.chapter[i].node.."reward:"..#msg.chapter[i].reward.." needStars:"..singleHardStageChapter.stars) singleHardStageChapter.chapterId = msg.chapter[i].chapterId - if singleHardStageChapter.chapterId > oldChapterId and _isShowChapterOpenPopup then + local timeIsOpen=false + local chapterConfig=ConfigManager.TryGetConfigData(ConfigName.HardStageChapter,singleHardStageChapter.chapterId) + if chapterConfig then + local curTime=GetTimeStamp() + timeIsOpen=curTime>=PlayerManager.GetServerOpenTime()+chapterConfig.OpenTime*24*60*60 + end + if singleHardStageChapter.chapterId > oldChapterId and _isShowChapterOpenPopup and timeIsOpen then this.SetisShowChapterOpenPopup(true) end this.SetCurChapterId(singleHardStageChapter.chapterId)