From 73e56f36bd0d86e1b4fc29a1d8ed46856e709e9d Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Wed, 24 Mar 2021 11:14:40 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=A6=96=E5=85=85=E3=80=91=E5=AD=99?= =?UTF-8?q?=E6=82=9F=E7=A9=BA=E9=A1=B5=E9=9D=A2=E8=AF=A6=E6=83=85=E5=A4=A9?= =?UTF-8?q?=E8=B5=8B=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Popup/RoleGetInfoPopup.lua | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) 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