diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RoleGetInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RoleGetInfoPopup.lua index 1e3ef0d0b1..dc2efd14ca 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RoleGetInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RoleGetInfoPopup.lua @@ -8,6 +8,7 @@ local isGet local heroSId local heroStar local allSkillDatas = {} +local breakId,upStarId --初始化组件(用于子类重写) function RoleGetInfoPopup:InitComponent() @@ -148,13 +149,6 @@ end function RoleGetInfoPopup:OnShow() allSkillDatas = HeroManager.GetCurHeroSidAndCurStarAllSkillDatas(heroSId,heroStar) local heroSData=ConfigManager.GetConfigData(ConfigName.HeroConfig, heroSId) - local talentBtnImage = heroStar == HeroManager.awakeNextStarIndex and "r_hero_tianfu2_zh" or "r_hero_tianfu1_zh" - this.talentBtn:GetComponent("Image").sprite = Util.LoadSprite(talentBtnImage) - local OpenPassiveSkillRules = heroStar == HeroManager.awakeNextStarIndex and heroSData.Awaken or heroSData.OpenPassiveSkillRules - if OpenPassiveSkillRules then - local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroSData,0,0) - this.talentProgress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum - end if isGet then this.GetShowPanelData() --天赋 @@ -166,6 +160,14 @@ function RoleGetInfoPopup:OnShow() this.NoGetShowPanelData() end + local talentBtnImage = heroStar == HeroManager.awakeNextStarIndex and "r_hero_tianfu2_zh" or "r_hero_tianfu1_zh" + this.talentBtn:GetComponent("Image").sprite = Util.LoadSprite(talentBtnImage) + local OpenPassiveSkillRules = heroStar == HeroManager.awakeNextStarIndex and heroSData.Awaken or heroSData.OpenPassiveSkillRules + if OpenPassiveSkillRules then + local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroSData,breakId,upStarId) + this.talentProgress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum + end + --技能 布局变动 self.skillLine.gameObject:SetActive(not (heroSData.OpenPassiveSkillRules == nil and heroSData.EquipTalismana==nil)) if heroSData.OpenPassiveSkillRules == nil and heroSData.EquipTalismana==nil then @@ -266,6 +268,8 @@ function this.GetShowPanelData() this.hp.text=allAddProVal[HeroProType.Hp] this.phyDef.text=allAddProVal[HeroProType.PhysicalDefence] this.magDef.text=allAddProVal[HeroProType.MagicDefence] + breakId = heroBackData.breakId + upStarId = heroBackData.starBreakId -- this.speed.text= allAddProVal[HeroProType.Speed] --技能 -- this.selsectSkillImage:SetActive(false) @@ -352,8 +356,8 @@ function this.CalculateHeroAllProValList(heroConFigData,_starNum,isCalculateStar -- end local heroRankupConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.HeroRankupConfig, "Star", heroConFigData.Star, "LimitStar", _starNum) local curLvNum=1 - local breakId = 0 - local upStarId = 0 + breakId = 0 + upStarId = 0 if isCalculateStarVal then --等级 curLvNum = heroRankupConfig.OpenLevel