hch
2025-08-11 24759a03616da66b7a9f826864e1d4c4072e3ede
Main/System/HeroUI/HeroTrainWin.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
@@ -57,6 +58,7 @@
    [SerializeField] Text lvupBtnText;
    [SerializeField] LongPressButton lvupBtn;
    [SerializeField] Button allAttrBtn;
    [SerializeField] Text allPotentialText; //潜能
    string guid;
    HeroInfo hero;
    protected override void InitComponent()
@@ -158,6 +160,7 @@
        RefreshName();
        RefreshFoldState();
        RefreshAttr();
        RefreshAllPotential();
    }
    void RefreshItemLockEvent(PackType type, string guid, bool lockState)
@@ -227,7 +230,7 @@
        List<Item> items = new List<Item>();
        var payBack1 = CommonFunc.AddDict(HeroUIManager.Instance.GetHeroLVPayBack(hero.heroId, hero.heroLevel),
        var payBack1 = CommonFunc.AddDict(HeroUIManager.Instance.GetHeroLVPayBack(hero.Quality, hero.heroLevel),
        HeroUIManager.Instance.GetHeroBreakPayBack(hero.heroId, hero.breakLevel));
        //已觉醒的需要消耗货币
@@ -434,4 +437,42 @@
        }
    }
    void RefreshAllPotential()
    {
        if (!HeroBreakConfig.configDics.ContainsKey(hero.heroId))
            return;
        var list = HeroBreakConfig.configDics[hero.heroId].Keys.ToList();
        list.Sort();
        string allAttrStr = string.Empty;
        for (int i = 0; i < list.Count; i++)
        {
            var nextQualityBreakConfig = HeroBreakConfig.GetHeroBreakConfig(hero.heroId, i + 1);
            List<string> attrStrArr = new List<string>();
            for (int j = 0; j < nextQualityBreakConfig.AttrIDList.Length; j++)
            {
                string format = i < hero.breakLevel ? "{0}" + UIHelper.AppendColor(TextColType.Green, "+{1}") : "{0}+{1}";
                attrStrArr.Add(PlayerPropertyConfig.GetFullDescription(nextQualityBreakConfig.AttrIDList[j], nextQualityBreakConfig.AttrValueList[j], format));
            }
            if (nextQualityBreakConfig.SkillID != 0)
            {
                attrStrArr.Add(SkillConfig.Get(nextQualityBreakConfig.SkillID).Description);
            }
            if (i < hero.breakLevel)
            {
                allAttrStr += Language.Get("herocard63", i + 1, string.Join(Language.Get("L1112"), attrStrArr)) + "\n";
            }
            else
            {
                //置灰
                allAttrStr += UIHelper.AppendColor(TextColType.Gray, Language.Get("herocard63", i + 1, string.Join(Language.Get("L1112"), attrStrArr))) + "\n";
            }
        }
        allPotentialText.text = allAttrStr.Trim();
    }
}