diff --git a/Assets/ManagedResources/~Lua/Modules/RatioNumber/RatioNumberLevelPanel.lua b/Assets/ManagedResources/~Lua/Modules/RatioNumber/RatioNumberLevelPanel.lua index 00f8c5b07e..9c9efbe97d 100644 --- a/Assets/ManagedResources/~Lua/Modules/RatioNumber/RatioNumberLevelPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RatioNumber/RatioNumberLevelPanel.lua @@ -75,12 +75,12 @@ function RatioNumberLevelPanel:BindEvent() Util.AddClick(this.btn_reward, function () - if RatioNumberManager.gameIndex==0 then + if RatioNumberManager.gameIndex==1 then PopupTipPanel.ShowTip("至少通关一层才可领取挂机奖励") return end LogError("GetTimeStamp()=="..GetTimeStamp().." showTime=="..RatioNumberManager.rewardStartTime) - if GetTimeStamp()-RatioNumberManager.rewardStartTime<360 then + if GetTimeStamp()- RatioNumberManager.rewardStartTime < 360 then PopupTipPanel.ShowTip("累计挂机奖励中") return end @@ -206,12 +206,15 @@ function this.GetBoxShowState(hangupTime) local state = 0 local curTime=GetTimeStamp() LogError("curTime=========="..curTime.." hangupTime== "..hangupTime) - local addTime=curTime-hangupTime - if addTime>maxTime then - hangupTime=maxTime - else - hangupTime=addTime + if hangupTime>0 then + local addTime=curTime-hangupTime + if addTime>maxTime then + hangupTime=maxTime + else + hangupTime=addTime + end end + LogError("hangupTime==========================="..hangupTime) if hangupTime < AdventureManager.adventureRefresh then state = 0 diff --git a/Assets/ManagedResources/~Lua/Modules/RatioNumber/RatioNumberManager.lua b/Assets/ManagedResources/~Lua/Modules/RatioNumber/RatioNumberManager.lua index 71d9dc0d98..f4af80e62b 100644 --- a/Assets/ManagedResources/~Lua/Modules/RatioNumber/RatioNumberManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/RatioNumber/RatioNumberManager.lua @@ -46,8 +46,14 @@ function RatioNumberManager.Init(msg) this.chapterId =this.chapterId + 1 end this.rewardIdArr = msg.rewardIdArr + LogError("this.gameindex====================================="..this.gameIndex) if msg.rewardStartTime then this.rewardStartTime = msg.rewardStartTime + else + if this.rewardStartTime==0 then + this.rewardStartTime=GetTimeStamp() + end + LogError("this.rewardStartTime======================================================"..this.rewardStartTime) end RatioNumberManager.SelectInit()