From 3b2a6bb9047cfce9f501593b3669a9c1af6c5df4 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 05 十一月 2025 17:40:23 +0800
Subject: [PATCH] 130 战斗修改回合样式

---
 Main/System/Main/HeroFightingCardCell.cs |   44 +++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/Main/System/Main/HeroFightingCardCell.cs b/Main/System/Main/HeroFightingCardCell.cs
index 090d8d5..410c72c 100644
--- a/Main/System/Main/HeroFightingCardCell.cs
+++ b/Main/System/Main/HeroFightingCardCell.cs
@@ -17,7 +17,9 @@
     [SerializeField] FillTween cdTween;
 
     [SerializeField] Button clickEmptyBtn;
-
+    [SerializeField] Image emptyLockImg;
+    [SerializeField] Image redPointImg;
+    [SerializeField] UIEffectPlayer unlockEffect;
 
     void OnEnable()
     {
@@ -30,16 +32,35 @@
     }
 
     string guid;
-    public void Display(int index)
+    int lockIndex;
+    public void Display(int index, List<TeamHero> heros)
     {
-        var team = TeamManager.Instance.GetTeam(TeamType.Story);
-        var teamHero = team.GetServerHeroByIndex(index);
+        TeamHero teamHero = null;
+        if (index < heros.Count)
+        {
+            teamHero = heros[index];
+        }
         guid = teamHero != null ? teamHero.guid : "";
         if (guid == "")
         {
             clickHeroBtn.SetActive(false);
             clickEmptyBtn.SetActive(true);
             clickEmptyBtn.AddListener(ClickEmpty);
+            emptyLockImg.SetActive(false);
+            redPointImg.SetActive(false);
+
+            int lockCnt = HeroUIManager.Instance.lockIndexList.Count;
+            //鏍规嵁閿佹暟閲� 鍊掑簭鍒ゆ柇閿佷綇
+            if (lockCnt > 0)
+            {
+                lockIndex = lockCnt - (TeamConst.MaxTeamHeroCount - 1 - index) - 1;
+                if (lockIndex >= 0 && lockIndex < lockCnt)
+                {
+                    emptyLockImg.SetActive(true);
+                    redPointImg.SetActive(HeroUIManager.Instance.CanUnLock(HeroUIManager.Instance.lockIndexList[lockIndex]));
+                }
+            }
+
             return;
         }
         else
@@ -53,7 +74,7 @@
         var star = hero.heroStar;
         clickHeroBtn.AddListener(ClickHero);
         var heroConfig = HeroConfig.Get(heroID);
-        qualityBG.SetSprite("heroheadBG" + heroConfig.Quality);
+        qualityBG.SetSprite("herocBG" + heroConfig.Quality);
 
         var sprite = UILoader.LoadSprite("HeroHead", HeroSkinConfig.Get(hero.SkinID).RectangleIcon);
         if (sprite == null)
@@ -106,6 +127,19 @@
 
     void ClickEmpty()
     {
+        if (emptyLockImg.isActiveAndEnabled)
+        {
+            if (HeroUIManager.Instance.UnLockHeroCnt(lockIndex))
+            {
+                unlockEffect.onComplete = () =>
+                {
+                    HeroUIManager.Instance.OnUnLockHeroCountEvent?.Invoke();
+                    SysNotifyMgr.Instance.ShowTip("HeroCountUnLock5", TeamConst.MaxTeamHeroCount - HeroUIManager.Instance.lockIndexList.Count);
+                };
+                unlockEffect.Play();
+            }
+            return;
+        }
         UIManager.Instance.OpenWindow<HeroCallWin>();
     }
     void OnSkillCast(bool isfighting)

--
Gitblit v1.8.0