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