【牛气冲天】提交
parent
4ccaca133e
commit
3dca94f9aa
|
@ -73,6 +73,7 @@ end
|
|||
function this.CreatSingleData(sData)
|
||||
local data = {}
|
||||
data.id = sData.Id
|
||||
data.actId = sData.ActivityId
|
||||
data.Text = sData.Text
|
||||
data.Reward = sData.Reward
|
||||
data.Sort = sData.Sort
|
||||
|
@ -136,11 +137,16 @@ function this.GetNeedRewardData(sort)
|
|||
table.insert(needData,v)
|
||||
end
|
||||
end
|
||||
local STATE = {
|
||||
[0] = 2,
|
||||
[1] = 3,
|
||||
[2] = 1,
|
||||
}
|
||||
table.sort(needData,function (a,b)
|
||||
if a.state == b.state then
|
||||
return a.id < b.id
|
||||
else
|
||||
return a.state < b.state
|
||||
return STATE[a.state] > STATE[b.state]
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
@ -152,7 +158,11 @@ function this.CheckNiuQiChongTianRedPoint(index)
|
|||
if not id or id < 1 then
|
||||
return false
|
||||
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
|
||||
if index == RedPointType.NiuQiChongTian_4 then
|
||||
isShow = this.NiuQiCheckRedPoint4()
|
||||
|
|
Loading…
Reference in New Issue