装备界面战力计算修改
parent
492a1edc94
commit
daf0f8bca7
|
@ -629,7 +629,16 @@ function this.ShowHeroEquip()
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
local allAddProVal = HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false)
|
-- local allAddProVal = HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false)
|
||||||
|
local allAddProVal
|
||||||
|
--计算面板属性
|
||||||
|
if isUpZhen then
|
||||||
|
local formationList = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
|
||||||
|
local allHeroTeamAddProVal = HeroManager.GetAllHeroTeamAddProVal(formationList.teamHeroInfos,curHeroData.dynamicId)
|
||||||
|
allAddProVal = HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false,nil,nil,true,allHeroTeamAddProVal)
|
||||||
|
else
|
||||||
|
allAddProVal=HeroManager.CalculateHeroAllProValList(1,curHeroData.dynamicId,false)
|
||||||
|
end
|
||||||
this.force.text = allAddProVal[HeroProType.WarPower]
|
this.force.text = allAddProVal[HeroProType.WarPower]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,9 @@ local index=0--当前索引
|
||||||
|
|
||||||
local isShow=true--默认显示装备中的魂印
|
local isShow=true--默认显示装备中的魂印
|
||||||
local _specialData={}
|
local _specialData={}
|
||||||
|
local isUpZhen = false
|
||||||
local list={}
|
local list={}
|
||||||
|
local teamHero = {}
|
||||||
function SoulPrintPanel:InitComponent()
|
function SoulPrintPanel:InitComponent()
|
||||||
this.upView = SubUIManager.Open(SubUIConfig.UpView, this.gameObject.transform, { showType = UpViewOpenType.ShowLeft})
|
this.upView = SubUIManager.Open(SubUIConfig.UpView, this.gameObject.transform, { showType = UpViewOpenType.ShowLeft})
|
||||||
this.helpBtn= Util.GetGameObject(this.gameObject, "HelpBtn")
|
this.helpBtn= Util.GetGameObject(this.gameObject, "HelpBtn")
|
||||||
|
@ -181,13 +182,24 @@ end
|
||||||
--刷新显示
|
--刷新显示
|
||||||
function this.RefreshShow()
|
function this.RefreshShow()
|
||||||
--LogGreen(Language[11945])
|
--LogGreen(Language[11945])
|
||||||
|
teamHero = FormationManager.GetAllFormationHeroId()
|
||||||
|
isUpZhen = teamHero[curHeroData.dynamicId] and true or false
|
||||||
this.SetLoopUI()
|
this.SetLoopUI()
|
||||||
this.SetHero()
|
this.SetHero()
|
||||||
this.SetScrollData()
|
this.SetScrollData()
|
||||||
--对比战力并更新战力值 播放战力变更动画
|
--对比战力并更新战力值 播放战力变更动画
|
||||||
HeroManager.CompareWarPower(curHeroData.dynamicId)
|
HeroManager.CompareWarPower(curHeroData.dynamicId)
|
||||||
local allPro = HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false)
|
-- local allPro = HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false)
|
||||||
this.power.text = allPro[HeroProType.WarPower]
|
local allAddProVal
|
||||||
|
--计算面板属性
|
||||||
|
if isUpZhen then
|
||||||
|
local formationList = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
|
||||||
|
local allHeroTeamAddProVal = HeroManager.GetAllHeroTeamAddProVal(formationList.teamHeroInfos,curHeroData.dynamicId)
|
||||||
|
allAddProVal = HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false,nil,nil,true,allHeroTeamAddProVal)
|
||||||
|
else
|
||||||
|
allAddProVal=HeroManager.CalculateHeroAllProValList(1,curHeroData.dynamicId,false)
|
||||||
|
end
|
||||||
|
this.power.text = allAddProVal[HeroProType.WarPower]
|
||||||
end
|
end
|
||||||
|
|
||||||
--设置环形布局
|
--设置环形布局
|
||||||
|
@ -296,8 +308,17 @@ end
|
||||||
--设置英雄
|
--设置英雄
|
||||||
function this.SetHero()
|
function this.SetHero()
|
||||||
this.heroIcon.sprite=Util.LoadSprite(GetResourcePath(curHeroData.heroConfig.Icon))
|
this.heroIcon.sprite=Util.LoadSprite(GetResourcePath(curHeroData.heroConfig.Icon))
|
||||||
local allPro = HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false)
|
-- local allPro = HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false)
|
||||||
this.power.text = allPro[HeroProType.WarPower]
|
local allAddProVal
|
||||||
|
--计算面板属性
|
||||||
|
if isUpZhen then
|
||||||
|
local formationList = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
|
||||||
|
local allHeroTeamAddProVal = HeroManager.GetAllHeroTeamAddProVal(formationList.teamHeroInfos,curHeroData.dynamicId)
|
||||||
|
allAddProVal = HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false,nil,nil,true,allHeroTeamAddProVal)
|
||||||
|
else
|
||||||
|
allAddProVal=HeroManager.CalculateHeroAllProValList(1,curHeroData.dynamicId,false)
|
||||||
|
end
|
||||||
|
this.power.text = allAddProVal[HeroProType.WarPower]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue