【牛气冲天】提交

dev_chengFeng
ZhangBiao 2021-10-15 17:14:27 +08:00
parent 4ccaca133e
commit 3dca94f9aa
1 changed files with 12 additions and 2 deletions

View File

@ -73,6 +73,7 @@ end
function this.CreatSingleData(sData) function this.CreatSingleData(sData)
local data = {} local data = {}
data.id = sData.Id data.id = sData.Id
data.actId = sData.ActivityId
data.Text = sData.Text data.Text = sData.Text
data.Reward = sData.Reward data.Reward = sData.Reward
data.Sort = sData.Sort data.Sort = sData.Sort
@ -136,11 +137,16 @@ function this.GetNeedRewardData(sort)
table.insert(needData,v) table.insert(needData,v)
end end
end end
local STATE = {
[0] = 2,
[1] = 3,
[2] = 1,
}
table.sort(needData,function (a,b) table.sort(needData,function (a,b)
if a.state == b.state then if a.state == b.state then
return a.id < b.id return a.id < b.id
else else
return a.state < b.state return STATE[a.state] > STATE[b.state]
end end
end) end)
end end
@ -152,7 +158,11 @@ function this.CheckNiuQiChongTianRedPoint(index)
if not id or id < 1 then if not id or id < 1 then
return false return false
end end
for k = #this.rewardData, 1 , -1 do
if this.rewardData[k].actId ~= id then
table.remove( this.rewardData,k)
end
end
local isShow = false local isShow = false
if index == RedPointType.NiuQiChongTian_4 then if index == RedPointType.NiuQiChongTian_4 then
isShow = this.NiuQiCheckRedPoint4() isShow = this.NiuQiCheckRedPoint4()