parent
f0b9e1d8e6
commit
970a96b4f4
|
@ -155,23 +155,28 @@ function this:showRewardQinglong()
|
|||
local config = ConfigManager.GetConfigData(ConfigName.SpecialConfig,16)
|
||||
local strs = string.split(config.Value,"|")
|
||||
local curScore = BagManager.GetItemCountById(QinglongSerectTreasureManager.scoreId)
|
||||
local Getlv = function(curScore)
|
||||
local lv = 0
|
||||
for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.TreasureSunlongConfig)) do
|
||||
if not v.Integral or #v.Integral < 1 or #v.Integral[1] < 2 then
|
||||
lv = v.Level
|
||||
break
|
||||
elseif curScore < v.Integral[1][2] then
|
||||
lv = v.Level
|
||||
break
|
||||
end
|
||||
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
|
||||
curScore = curScore + tonumber(strs1[2])
|
||||
end
|
||||
end
|
||||
local Getlv = function(curScore)
|
||||
local lv = 0
|
||||
for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.TreasureSunlongConfig)) do
|
||||
if not v.Integral or v.Integral[1][2] > curScore then
|
||||
return lv
|
||||
else
|
||||
lv = v.Level
|
||||
end
|
||||
end
|
||||
end
|
||||
local level = Getlv(curScore)
|
||||
LogGreen("level:"..level)
|
||||
for i = 1, #rewardData do
|
||||
-- body
|
||||
local reward = rewardData[i]
|
||||
|
|
Loading…
Reference in New Issue