From 24759a03616da66b7a9f826864e1d4c4072e3ede Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 11 八月 2025 15:10:38 +0800
Subject: [PATCH] 117 【武将】武将系统 - 培养

---
 Main/Utility/UIHelper.cs           |    2 
 Main/System/HeroUI/GiftBaseCell.cs |   20 ++++++++-
 Main/System/HeroUI/HeroTrainWin.cs |   51 +++++++++++++++++++++++--
 3 files changed, 64 insertions(+), 9 deletions(-)

diff --git a/Main/System/HeroUI/GiftBaseCell.cs b/Main/System/HeroUI/GiftBaseCell.cs
index afd9460..5ab0faf 100644
--- a/Main/System/HeroUI/GiftBaseCell.cs
+++ b/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);
diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index 7daa29c..492fd0e 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/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();
+    
+    }
 }
\ No newline at end of file
diff --git a/Main/Utility/UIHelper.cs b/Main/Utility/UIHelper.cs
index 83df30c..f18134d 100644
--- a/Main/Utility/UIHelper.cs
+++ b/Main/Utility/UIHelper.cs
@@ -1190,7 +1190,7 @@
                 }
             case 42:
                 {
-                    //缁撴櫠
+                    //灏嗘槦鐜夐珦
                     return PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.default33);
                 }
             case 43:

--
Gitblit v1.8.0