From aa84cb62bebb9c8a4e586bcc1ec28eb7a16a8860 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 26 一月 2026 18:10:34 +0800
Subject: [PATCH] 422 子 【内政】命格系统 / 【内政】命格系统-客户端

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

diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index 93caf6f..6a9f393 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/Main/System/HeroUI/HeroTrainWin.cs
@@ -30,6 +30,7 @@
     [SerializeField] HeroConnectionCell connetionForm;  //缇佺粖
     [SerializeField] Button resetBtn;
     [SerializeField] Button deleteBtn;
+    [SerializeField] Transform deleteTip;
     [SerializeField] Button seeLhBtn;   //鏌ョ湅绔嬬粯
     [SerializeField] SkillBaseCell normalSkillCell;
     [SerializeField] SkillBaseCell angerSkillCell;
@@ -208,6 +209,7 @@
         {
             functionOrder = 0;
             DisplayTrainOrBreak(hero);
+            ForceRefreshLayout();
         });
 
         breakMainButton.AddListener(() =>
@@ -294,11 +296,23 @@
         RefreshFreeze();
         RefreshRedImg();
         DisplayTrainOrBreak(hero);
-
+        ShowDeleteTip();
 
         HeroUIManager.Instance.RemoveNewHero(hero.heroId);
         ForceRefreshLayout();
     }
+
+
+    void ShowDeleteTip()
+    {
+        deleteTip.SetActive(false);
+        if (hero != null && hero.Quality == 1 && HeroUIManager.Instance.IsTheSameHeroFullStar(hero.heroId))
+        {
+            
+            deleteTip.SetActive(true);
+        }
+    }
+
 
     /// <summary>
     /// 寮哄埗鍒锋柊Layout锛岃В鍐冲祵濂桳ayout鍜孋ontentSizeFitter鐨勯噸鍙犻棶棰�
@@ -392,8 +406,24 @@
         //     SysNotifyMgr.Instance.ShowTip("UnlockHero");
         //     return;
         // }
-        HeroUIManager.Instance.jumpDeleteHeroGuid = guid;
+        if (CanDelete())
+        {
+            HeroUIManager.Instance.jumpDeleteHeroGuid = guid;
+        }
+        else
+        {
+            HeroUIManager.Instance.jumpDeleteHeroGuid = "";
+        }
         UIManager.Instance.OpenWindow<HeroDeleteWin>();
+    }
+
+
+    bool CanDelete()
+    {
+        if (hero.isActive)
+            return false;
+
+        return HeroUIManager.Instance.IsTheSameHeroFullStar(hero.heroId);
     }
 
     void RefreshStars()
@@ -793,9 +823,9 @@
         }
     }
 
-    void TeamPosChangeEvent(TeamType teamType)
+    void TeamPosChangeEvent(int teamType)
     {
-        if (teamType != TeamType.Story)
+        if (teamType != TeamManager.Instance.GetMainTeamID())
             return;
         fightPowerText.text = UIHelper.ReplaceLargeArtNum(hero.CalculateFightPower());
     }
@@ -846,7 +876,7 @@
         var itemPack = PackManager.Instance.GetSinglePack(PackType.Item);
 
 
-        if (heroCnt > 1)
+        if (heroCnt > 1 && hero.heroStar < hero.GetCurMaxStar())
         {
             redpointGift.SetActive(true);
             trainMainRedImg.SetActive(true);
@@ -865,14 +895,14 @@
         }
 
 
-        if (!hero.IsInTeamByTeamType(TeamType.Story))
+        if (!hero.IsInTeamByTeamType(BattlePreSetType.Story))
         {
             return;
         }
 
 
         //5鏄熷悗鎵嶈兘瑙夐啋
-        if (hero.heroStar >= HeroUIManager.Instance.starLevelCanAwake)
+        if (hero.heroStar >= HeroUIManager.Instance.starLevelCanAwake && FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.HeroAwake))
         {
             //鍒ゆ柇瑙夐啋鏉愭枡鏄惁瓒冲
             var maxAwakeLV = HeroAwakeConfig.GetMaxAwakeLV(hero.heroId);

--
Gitblit v1.8.0