【秘宝试炼】周试炼刷新后时间显示负,青龙秘宝结束不关闭
parent
8a4f24ce77
commit
c2ec9c93f8
|
|
@ -316,6 +316,7 @@ function this:ShowTime(endtime)
|
|||
if timeDown < 1 then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
this.Closefunction()
|
||||
return
|
||||
end
|
||||
timeDown = timeDown - 1
|
||||
|
|
|
|||
|
|
@ -65,9 +65,9 @@ end
|
|||
|
||||
function this:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess, this.refresh,curType)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.TreasureOfHeaven.TaskRefresh, this.refresh,curType)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.TreasureOfHeaven.TaskRefresh, this.RefreshTime)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Activity.OnActivityOpenOrClose,this.CloseFunction)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.MoneyPay.OnPayResultSuccess, this.refresh)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.MoneyPay.OnPayResultSuccess, this.refresh,curType)
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
|
|
@ -77,6 +77,12 @@ function this:RemoveListener()
|
|||
Game.GlobalEvent:RemoveEvent(GameEvent.MoneyPay.OnPayResultSuccess)
|
||||
end
|
||||
|
||||
function this.RefreshTime()
|
||||
NetManager.RefreshTimeSLRequest(function (msg)
|
||||
this.refresh(curType)
|
||||
end)
|
||||
end
|
||||
|
||||
this.Closefunction = function()
|
||||
Timer.New(function()
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) then
|
||||
|
|
@ -213,7 +219,7 @@ function this:ShowTime(curType)
|
|||
end
|
||||
local endtime = curType == 1
|
||||
and QinglongSerectTreasureManager.GetTrailWeekTime()
|
||||
or ActivityGiftManager.GetTaskEndTime(8)
|
||||
or ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.TreasureOfSomeBody)
|
||||
LogBlue("endtime:"..endtime)
|
||||
local timeDown = endtime - GetTimeStamp()
|
||||
this.remainTime.text = Language[12321]..TimeToDHMS(timeDown)
|
||||
|
|
|
|||
Loading…
Reference in New Issue