【ID1016342】

【解锁秘宝优化】激活可直接领取奖励预览中,没有显示专属奖励
dev_chengFeng
jiaoyangna 2021-06-09 17:45:13 +08:00
parent f0b9e1d8e6
commit 970a96b4f4
1 changed files with 15 additions and 10 deletions

View File

@ -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]