【限时活动】增加日限时累充
parent
2051a59d74
commit
d1bbe68ebf
|
@ -41,11 +41,11 @@ local expertRedPointGrid = {}--红点
|
|||
-- local WeekCard = require("Modules/Expert/WeekCard")
|
||||
-- local PatFace = require("Modules/Expert/PatFace")
|
||||
-- local DiffMonsterBuy = require("Modules/Expert/DiffMonsterBuy")
|
||||
local ExChange = require("Modules/Expert/ExChange")
|
||||
local Expert = require("Modules/Expert/Expert")
|
||||
local ExChange = require("Modules/Expert/ExChange")--4
|
||||
local Expert = require("Modules/Expert/Expert")--1
|
||||
-- local HeHeHe = require("Modules/Expert/HeroStarFeedPage")
|
||||
local Expert_UpLv = require("Modules/Expert/Expert_UpLv")
|
||||
local ContinuityRechargePage = require("Modules/Operating/ContinuityRechargePage") --积天豪礼
|
||||
local Expert_UpLv = require("Modules/Expert/Expert_UpLv")--2
|
||||
local ContinuityRechargePage = require("Modules/Operating/ContinuityRechargePage") --积天豪礼3
|
||||
--local GiftBuy = require("Modules/Expert/GiftBuy") --限时抢购
|
||||
|
||||
local diffMonsterBuyData = {}--异妖直购数据
|
||||
|
|
|
@ -136,7 +136,7 @@ function ExpertPage:ShowSingleData(item,sdata,index)
|
|||
return
|
||||
end
|
||||
item.gameObject:SetActive(true)
|
||||
self.ItemList[item]:SetData(sdata,self,self.sortingOrder,self.ActData.activityId)
|
||||
self.ItemList[item]:SetData(sdata,self,self.sortingOrder,self.ActData.activityId,self.ActData.value,self.actConfig)
|
||||
end
|
||||
|
||||
function ExpertPage:RefreshTime()
|
||||
|
@ -149,7 +149,11 @@ function ExpertPage:RefreshTime()
|
|||
self.localTimer = nil
|
||||
end
|
||||
self.time:SetActive(true)
|
||||
local freshTime = self.ActData.endTime - GetTimeStamp()
|
||||
local time = self.ActData.endTime
|
||||
if self.actConfig.ActiveType == ActivityTypeDef.AccumulativeRechargeExper then--日限时累充
|
||||
time = CalculateSecondsNowTo_N_OClock(0)
|
||||
end
|
||||
local freshTime = leftTime - GetTimeStamp()
|
||||
self.timeText.text = Language[10023]..TimeToFelaxible(freshTime)
|
||||
self.localTimer = Timer.New(function ()
|
||||
freshTime = freshTime - 1
|
||||
|
|
|
@ -39,11 +39,13 @@ end
|
|||
function ExpertPre:OnOpen()
|
||||
end
|
||||
|
||||
function ExpertPre:SetData(_data,_parent,_sortingOrder,_activityId)
|
||||
function ExpertPre:SetData(_data,_parent,_sortingOrder,_activityId,_value,_configData)
|
||||
self.data = _data
|
||||
self.parent = _parent
|
||||
self.sortingOrder = _sortingOrder
|
||||
self.activityId = _activityId
|
||||
self.actConfig = _configData
|
||||
self.value = _value
|
||||
self:Refresh()
|
||||
end
|
||||
|
||||
|
@ -66,11 +68,30 @@ end
|
|||
|
||||
function ExpertPre:SetButton(sConFigData)
|
||||
|
||||
local value = sConFigData.Values[2][1]
|
||||
if self.actConfig.ActiveType == ActivityTypeDef.AccumulativeRechargeExper then--日限时累充
|
||||
value = sConFigData.Values[1][1]
|
||||
end
|
||||
|
||||
local state = 0
|
||||
if self.data.state == 0 then
|
||||
state = self.data.progress >= sConFigData.Values[2][1] and 0 or 1
|
||||
else
|
||||
state = 2
|
||||
if self.actConfig.ActiveType == ActivityTypeDef.UpStarExper or self.actConfig.ActiveType == ActivityTypeDef.Talisman
|
||||
or self.actConfig.ActiveType == ActivityTypeDef.SoulPrint or self.actConfig.ActiveType == ActivityTypeDef.EquipExper
|
||||
or self.actConfig.ActiveType == ActivityTypeDef.FindTreasureExper or self.actConfig.ActiveType == ActivityTypeDef.ExpeditionExper then--进阶因为每个都不一样 特殊判断
|
||||
if self.data.progress < value then
|
||||
state = 10
|
||||
else
|
||||
state = 0
|
||||
end
|
||||
else
|
||||
if self.value < value then
|
||||
state = 10
|
||||
else
|
||||
state = 0
|
||||
end
|
||||
end
|
||||
elseif self.data.state == 1 then
|
||||
state = 20
|
||||
end
|
||||
|
||||
local btnData = BtnState[state]
|
||||
|
@ -78,7 +99,16 @@ function ExpertPre:SetButton(sConFigData)
|
|||
Util.SetGray(self.btnGet,btnData.isGray)
|
||||
self.redPoint:SetActive(btnData.isRed)
|
||||
self.btnText.text = btnData.Text
|
||||
self.info.text =string.format("%s/%s",self.data.progress,sConFigData.Values[2][1])
|
||||
|
||||
if self.actConfig.ActiveType == ActivityTypeDef.UpStarExper or self.actConfig.ActiveType == ActivityTypeDef.Talisman
|
||||
or self.actConfig.ActiveType == ActivityTypeDef.SoulPrint or self.actConfig.ActiveType == ActivityTypeDef.EquipExper
|
||||
or self.actConfig.ActiveType == ActivityTypeDef.FindTreasureExper or self.actConfig.ActiveType == ActivityTypeDef.ExpeditionExper then--进阶因为每个都不一样 特殊判断
|
||||
self.info.text =string.format("%s/%s",self.data.progress,value)
|
||||
else
|
||||
self.info.text =string.format("%s/%s",self.value,value)
|
||||
end
|
||||
|
||||
|
||||
Util.AddOnceClick(self.btnGet, function()
|
||||
if state == 0 then
|
||||
NetManager.GetActivityRewardRequest(self.data.missionId, self.activityId, function(drop)
|
||||
|
|
Loading…
Reference in New Issue