From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/HeroUI/HeroUIManager.Talent.cs |   44 ++++++++++++++++++++++++++++++++++++--------
 1 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/Main/System/HeroUI/HeroUIManager.Talent.cs b/Main/System/HeroUI/HeroUIManager.Talent.cs
index a57892b..8302b51 100644
--- a/Main/System/HeroUI/HeroUIManager.Talent.cs
+++ b/Main/System/HeroUI/HeroUIManager.Talent.cs
@@ -38,7 +38,11 @@
         }
     }
 
+    #region 娲楃偧
+    public string selectWashHeroGUID; //琚礂缁冩灏咷UID
+    public Action changeLockEvent;
 
+    #endregion
 
     public List<string> heroEatList = new List<string>();
 
@@ -60,7 +64,13 @@
     //鏍规嵁澶╄祴閿佺姸鎬佽幏鍙栨秷鑰楃殑鏉愭枡鏁伴噺
     public int GetTalentLockUseWashCount(HeroInfo hero)
     {
-        return washByLockUseCounts[hero.GetTalentLockCount()];
+        int heroTalentLockCount = hero.GetTalentLockCount();
+        //涓嶅鍙栨渶鍚庝竴涓�
+        if (heroTalentLockCount >= washByLockUseCounts.Length)
+        {
+            heroTalentLockCount = washByLockUseCounts.Length - 1;
+        }
+        return washByLockUseCounts[heroTalentLockCount];
     }
 
 
@@ -77,7 +87,7 @@
 
 
 
-    //鏄熶笂闄愮敱鍝佽川 鍜� 瑙夐啋鍐冲畾
+    //鏄熸渶缁堜笂闄愮敱鍝佽川 鍜� 瑙夐啋鍐冲畾
     public int GetMaxStarCount(int heroID, int quality)
     {
         if (HeroAwakeConfig.GetHeroAwakeConfig(heroID, 1) == null)
@@ -98,7 +108,7 @@
 
 
     //beforeGiftIDList鐢ㄤ簬瀵规瘮鍙樺寲鐨勫ぉ璧嬫牸瀛�
-    public void RefreshGiftCell(GiftBaseCell[] giftBaseCells, HeroInfo hero, List<int> beforeGiftIDList= null, List<int> beforeGiftLevelList= null)
+    public void RefreshGiftCell(GiftBaseCell[] giftBaseCells, HeroInfo hero, List<int> beforeGiftIDList = null, List<int> beforeGiftLevelList = null)
     {
         int showCount = GetGiftGirdMaxCount(hero.heroId);
         for (int i = 0; i < giftBaseCells.Length; i++)
@@ -117,7 +127,7 @@
                 int state = 0; //0锛氫笉鏄剧ず 1锛氭柊澧� 2锛氭彁鍗�
 
                 if (!beforeGiftIDList.IsNullOrEmpty())
-                { 
+                {
                     if (i >= beforeGiftIDList.Count)
                     {
                         state = 1;
@@ -138,7 +148,7 @@
                     }
                 }
 
-                giftBaseCells[i].Init(giftID, giftLV, null, state);
+                giftBaseCells[i].Init(giftID, giftLV, state, hero.heroId, i, hero.awakeLevel);
             }
             else
             {
@@ -156,8 +166,7 @@
                 }
                 else
                 {
-                    int index = i;
-                    giftBaseCells[i].Init(-1, 0, null, hero.heroId, index);
+                    giftBaseCells[i].Init(-1, 0, 0, hero.heroId, i);
                 }
             }
 
@@ -177,7 +186,7 @@
 
 
     public void ShowStarImg(int starCount, Image[] starImages, bool noStarShow = true)
-    { 
+    {
         int imgCount = starImages.Length;
         for (int i = 0; i < imgCount; i++)
         {
@@ -205,5 +214,24 @@
             }
         }
     }
+
+
+    // public ushort ItemIndex;    //姝﹀皢鐗╁搧鎵�鍦ㄦ灏嗚儗鍖呬綅缃储寮�
+    // public byte LockCnt;
+    // public  byte[] LockTalentIndexs;    //閿佸畾澶╄祴绱㈠紩鍒楄〃
+    // public byte OPType;    // 鎿嶄綔绫诲瀷锛�0-鎵ц娲楃偧锛�1-鏇挎崲鍘熷ぉ璧嬶紱2-淇濈暀鍘熷ぉ璧�
+    public void SendWash(HeroInfo hero, byte opType)
+    {
+        var pack = new CB235_tagCSHeroWash();
+        pack.ItemIndex = (ushort)hero.itemHero.gridIndex;
+        pack.LockCnt = (byte)hero.talentLockList.Count;
+        pack.LockTalentIndexs = new byte[pack.LockCnt];
+        for (int i = 0; i < pack.LockCnt; i++)
+        {
+            pack.LockTalentIndexs[i] = (byte)hero.talentLockList[i];
+        }
+        pack.OPType = opType;
+        GameNetSystem.Instance.SendInfo(pack);
+    }
 }
 

--
Gitblit v1.8.0