【重置优化】将游戏中的各个玩法重置时间统一调整至0点

dev_chengFeng
zhangqiang 2021-01-04 14:27:18 +08:00
parent 80229417d4
commit ed65735dc5
14 changed files with 17 additions and 16 deletions

View File

@ -310,7 +310,7 @@ function this.CheckRedFunc(redType)
number = number + 1
end
end
local curDay = math.ceil((CalculateSecondsNowTo_N_OClock(24) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
local curDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
if (number < curDay) then
return true
else

View File

@ -310,7 +310,7 @@ function this.CheckRedFunc(redType)
number = number + 1
end
end
local curDay = math.ceil((CalculateSecondsNowTo_N_OClock(24) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
local curDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
if (number < curDay) then
return true
else

View File

@ -4,7 +4,7 @@ local customEventConfig = ConfigManager.GetConfig(ConfigName.CustomEventConfig)
function this.SetisFirstLogVal(isDayFirst)
if isDayFirst == 0 then--今天第一次登陆
-- LogGreen("埋点上报数据 "..CalculateSecondsNowTo_N_OClock(24).." "..GetTimeStamp().." "..PlayerManager.userCreateTime)
local cur24Times = CalculateSecondsNowTo_N_OClock(24) + GetTimeStamp()
local cur24Times = CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp()
local day = math.floor((cur24Times - PlayerManager.userCreateTime)/86400) + 1
-- LogGreen("day "..day)
--发送埋点数据

View File

@ -93,7 +93,7 @@ function DynamicTaskPage:SetTime()
end
local five_timeDown
local week_timeDown
five_timeDown = CalculateSecondsNowTo_N_OClock(5)
five_timeDown = CalculateSecondsNowTo_N_OClock(0)
week_timeDown = endtime - GetTimeStamp()
for k,v in pairs(singleTaskPre) do
-- v.com.gameObject:SetActive(true)

View File

@ -84,7 +84,7 @@ function LeiJiChongZhiPage:OnShowData()
allData =OperatingManager.InitLeiJiChongZhiData(curtype)
if allData then
if curtype == ActivityTypeDef.AccumulativeRechargeExper then
endtime = CalculateSecondsNowTo_N_OClock(5)
endtime = CalculateSecondsNowTo_N_OClock(0)
this.text1.text = "每日累计充值金额达到条件,即可领取限时豪礼"
this.text2.text = "(购买礼包或者充值妖晶均计算在内)"
else

View File

@ -284,7 +284,7 @@ function LingShouBaoGe:TimeCountDown()
this.timer = nil
end
local timeDown=CalculateSecondsNowTo_N_OClock(5)
local timeDown=CalculateSecondsNowTo_N_OClock(0)
this.tip1.text = TimeToHMS(timeDown)..Language[12200]
local timeDown2 = ActData.endTime - GetTimeStamp()
this.leftTime.text = Language[10028]..TimeToFelaxible(timeDown2)

View File

@ -240,7 +240,7 @@ end
--时间
function QianKunBox:timeCountDown()
local timeDown=CalculateSecondsNowTo_N_OClock(5)--领取按钮的倒计时
local timeDown=CalculateSecondsNowTo_N_OClock(0)--领取按钮的倒计时
self.btnTime.text = TimeToHMS(timeDown)
-- self.shopData = ShopManager.GetShopDataByType(SHOP_TYPE.QIANKUNBOX_SHOP)--获取活动信息
self.shopData =ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.QianKunBox)

View File

@ -500,7 +500,7 @@ function TimeLimitedCall:TimeCountDown()
self.timer:Stop()
self.timer = nil
end
local timeDown=CalculateSecondsNowTo_N_OClock(5)--ActivityGiftManager.GetTaskRemainTime(ActivityTypeDef.FindFairy)
local timeDown=CalculateSecondsNowTo_N_OClock(0)--ActivityGiftManager.GetTaskRemainTime(ActivityTypeDef.FindFairy)
self.timeupdate.text = TimeToHMS(timeDown)..Language[12200]
self.timer = Timer.New(function()
if timeDown < 1 then

View File

@ -288,7 +288,7 @@ function XiangYaoDuoBao:TimeCountDown()
this.timer = nil
end
local timeDown=CalculateSecondsNowTo_N_OClock(5)
local timeDown=CalculateSecondsNowTo_N_OClock(0)
this.tip1.text = TimeToHMS(timeDown)..Language[12200]
local timeDown2 = ActData.endTime - GetTimeStamp()
this.leftTime.text = Language[12230]..TimeToFelaxible(timeDown2)

View File

@ -61,7 +61,7 @@ end
function EightDayGiftPanel:Refresh()
rewardData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.EightDayGift)
curDay = math.ceil((CalculateSecondsNowTo_N_OClock(5) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
curDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
-- LogYellow((CalculateSecondsNowTo_N_OClock(5) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
-- LogGreen((CalculateSecondsNowTo_N_OClock(24) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
@ -169,7 +169,7 @@ function EightDayGiftPanel:SetSingleReward(item,i)
local reward = Util.GetGameObject(item,"kuang/reward")
local event = Util.GetGameObject(item,"kuang/reward/event")
local day = Util.GetGameObject(item,"kuang/reward/days"):GetComponent("Text")
day.text = TimeToHMS(CalculateSecondsNowTo_N_OClock(24))
day.text = TimeToHMS(CalculateSecondsNowTo_N_OClock(0))
local icon = Util.GetGameObject(item,"kuang/reward/icon")
local name = Util.GetGameObject(item,"kuang/Button/name"):GetComponent("Text")
local btnGet = Util.GetGameObject(item,"kuang/Button")
@ -264,7 +264,7 @@ function EightDayGiftPanel:SetRemainTime(day,i)
end
if not self.localTimer then
self.localTimer = Timer.New(function ()
local t = CalculateSecondsNowTo_N_OClock(5)
local t = CalculateSecondsNowTo_N_OClock(0)
if t-1 < 0 then
Timer.New(function()
if Live then

View File

@ -146,7 +146,7 @@ function Expert:OnShowData(index)
end
end
if numExChange[activeIndext] == ActivityTypeDef.AccumulativeRechargeExper then--今日累计充值特殊判断
PatFaceManager.RemainTimeDown(this.timeTextExpertgo,this.timeTextExpert,CalculateSecondsNowTo_N_OClock(5))
PatFaceManager.RemainTimeDown(this.timeTextExpertgo,this.timeTextExpert,CalculateSecondsNowTo_N_OClock(0))
else
PatFaceManager.RemainTimeDown(this.timeTextExpertgo,this.timeTextExpert,expertRewardTabs.endTime - GetTimeStamp())
end

View File

@ -65,6 +65,7 @@ local mainDynamicActivityIcon = {
[13] = "r_zjm_huodongicon-bowenduoshi", ----博文多识
[14] = "r_zjm_huodongicon-tianxiangjiren", ----天相吉人
[15] = "r_zjm_huodongicon-suoxiangpimi", ----所向披靡
[16] = "r_zjm_huodongicon-xialuxiangfeng", ----狭路相逢
}
function this:AddFuncItem(btnGO, pos)
return {go = btnGO, open = Util.GetGameObject(btnGO, "open"), lock = Util.GetGameObject(btnGO, "lock"), pos = pos}
@ -1882,7 +1883,7 @@ end
function this.RefreshSevenGiftPreview()
--判断今日是否有可领取
local isHaveGift = ActivityGiftManager.CheckSevenDayRed()
local curDay = math.ceil((CalculateSecondsNowTo_N_OClock(24) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
local curDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
local itemId=0
if isHaveGift then
local haveGiftList=nil

View File

@ -246,7 +246,7 @@ function PokemonSummonPanel:timeCountDown()
if freeTime>0 then
self.oneHintTxt.text=string.format(Language[12400],freeTime)
else
local timeDown = CalculateSecondsNowTo_N_OClock(5)--领取按钮的倒计时
local timeDown = CalculateSecondsNowTo_N_OClock(0)--领取按钮的倒计时
self.oneHintTxt.text =string.format(Language[12412],TimeToHMS(timeDown))
--免费次数刷新倒计时
self.timer = Timer.New(function()

View File

@ -257,7 +257,7 @@ function this.TimeCountDown()
this.timer:Stop()
this.timer = nil
end
local timeDown=CalculateSecondsNowTo_N_OClock(5)
local timeDown=CalculateSecondsNowTo_N_OClock(0)
timeList[1].timeObj.text = Language[10028]..TimeToHMS(timeDown)
timeList[2].timeObj.text=Language[10028]..TimeToHMS(timeDown)
this.timer = Timer.New(function()