From c5adf3e22a5cdfb185a4befc22ef0cd079a7eb33 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 02 九月 2025 22:30:10 +0800
Subject: [PATCH] 117 【武将】武将系统 - 天赋显示,修复描边文字遇到mask问题

---
 Main/System/HeroUI/HeroTrainWin.cs |   73 +++++++++++++++++++++++++++++++++---
 1 files changed, 66 insertions(+), 7 deletions(-)

diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index 6b688b3..386285d 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/Main/System/HeroUI/HeroTrainWin.cs
@@ -64,6 +64,13 @@
     [SerializeField] Text[] fetterNameText;   //缇佺粖
 
 
+    //澶╄祴
+    [SerializeField] GiftBaseCell[] giftBaseCells;
+    [SerializeField] Button totalGiftBtn;
+    [SerializeField] Button starUPBtn;
+    [SerializeField] Button washBtn;
+
+
     string guid;
     HeroInfo hero;
 
@@ -132,7 +139,7 @@
         hero = HeroManager.Instance.GetHero(guid);
         unfoldState = false;
         addPerObject.SetActive(false);
-        Refresh();
+        Display();
     }
 
     protected override void OnPreClose()
@@ -154,7 +161,8 @@
             }
         }
     }
-    public override void Refresh()
+
+    public void Display()
     {
         roleLhModel.Create(hero.SkinID, HeroUIManager.lihuiScale, motionName: "", isLh: true);
         roleXsModel.Create(hero.SkinID);
@@ -184,6 +192,7 @@
         RefreshAttr();
         RefreshAllPotential();
         RefreshFetter();
+        RefreshGift();
     }
 
     void RefreshItemLockEvent(PackType type, string guid, bool lockState)
@@ -196,7 +205,7 @@
 
     void RefreshHeroEvent(HeroInfo hero)
     {
-        Refresh();
+        Display();
     }
 
     void RefreshConn()
@@ -230,7 +239,7 @@
         }
         guid = HeroUIManager.Instance.heroSortList[resultIndex];
         hero = HeroManager.Instance.GetHero(guid);
-        Refresh();
+        Display();
     }
 
     void ResetBtnClick()
@@ -517,7 +526,7 @@
             else
             {
                 //缃伆
-                allAttrStr += UIHelper.AppendColor(TextColType.Gray, Language.Get("herocard63", i + 1, string.Join(Language.Get("L1112"), attrStrArr))) + "\n";
+                allAttrStr += UIHelper.AppendColor(TextColType.NavyGray, Language.Get("herocard63", i + 1, string.Join(Language.Get("L1112"), attrStrArr))) + "\n";
             }
         }
 
@@ -527,7 +536,7 @@
 
     //缇佺粖
     void RefreshFetter()
-	{
+    {
         for (int i = 0; i < fetterText.Length; i++)
         {
             if (i < hero.heroConfig.FetterIDList.Length)
@@ -563,7 +572,57 @@
                 fetterText[i].SetActive(false);
             }
         }
+    }
 
+    void RefreshGift()
+    {
+        //浼犺浠ヤ笅鍙湁4涓�
+        int showCount = hero.Quality < 4 ? HeroUIManager.normalGiftMaxCnt : HeroUIManager.giftMaxCnt;
+        for (int i = 0; i < giftBaseCells.Length; i++)
+        {
+            if (i >= showCount)
+            {
+                giftBaseCells[i].SetActive(false);
+                continue;
+            }
 
-	}
+            giftBaseCells[i].SetActive(true);
+            if (i < hero.talentIDList.Count)
+            {
+                int giftID = hero.talentIDList[i];
+                int giftLV = hero.talentLvList[i];
+                giftBaseCells[i].Init(giftID, giftLV, () =>
+                {
+                    var giftConfig = HeroTalentConfig.Get(giftID);
+                    SmallTipWin.showText = Language.Get("SmallTipFomat", giftConfig.Name + " " + Language.Get("L1113", giftLV),
+                    Language.Get("HeroGift5", PlayerPropertyConfig.Get(giftConfig.AttrID).Name, PlayerPropertyConfig.GetValueDescription(giftConfig.AttrID, giftConfig.AttrValue)));
+                    SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
+                    UIManager.Instance.OpenWindow<SmallTipWin>();
+                });
+            }
+            else
+            {
+                if (i < HeroUIManager.normalGiftMaxCnt)
+                {
+                    giftBaseCells[i].Init(0, 0, () =>
+                    {
+                        SmallTipWin.showText = Language.Get("HeroGift1");
+                        SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
+                        UIManager.Instance.OpenWindow<SmallTipWin>();
+                    });
+                }
+                else
+                {
+                    int index = i;
+                    giftBaseCells[i].Init(-1, 0, () =>
+                    {
+                        SmallTipWin.showText = Language.Get("HeroGift2", HeroAwakeConfig.GetAwakeLVByUnLockGiftIndex(hero.heroId, index));
+                        SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
+                        UIManager.Instance.OpenWindow<SmallTipWin>();
+                    });
+                }
+            }
+
+        }
+    }
 }
\ No newline at end of file

--
Gitblit v1.8.0