From a26b2b7829e3cdf2f24566694e6e7ac33dbbb006 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 29 Apr 2021 21:17:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E4=BC=9A=E5=88=B7=E6=96=B0=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Shop/ShopManager.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Shop/ShopManager.lua b/Assets/ManagedResources/~Lua/Modules/Shop/ShopManager.lua index 22200acf35..c752e8cdfd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Shop/ShopManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Shop/ShopManager.lua @@ -734,13 +734,16 @@ function this.CountShopRefreshLeftTime(shopId) -- return lastTime < 0 and 0 or lastTime --- 按时间长度刷新 elseif shopInfo.RefreshType[1] == 3 then - local shopData = this.GetShopDataByType(shopType) - -- local lastRefreshTime = shopData.lastRefreshTime / 1000 - -- local deltaSeconds = shopInfo.RefreshType[2] * 60 * 60 - -- local lastTime = lastRefreshTime + deltaSeconds - GetTimeStamp() - -- return lastTime < 0 and 0 or lastTime - -- LogPink("shopData.endTime:"..tostring(shopData.endTime)) - return shopData.endTime/1000 - GetTimeStamp() + local shopData = this.GetShopDataByType(shopType) + if shopType == 12 then + local lastRefreshTime = shopData.lastRefreshTime / 1000 + local deltaSeconds = shopInfo.RefreshType[2] * 60 * 60 + local lastTime = lastRefreshTime + deltaSeconds - GetTimeStamp() + return lastTime < 0 and 0 or lastTime + else + return shopData.endTime/1000 - GetTimeStamp() + end + end end --- 获取刷新剩余时间