山河设计图添加开服时间限制
parent
f0ce97f220
commit
a9b13b206c
|
@ -124,6 +124,8 @@ function this.SingleChapterDataShow(go, data,index)
|
||||||
curCurIndexImageList[i] = Util.GetGameObject(curIndexImageParent, "curIndexImage (" .. i .. ")")
|
curCurIndexImageList[i] = Util.GetGameObject(curIndexImageParent, "curIndexImage (" .. i .. ")")
|
||||||
curCurIndexImageList[i]:SetActive(#data.config.BigNumber == i)
|
curCurIndexImageList[i]:SetActive(#data.config.BigNumber == i)
|
||||||
end
|
end
|
||||||
|
local curTime=GetTimeStamp()
|
||||||
|
local isTimeOpen= curTime>=PlayerManager.GetServerOpenTime()+data.config.OpenTime*24*60*60
|
||||||
Util.GetGameObject(go, "redPoint"):SetActive(FightLevelManager.GetSingleChapterRewardBoxRedPoint(data.chapterId))
|
Util.GetGameObject(go, "redPoint"):SetActive(FightLevelManager.GetSingleChapterRewardBoxRedPoint(data.chapterId))
|
||||||
if curChapterId == data.chapterId then
|
if curChapterId == data.chapterId then
|
||||||
if npc then
|
if npc then
|
||||||
|
@ -169,16 +171,23 @@ function this.SingleChapterDataShow(go, data,index)
|
||||||
PopupTipPanel.ShowTip(Language[11131])
|
PopupTipPanel.ShowTip(Language[11131])
|
||||||
return
|
return
|
||||||
end
|
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
|
if curChapterId >= data.chapterId then
|
||||||
UIManager.OpenPanel(UIName.FightLevelSingleChapterPanel,data.chapterId)
|
UIManager.OpenPanel(UIName.FightLevelSingleChapterPanel,data.chapterId)
|
||||||
FightLevelManager.curSelect = index
|
FightLevelManager.curSelect = index
|
||||||
elseif curChapterId < data.chapterId then
|
elseif curChapterId < data.chapterId then
|
||||||
PopupTipPanel.ShowTip("通关上一章后解锁!")
|
PopupTipPanel.ShowTip("通关上一章后解锁!")
|
||||||
end
|
end
|
||||||
else
|
|
||||||
PopupTipPanel.ShowTip(string.format("到达%s级后解锁!",data.config.Open))
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,13 @@ function this.UpdataChapterData(msg,isEnd,_isShowChapterOpenPopup)
|
||||||
local singleHardStageChapter = allChapterData[msg.chapter[i].chapterId]
|
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)
|
----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
|
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)
|
this.SetisShowChapterOpenPopup(true)
|
||||||
end
|
end
|
||||||
this.SetCurChapterId(singleHardStageChapter.chapterId)
|
this.SetCurChapterId(singleHardStageChapter.chapterId)
|
||||||
|
|
Loading…
Reference in New Issue