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)