【角色升级】修复高星级无法升级的问题
parent
4ff85486ed
commit
e85939abc7
|
@ -159,7 +159,7 @@ end
|
|||
--更新英雄情报数据
|
||||
function this:UpdateHeroInfoData()
|
||||
curTuPoRankUpConfig = heroRankupConfig[curHeroData.breakId]
|
||||
curStarRankUpConfig=heroRankupConfig[curHeroData.upStarId]
|
||||
curStarRankUpConfig = heroRankupConfig[curHeroData.upStarId]
|
||||
local EquipSignUnlock = ConfigManager.GetConfigData(ConfigName.GameSetting,1).EquipSignUnlock
|
||||
--动态品阶
|
||||
local pId=0 --当前突破的阶数
|
||||
|
@ -435,10 +435,31 @@ function RoleInfoLayout:OnSortingOrderChange()
|
|||
end
|
||||
|
||||
function RoleInfoLayout:IsCanUpLv(curLv, targetLv)
|
||||
-- 如果是进阶不用判断
|
||||
if isHeroUpTuPo and curLv == upTuPoRankUpConfig.LimitLevel then
|
||||
return true
|
||||
end
|
||||
if (not curTuPoRankUpConfig and targetLv > 30) or (curTuPoRankUpConfig and targetLv > curTuPoRankUpConfig.OpenLevel) then
|
||||
|
||||
-- 没有突破等级时,最大等级为30级
|
||||
local limitLv
|
||||
if not curTuPoRankUpConfig then
|
||||
limitLv = 30
|
||||
end
|
||||
--
|
||||
if curTuPoRankUpConfig then
|
||||
-- 有突破等级,最大等级为当前突破等级的开放等级
|
||||
if not limitLv or limitLv > curTuPoRankUpConfig.OpenLevel then
|
||||
limitLv = curTuPoRankUpConfig.OpenLevel
|
||||
end
|
||||
-- 如果当前达到了最大的突破阶段,最大等级为当前星级的开放等级
|
||||
if curTuPoRankUpConfig.Id == 6 then --curTuPoRankUpConfig.Id == 17 四星英雄最大突破等级配置ID为17
|
||||
if curStarRankUpConfig then
|
||||
limitLv = curStarRankUpConfig.OpenLevel
|
||||
end
|
||||
end
|
||||
end
|
||||
-- 如果目标等级超过限制则不让升级
|
||||
if targetLv > limitLv then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
|
@ -486,6 +507,7 @@ function RoleInfoLayout:LvUpClick(isSingleLvUp)
|
|||
if isUpLvMaterials then
|
||||
if isSingleLvUp then--是否是单次升级
|
||||
if not this:IsCanUpLv(curHeroData.lv, curHeroData.lv + 1) then
|
||||
Log("无法升级")
|
||||
PopupTipPanel.ShowTip("无法升级")
|
||||
return
|
||||
end
|
||||
|
@ -519,6 +541,7 @@ function RoleInfoLayout:LvUpClick(isSingleLvUp)
|
|||
if isSingleLvUp then--是否是单次升级
|
||||
-- 判断是否可以升级
|
||||
if not this:IsCanUpLv(curHeroData.lv, curHeroData.lv + 1) then
|
||||
Log("无法升级")
|
||||
PopupTipPanel.ShowTip("无法升级")
|
||||
return
|
||||
end
|
||||
|
@ -550,6 +573,7 @@ end
|
|||
function RoleInfoLayout:LongLvUpClick(oldLv)
|
||||
-- 判断是否可以升级
|
||||
if not this:IsCanUpLv(oldLv, curHeroData.lv) then
|
||||
Log("无法升级")
|
||||
PopupTipPanel.ShowTip("无法升级")
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue