parent
ebfd313e12
commit
fdc4d2f203
|
|
@ -908,10 +908,9 @@ function this.GetAllRewardData()
|
|||
if v.Reward then
|
||||
for n,m in ipairs(v.Reward) do
|
||||
if m.type == 2 then
|
||||
table.insert(rewardData1,m)
|
||||
if id >= v.Id then
|
||||
table.insert(rewardData,m)
|
||||
else
|
||||
table.insert(rewardData1,m)
|
||||
end
|
||||
else
|
||||
if (v.state == 4 and id >= v.Id) or v.state == 2 then
|
||||
|
|
|
|||
|
|
@ -168,7 +168,6 @@ function this:showRewardQinglong()
|
|||
end
|
||||
return lv
|
||||
end
|
||||
LogGreen("level:"..Getlv(curScore))
|
||||
for i = 1,#strs do
|
||||
local strs1 = string.split(strs[i],"#")
|
||||
if tonumber(strs1[1]) == QinglongSerectTreasureManager.scoreId then
|
||||
|
|
@ -176,7 +175,6 @@ function this:showRewardQinglong()
|
|||
end
|
||||
end
|
||||
local level = Getlv(curScore)
|
||||
LogGreen("level:"..level)
|
||||
for i = 1, #rewardData do
|
||||
-- body
|
||||
local reward = rewardData[i]
|
||||
|
|
@ -184,31 +182,21 @@ function this:showRewardQinglong()
|
|||
local id = reward.Reward[j].item[1]
|
||||
local num = reward.Reward[j].item[2]
|
||||
if reward.Reward[j].type == 2 then
|
||||
if reward.state == 1 or reward.state == 0 then
|
||||
if not direct[id] then
|
||||
direct[id] = 0
|
||||
end
|
||||
direct[id] = direct[id] + num
|
||||
elseif reward.state == -2 then
|
||||
if not indirect[id] then
|
||||
indirect[id] = 0
|
||||
end
|
||||
indirect[id] = indirect[id] + num
|
||||
|
||||
if reward.state ~= -1 then
|
||||
if level >= reward.level then
|
||||
if not direct[id] then
|
||||
direct[id] = 0
|
||||
end
|
||||
direct[id] = direct[id] + num
|
||||
else
|
||||
if not indirect[id] then
|
||||
indirect[id] = 0
|
||||
end
|
||||
indirect[id] = indirect[id] + num
|
||||
end
|
||||
end
|
||||
else
|
||||
if reward.state == 0 then
|
||||
if not direct[id] then
|
||||
direct[id] = 0
|
||||
end
|
||||
direct[id] = direct[id] + num
|
||||
elseif reward.state == -2 then
|
||||
if reward.state == 0 or reward.state == -2 then
|
||||
if level >= reward.level then
|
||||
if not direct[id] then
|
||||
direct[id] = 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue