百宝商会 修改提交

dev_chengFeng
jiaoyangna 2021-05-29 21:31:01 +08:00
parent c08a8f2556
commit 78f87d2b52
1 changed files with 5 additions and 3 deletions

View File

@ -90,6 +90,7 @@ function TreasureStorePopup:RefreshPanel(isAni)
local curActId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.TreasureStore)
LogGreen("curActId:"..curActId)
if not curActId then
self:ClosePanel()
return
end
rechargeId = tonumber(GlobalActivity[curActId].ShowArt)
@ -214,11 +215,13 @@ function this.TimeCountDown()
this.timer:Stop()
this.timer = nil
end
local endtime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.TreasureStore)
local endtime = CalculateSecondsNowTo_N_OClock(24)
local timeDown = endtime - GetTimeStamp()
this.time.text = Language[10023]..TimeToHMS(timeDown)
this.timer = Timer.New(function()
timeDown = timeDown - 1
if timeDown <= 0 then
timeDown = 0
this.timer:Stop()
this.timer = nil
this.timer = Timer.New(function()
@ -226,8 +229,7 @@ function this.TimeCountDown()
this:TimeCountDown()
end,1):Start()
return
end
timeDown = timeDown - 1
end
this.time.text = Language[10023]..TimeToHMS(timeDown)
end, 1, -1, true)
this.timer:Start()