From 78f87d2b52c221aecb07adf1606b8a4671171b31 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 29 May 2021 21:31:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BE=E5=AE=9D=E5=95=86=E4=BC=9A=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/TreasureStore/TreasureStorePopup.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua b/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua index f0ed45f10e..2321597c1a 100644 --- a/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua @@ -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()