一键升级bug修改
parent
bfd7967d52
commit
3c2e86f97c
|
@ -1028,18 +1028,19 @@ function RoleInfoLayout:CalUpMaxLv()
|
|||
local upMaxCostList={}
|
||||
for i = curHeroData.lv, this.GetCurHeroLvLimit() do
|
||||
local costList=ConfigManager.GetConfigData(ConfigName.HeroLevelConfig, i).Consume
|
||||
for i = 1, #costList do
|
||||
local costxxId=costList[i][1]
|
||||
local costxxNum=costList[i][2]
|
||||
for j = 1, #costList do
|
||||
local costxxId=costList[j][1]
|
||||
local costxxNum=costList[j][2]
|
||||
if upMaxCostList[costxxId] then
|
||||
costxxNum=costxxNum+upMaxCostList[costxxId]
|
||||
end
|
||||
local havexxNum= BagManager.GetItemCountById(costList[i][1])
|
||||
if havexxNum<costxxNum then
|
||||
local havexxNum= BagManager.GetItemCountById(costList[j][1])
|
||||
if havexxNum<costxxNum or calOldLv==this.GetCurHeroLvLimit() then
|
||||
return calOldLv
|
||||
end
|
||||
upMaxCostList[costxxId]=costxxNum
|
||||
end
|
||||
calOldLv=i
|
||||
calOldLv=i+1
|
||||
end
|
||||
return calOldLv
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue