From 796f2b2e8a0435df7e3cf8e36afeeb69d7b37876 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 13 十二月 2025 16:22:32 +0800
Subject: [PATCH] 0312 特权卡立即跳过不受功能开启影响(20级) 优化挑战BOSS引导提示时机 吞噬红点优武将"新"提醒 优化武将突破红点 满星不能遣散问题

---
 Main/Utility/EnumHelper.cs                 |    4 +-
 Main/System/Battle/BattleWin.cs            |   40 +++++++++++++++----
 Main/System/Battle/BaseBattleWin.cs        |    7 ++-
 Main/System/HeroUI/HeroUIManager.Reborn.cs |   19 +++++++++
 Main/System/HeroUI/HeroTrainWin.cs         |    4 +
 Main/System/HeroUI/HeroUIManager.cs        |    2 
 6 files changed, 59 insertions(+), 17 deletions(-)

diff --git a/Main/System/Battle/BaseBattleWin.cs b/Main/System/Battle/BaseBattleWin.cs
index fce8ae1..7856295 100644
--- a/Main/System/Battle/BaseBattleWin.cs
+++ b/Main/System/Battle/BaseBattleWin.cs
@@ -194,14 +194,15 @@
     {
         if (null == battleField)
             return;
-        if (!FuncOpen.Instance.IsFuncOpen(BattleManager.Instance.passFuncId, true))
+        // 妫�鏌ユ槸鍚︿负姘镐箙鐗规潈鍗$帺瀹�
+        bool hasForeverPrivilege = InvestModel.Instance.IsInvested(InvestModel.foreverCardType);
+
+        if (!hasForeverPrivilege && !FuncOpen.Instance.IsFuncOpen(BattleManager.Instance.passFuncId, true))
             return;
 
         int passRound = BattleManager.Instance.defaultPassRound;
         var name = battleField.ToString();
 
-        // 妫�鏌ユ槸鍚︿负姘镐箙鐗规潈鍗$帺瀹�
-        bool hasForeverPrivilege = InvestModel.Instance.IsInvested(InvestModel.foreverCardType);
 
         if (hasForeverPrivilege)
         {
diff --git a/Main/System/Battle/BattleWin.cs b/Main/System/Battle/BattleWin.cs
index f1c6d26..00f5b88 100644
--- a/Main/System/Battle/BattleWin.cs
+++ b/Main/System/Battle/BattleWin.cs
@@ -48,7 +48,9 @@
 
     protected override void OnPreOpen()
     {
-        // lastClickTime = Time.realtimeSinceStartup;
+        lastClickTime = Time.realtimeSinceStartup;
+        UIManager.Instance.OnCloseWindow += OnCloseWindow;
+        PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerDataRefresh;
         needGuide = !MainLevelManager.Instance.IsPassedByMainLevelID(BattleManager.Instance.fightGuideMainLevelLimit);
 
         // SetBattleField(BattleManager.Instance.storyBattleField);
@@ -58,6 +60,8 @@
 
     protected override void OnPreClose()
     {
+        UIManager.Instance.OnCloseWindow -= OnCloseWindow;
+        PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerDataRefresh;
         UIManager.Instance.CloseWindow<BattleHUDWin>();
         BattleManager.Instance.onBattleFieldCreate -= OnCreateBattleField;
         UIManager.Instance.OnOpenWindow -= OnOpenWindow;
@@ -71,10 +75,6 @@
         }
     }
 
-    protected override void OnOpen()
-    {
-        base.OnOpen();
-    }
 
     protected override void OnClose()
     {
@@ -89,16 +89,38 @@
         battleField = null;
     }
 
-    protected override void NextFrameAfterOpen()
+
+
+    void OnCloseWindow(UIBase ui)
     {
-        base.NextFrameAfterOpen();
+        if (ui is NewBieWin)
+        {
+            lastClickTime = Time.realtimeSinceStartup;
+        }
     }
 
-    protected override void CompleteClose()
+    bool lastIsBoss = false;
+
+    void OnPlayerDataRefresh(PlayerDataType type)
     {
-        base.CompleteClose();
+        switch (type)
+        {
+
+            case PlayerDataType.ExAttr1:
+            case PlayerDataType.ExAttr2:
+                if (!lastIsBoss && MainLevelManager.Instance.CanChallengeBoss())
+                {
+                    //鍙寫鎴樼殑鏃跺�欎篃瑕佺瓑CD
+                    lastClickTime = Time.realtimeSinceStartup;
+                    lastIsBoss = true;
+                }
+                break;
+
+        }
     }
 
+
+
     public void SetBattleField(BattleField _battleField)
     {
         battleField = _battleField;
diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index 7a974fc..93caf6f 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/Main/System/HeroUI/HeroTrainWin.cs
@@ -95,6 +95,7 @@
     [SerializeField] Image redpointAwake;
     [SerializeField] Image redpointGift;
     [SerializeField] Image redpointLVUP;
+    [SerializeField] Image redpointBreakLVUP; //绐佺牬绾㈢偣
 
 
 
@@ -838,6 +839,7 @@
         redpointLVUP.SetActive(false);
         trainMainRedImg.SetActive(false);
         breakMainRedImg.SetActive(false);
+        redpointBreakLVUP.SetActive(false);
 
 
         var heroCnt = PackManager.Instance.GetItemCountByID(PackType.Hero, hero.heroId);
@@ -887,7 +889,7 @@
 
         if (HeroUIManager.Instance.IsCanBreak(hero))
         {
-            redpointLVUP.SetActive(true);
+            redpointBreakLVUP.SetActive(true);
             breakMainRedImg.SetActive(true);
         }
 
diff --git a/Main/System/HeroUI/HeroUIManager.Reborn.cs b/Main/System/HeroUI/HeroUIManager.Reborn.cs
index 484fa83..f8136fb 100644
--- a/Main/System/HeroUI/HeroUIManager.Reborn.cs
+++ b/Main/System/HeroUI/HeroUIManager.Reborn.cs
@@ -119,14 +119,31 @@
         int specialAttrType = selectList[4];
 
         List<string> retGuidList = new List<string>();
+
+        List<int> fullStarHeroIDList = new List<int>();
+        foreach (var heroInfo in _list)
+        {
+            if (heroInfo.heroStar < heroInfo.GetCurMaxStar())
+            {
+                //鐩稿悓姝﹀皢涓凡缁忔湁婊℃槦鐨�
+                continue;
+            }
+            var heorID = heroInfo.heroId;
+            if (fullStarHeroIDList.Contains(heorID))
+                continue;
+            fullStarHeroIDList.Add(heorID);
+
+        }
+
         foreach (var heroInfo in _list)
         {
 
             if (heroInfo.isAttrActive)
                 continue;
 
-            if (heroInfo.heroStar < heroInfo.GetCurMaxStar())
+            if (!fullStarHeroIDList.Contains(heroInfo.heroId))
             {
+                //鐩稿悓姝﹀皢涓凡缁忔湁婊℃槦鐨�
                 continue;
             }
 
diff --git a/Main/System/HeroUI/HeroUIManager.cs b/Main/System/HeroUI/HeroUIManager.cs
index 578acf9..91ad53b 100644
--- a/Main/System/HeroUI/HeroUIManager.cs
+++ b/Main/System/HeroUI/HeroUIManager.cs
@@ -605,7 +605,7 @@
 
             if (HeroManager.Instance.GetHeroCountByID(hero.heroId) > 1)
             {
-                heroEatRedPoint.state = RedPointState.Simple;
+                heroEatRedPoint.state = RedPointState.GetReward;
                 break;
             }
         }
diff --git a/Main/Utility/EnumHelper.cs b/Main/Utility/EnumHelper.cs
index f428ab2..268b065 100644
--- a/Main/Utility/EnumHelper.cs
+++ b/Main/Utility/EnumHelper.cs
@@ -1109,8 +1109,8 @@
     Simple = 1,
     Quantity = 2,
     Full = 3,
-    GetReward = 4,
-    New = 5,
+    New = 4,
+    GetReward = 5,
 }
 
 

--
Gitblit v1.8.0