From 871594462e82d6bc1341918d39e11ab036d59563 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 18 九月 2025 19:26:28 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/HeroUI/HeroConnectionHeadCell.cs |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/Main/System/HeroUI/HeroConnectionHeadCell.cs b/Main/System/HeroUI/HeroConnectionHeadCell.cs
index 0b13c49..77de465 100644
--- a/Main/System/HeroUI/HeroConnectionHeadCell.cs
+++ b/Main/System/HeroUI/HeroConnectionHeadCell.cs
@@ -5,7 +5,7 @@
 public class HeroConnectionHeadCell : MonoBehaviour
 {
     [SerializeField] Image qualityImg;
-    [SerializeField] Image heroIcon;
+    [SerializeField] ImageEx heroIcon;
     [SerializeField] Text nameText;
     [SerializeField] Image connMarkImg; //閾炬帴鐨勯攣鍥炬爣锛岀涓�涓笉鏄剧ず
 
@@ -14,20 +14,18 @@
     /// </summary>
     /// <param name="heroID"></param>
     /// <param name="index"> 鍙槸涓轰簡璁╃涓�涓笉鏄剧ず閿佸浘鏍囩敤</param>
-    /// <param name="guid">閮ㄥ垎鐣岄潰鏄剧ず涓嶅悓鐨偆鍥炬爣</param>
-    public void Display(int heroID, int index, string guid = "")
+    /// <param name="showCollect">鏄惁鎸夋敹闆嗘樉绀虹疆鐏扮姸鎬�</param>
+    /// <param name="_skinID">鎸囧畾鐨偆</param>
+    public void Display(int heroID, int index, bool showCollect = false,  int _skinID = 0)
     {
         int skinID = 0;
-        HeroConfig heroConfig;
-        if (!string.IsNullOrEmpty(guid))
+        HeroConfig heroConfig = HeroConfig.Get(heroID);
+        if (_skinID != 0)
         {
-            var hero = HeroManager.Instance.GetHero(guid);
-            skinID = hero.SkinID;
-            heroConfig = hero.heroConfig;
+            skinID = _skinID;
         }
         else
         {
-            heroConfig = HeroConfig.Get(heroID);
             skinID = heroConfig.SkinIDList[0];  //榛樿绗竴涓浘閴村睍绀�
 
         }
@@ -45,6 +43,13 @@
             heroIcon.overrideSprite = sprite;
         }
 
+        if (showCollect)
+        { 
+            //鏈幏寰楁灏嗚缃伆
+            heroIcon.gray = !HeroManager.Instance.HasHero(heroID);
+
+        }
+
         connMarkImg.SetActive(index != 0);
     }
 }

--
Gitblit v1.8.0