parent
5f7cb1b4df
commit
98443bbdb2
|
@ -1,7 +1,6 @@
|
||||||
CommonActPageManager = {}
|
CommonActPageManager = {}
|
||||||
local this = CommonActPageManager
|
local this = CommonActPageManager
|
||||||
local dataList = {}
|
local dataList = {}
|
||||||
local globalActConfig = ConfigManager.GetConfig(ConfigName.GlobalActivity)
|
|
||||||
this.TaSuiLingXiaoMsg = nil
|
this.TaSuiLingXiaoMsg = nil
|
||||||
this.TaSuiLingXiaoHistoryDmg = 0
|
this.TaSuiLingXiaoHistoryDmg = 0
|
||||||
this.DynamicActType = 0
|
this.DynamicActType = 0
|
||||||
|
@ -448,24 +447,17 @@ local TypeUpdateFunc = {
|
||||||
local curData = dataList[ActivityTypeDef.PowerRice]
|
local curData = dataList[ActivityTypeDef.PowerRice]
|
||||||
--数据
|
--数据
|
||||||
local configData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",curData.activityId)
|
local configData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",curData.activityId)
|
||||||
local gapTime = globalActConfig[curData.activityId].GapTime*86400
|
|
||||||
for i = 1, #curData.rewards do
|
for i = 1, #curData.rewards do
|
||||||
for j = 1, #configData do
|
for j = 1, #configData do
|
||||||
if curData.rewards[i].missionId == configData[j].Id then
|
if curData.rewards[i].missionId == configData[j].Id then
|
||||||
curData.rewards[i].otherData.Values = configData[j].Values
|
curData.rewards[i].otherData.Values = configData[j].Values
|
||||||
curData.rewards[i].otherData.Reward = configData[j].Reward
|
curData.rewards[i].otherData.Reward = configData[j].Reward
|
||||||
curData.rewards[i].otherData.Sort = configData[j].Sort
|
curData.rewards[i].otherData.Sort = configData[j].Sort
|
||||||
-- LogGreen("sort:"..tostring(configData[j].Sort).." state:"..tostring(curData.rewards[i].state))
|
|
||||||
end
|
|
||||||
if curData.rewards[i].state == 0 and curData.endTime - GetTimeStamp() < gapTime then
|
|
||||||
curData.rewards[i].state = 3
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.sort(curData.rewards,function (a,b)
|
table.sort(curData.rewards,function (a,b)
|
||||||
if a.state == b.state then
|
if a.state == b.state then
|
||||||
-- LogYellow("aId:"..tostring(a.missionId).." aSort:"..tostring(a.otherData.Sort).." aState:"..tostring(a.state))
|
|
||||||
-- LogYellow("bId:"..tostring(b.missionId).." ebSort:"..tostring(b.otherData.Sort).." bState:"..tostring(b.state))
|
|
||||||
return a.otherData.Sort < b.otherData.Sort
|
return a.otherData.Sort < b.otherData.Sort
|
||||||
else
|
else
|
||||||
return a.state < b.state
|
return a.state < b.state
|
||||||
|
|
|
@ -6,7 +6,6 @@ local STATE = {
|
||||||
[0] = {Img = "s_slbz_1anniuhuangse",text = Language[10556]},
|
[0] = {Img = "s_slbz_1anniuhuangse",text = Language[10556]},
|
||||||
[1] = {Img = "s_slbz_1anniuongse",text = Language[11948]},
|
[1] = {Img = "s_slbz_1anniuongse",text = Language[11948]},
|
||||||
[2] = {Img = "s_slbz_1anniuhuise",text = Language[10101]},
|
[2] = {Img = "s_slbz_1anniuhuise",text = Language[10101]},
|
||||||
[3] = {Img = "s_slbz_1anniuhuise",text = "已结束"},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local TabBoxRedPoints = {}
|
local TabBoxRedPoints = {}
|
||||||
|
@ -172,8 +171,6 @@ function PowerRice:SingleDataShow(item,data,index)
|
||||||
local state = 0
|
local state = 0
|
||||||
if data.state == 1 then
|
if data.state == 1 then
|
||||||
state = 2
|
state = 2
|
||||||
elseif data.state == 3 then
|
|
||||||
state = 3
|
|
||||||
elseif data.otherData.Values[1][1] > PlayerManager.maxForce then
|
elseif data.otherData.Values[1][1] > PlayerManager.maxForce then
|
||||||
state = 0
|
state = 0
|
||||||
else
|
else
|
||||||
|
@ -202,8 +199,6 @@ function PowerRice:SingleDataShow(item,data,index)
|
||||||
PowerRice:Refresh(curIndex,false,false)
|
PowerRice:Refresh(curIndex,false,false)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
elseif state == 3 then
|
|
||||||
PopupTipPanel.ShowTip("活动已结束")
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
getBtn:GetComponent("Button").interactable = state ~= 2
|
getBtn:GetComponent("Button").interactable = state ~= 2
|
||||||
|
|
Loading…
Reference in New Issue