hch
2025-08-11 24759a03616da66b7a9f826864e1d4c4072e3ede
117 【武将】武将系统 - 培养
3个文件已修改
73 ■■■■ 已修改文件
Main/System/HeroUI/GiftBaseCell.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroTrainWin.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/UIHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/GiftBaseCell.cs
@@ -45,6 +45,19 @@
        }
    }
    OutlineEx m_TextOutline;
    OutlineEx textOutline
    {
        get
        {
            if (m_TextOutline == null)
            {
                m_TextOutline = this.transform.GetComponent<OutlineEx>("Container_GiftCell/name");
            }
            return m_TextOutline;
        }
    }
    Transform m_LvRect;
    Transform lvRect
    {
@@ -84,6 +97,8 @@
        }
    }
    void Awake()
    {
        LoadPrefab();
@@ -99,10 +114,9 @@
            qualityBG.SetSprite("GiftQualityBG" + config.Quality);
            giftBtn.AddListener(onclick);
            giftName.text = config.Name;
            giftName.color = GetColor(config.Quality);
            textOutline.OutlineColor = GetOutlineColor(config.Quality);
            lvText.text = lv.ToString();
            lvText.color = GetColor(1);
            Outline textOutline = lvText.GetComponent<Outline>();
            textOutline.effectColor = GetOutlineColor(config.Quality);
            lvRect.SetActive(lv > 0);
            stateImg.SetActive(showState > 0);
            stateImg.SetSprite("GiftState" + showState);
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));
        //已觉醒的需要消耗货币
@@ -358,7 +361,7 @@
            heroAddAttrPerText[i].text = PlayerPropertyConfig.GetFullDescription(new Int2(PlayerPropertyConfig.basePerAttrs[i], valuePer));
        }
        //区分突破和最大等级
        if (!HeroUIManager.Instance.IsLVMax(hero))
@@ -402,7 +405,7 @@
        {
            //突破
            if (!UIManager.Instance.IsOpened<HeroLVBreakWin>())
            {
            {
                HeroUIManager.Instance.selectHeroGuid = guid;
                UIManager.Instance.OpenWindow<HeroLVBreakWin>();
            }
@@ -425,8 +428,8 @@
                {
                    addPerText[i].text = "+" + PlayerPropertyConfig.GetValueDescription(PlayerPropertyConfig.basePerAttrs[i], hero.qualityConfig.BreakLVAddPer);
                }
                addPerObject.Play(()=>
                {
                addPerObject.Play(() =>
                {
                    addPerObject.SetActive(false);
                });
            }
@@ -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();
    }
}
Main/Utility/UIHelper.cs
@@ -1190,7 +1190,7 @@
                }
            case 42:
                {
                    //结晶
                    //将星玉髓
                    return PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.default33);
                }
            case 43: