一键升级修改
parent
3371b86e57
commit
305ad1343b
|
@ -150,7 +150,8 @@ function RoleInfoLayout:BindEvent()
|
||||||
--一键升级
|
--一键升级
|
||||||
Util.AddClick(this.upMaxLvBtn, function()
|
Util.AddClick(this.upMaxLvBtn, function()
|
||||||
local oldUpMaxLv=this:CalUpMaxLv()
|
local oldUpMaxLv=this:CalUpMaxLv()
|
||||||
if curHeroData.lv>=oldUpMaxLv then
|
local openLv=this.GetCurHeroLvLimit()
|
||||||
|
if curHeroData.lv>=openLv then
|
||||||
PopupTipPanel.ShowTip("等级已达上限")
|
PopupTipPanel.ShowTip("等级已达上限")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -159,7 +160,7 @@ function RoleInfoLayout:BindEvent()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if oldUpMaxLv==curHeroData.lv then
|
if curHeroData.lv<this.GetCurHeroLvLimit() and oldUpMaxLv==curHeroData.lv then
|
||||||
PopupTipPanel.ShowTip("材料不足")
|
PopupTipPanel.ShowTip("材料不足")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -297,7 +298,7 @@ function this.GetCurHeroLvLimit()
|
||||||
if curHeroData.breakId > 0 then
|
if curHeroData.breakId > 0 then
|
||||||
curLvEnd = heroRankupConfig[curHeroData.breakId].OpenLevel
|
curLvEnd = heroRankupConfig[curHeroData.breakId].OpenLevel
|
||||||
end
|
end
|
||||||
if curHeroData.upStarId > 0 then
|
if curHeroData.lv>= curLvEnd and curHeroData.upStarId > 0 then
|
||||||
if heroRankupConfig[curHeroData.upStarId].OpenLevel > curLvEnd then
|
if heroRankupConfig[curHeroData.upStarId].OpenLevel > curLvEnd then
|
||||||
curLvEnd = heroRankupConfig[curHeroData.upStarId].OpenLevel
|
curLvEnd = heroRankupConfig[curHeroData.upStarId].OpenLevel
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue