local UITalentSkillTips = require("View/Common/UITalentSkillTips") local UIHeroBreakTalentSkillTips = UIViewClass(UITalentSkillTips) local SkillIconPath = ConstAssetPathConfig.SkillImagePath function UIHeroBreakTalentSkillTips:RefreshTalentInfo(heroId, talentId) self.state_Title:SetState(1) local talentData = MDL.HeroStar.GetHeroTalentDataByTalentId(heroId, talentId) local talentList = talentData.DevelopEffectID local name, desc = MDL.HeroStar.GetTalentNameAndDesc(talentList[1]) self.txt_TalentName.text = name self.txt_TalentDes.text = desc local developEffectData = DataSheetManager.DevelopEffectData:GetDataByID(talentId) UIUtils.SetImageByAssetBundle(self.img_Talent, string.format(SkillIconPath, developEffectData.Icon)) local level = MDL.HeroStar.GetHeroTalentLevel(heroId, talentId) self.txt_Lv.text = level local isLock = not CTL.HeroStar.IsDevelopEffectUnlock(heroId, talentId) UIUtils.SetActive(self.group_Level, true) UIUtils.SetActive(self.group_LockCondition, isLock) UIUtils.SetActive(self.group_Locked, false) UIUtils.SetActive(self.group_LevelUpHint, not isLock) self.state_DesLock:SetState(level == 0 and 0 or 1) if isLock then self.txt_LockInfo.text = string.FormatByIdsId(Const_IDS["IDS_TalentSkill_UnlockHint"], MDL.HeroStar.GetHeroStarByTalentId(heroId, talentId)) else if CTL.HeroStar.IsHeroReachMaxStar(heroId) then UIUtils.SetLabelText(self.txt_LevelUpHint, Const_IDS.IDS_TalentSkill_UnlockHint3) else UIUtils.SetLabel(self.txt_LevelUpHint, string.FormatByIdsId(Const_IDS.IDS_TalentSkill_UnlockHint2, UTL.Attr.GetHeroBreakTargetLevelByTalentId(heroId, talentId))) end end self:RefreshTalentTypeTag(talentData.Display_Table) self:RefreshTalentLevelList(heroId, talentList, level) if level > 1 then self.loop_TalentSkill:MoveIndex(level - 2) end end return UIHeroBreakTalentSkillTips