From 8abae5507079d754f081edd94d52ae5816d4a03c Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 08 十二月 2025 21:06:41 +0800
Subject: [PATCH] 0312 武将生效未上阵的增加吞噬红点; 遣散过滤未满星 生效的

---
 Main/Utility/EnumHelper.cs                 |    3 
 Main/System/Hero/HeroManager.cs            |    5 +
 Main/System/HeroUI/HeroCardCell.cs         |    4 +
 Main/System/Redpoint/MainRedDot.cs         |    3 
 Main/System/HeroUI/HeroListWin.cs          |    3 +
 Main/System/HeroUI/HeroUIManager.Reborn.cs |   69 ++++++++++++++++++++++
 Main/System/HeroUI/HeroUIManager.cs        |   37 +++++++++++
 7 files changed, 119 insertions(+), 5 deletions(-)

diff --git a/Main/System/Hero/HeroManager.cs b/Main/System/Hero/HeroManager.cs
index 63dd298..394e012 100644
--- a/Main/System/Hero/HeroManager.cs
+++ b/Main/System/Hero/HeroManager.cs
@@ -83,6 +83,11 @@
         return heroInfoDict.Values.ToList();
     }
 
+    public List<string> GetHeroGuidList()
+    {
+        return heroInfoDict.Keys.ToList();
+    }
+
     /// 鍙傛暟锛� 鑱屼笟锛屽浗瀹讹紝浼ゅ绫诲瀷锛�6澶ф垬鏂楀睘鎬э紝鐗规畩灞炴��
     public List<string> GetHeroGuidList(List<int> selectList = null)
     {
diff --git a/Main/System/HeroUI/HeroCardCell.cs b/Main/System/HeroUI/HeroCardCell.cs
index cd524b9..f273f7e 100644
--- a/Main/System/HeroUI/HeroCardCell.cs
+++ b/Main/System/HeroUI/HeroCardCell.cs
@@ -14,6 +14,7 @@
     [SerializeField] RedpointBehaviour redpoint;
     [SerializeField] Image newImage;    //鏂版爣璇嗗拰绾㈢偣浜掓枼
     [SerializeField] Image trainStateImg;
+    [SerializeField] Image starRedImg;
     [SerializeField] Text nameText;
     [SerializeField] Image awakeImg;
     [SerializeField] Text awakeLVText;
@@ -62,6 +63,9 @@
         {
             trainStateImg.SetActive(false);
         }
+
+        starRedImg.SetActive(funcState == 2);
+
         nameText.text = hero.breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, hero.breakLevel);
         awakeImg.SetActive(hero.awakeLevel > 0);
         awakeLVText.text = hero.awakeLevel.ToString();
diff --git a/Main/System/HeroUI/HeroListWin.cs b/Main/System/HeroUI/HeroListWin.cs
index b010d65..1c8360d 100644
--- a/Main/System/HeroUI/HeroListWin.cs
+++ b/Main/System/HeroUI/HeroListWin.cs
@@ -160,6 +160,7 @@
         HeroUIManager.Instance.SortHeroList();
         RefreshEmptyTip();
         CreateScroller();
+        heroListScroller.JumpIndex(0);
     }
 
     //涓婇樀鍔犳垚
@@ -227,6 +228,8 @@
             }
         }
         heroListScroller.Restart();
+        heroListScroller.lockType = EnhanceLockType.KeepVertical;
+        
     }
 
     int GetAttrActiveHeroCount()
diff --git a/Main/System/HeroUI/HeroUIManager.Reborn.cs b/Main/System/HeroUI/HeroUIManager.Reborn.cs
index 44f1843..2156bf8 100644
--- a/Main/System/HeroUI/HeroUIManager.Reborn.cs
+++ b/Main/System/HeroUI/HeroUIManager.Reborn.cs
@@ -100,9 +100,76 @@
     }
 
 
+    //閬f暎鑾峰彇绗﹀悎鏉′欢鐨勬灏嗗垪琛�
+    /// 鍙傛暟锛� 鑱屼笟锛屽浗瀹讹紝浼ゅ绫诲瀷锛�6澶ф垬鏂楀睘鎬э紝鐗规畩灞炴��
+    public List<string> GetHeroGuidListDelectFunc(List<int> selectList = null)
+    {
+        var _list = HeroManager.Instance.GetHeroList();
+        if (selectList.IsNullOrEmpty())
+            return HeroManager.Instance.GetHeroGuidList();
+
+        int job = selectList[0];
+        int country = selectList[1];
+        int hurtType = selectList[2];
+        int fightAttrType = selectList[3];
+        int specialAttrType = selectList[4];
+
+        List<string> retGuidList = new List<string>();
+        foreach (var heroInfo in _list)
+        {
+
+            if (heroInfo.isAttrActive)
+                continue;
+
+            if (heroInfo.heroStar < heroInfo.GetCurMaxStar())
+            {
+                continue;
+            }
+
+            //0浠h〃鍏ㄩ儴, 鍚岀骇鍒槸鍙閫夛紝涓嶅悓绾у埆涓轰笖鐨勫叧绯�
+            bool isMatch = true;
+            if (job != 0)
+            {
+                isMatch = isMatch && (job & (1 << heroInfo.heroConfig.Class)) > 0;
+            }
+            if (country != 0)
+            {
+                isMatch = isMatch && (country & (1 << heroInfo.heroConfig.Country)) > 0;
+            }
+            if (hurtType != 0)
+            {
+                isMatch = isMatch && (hurtType & (1 << heroInfo.heroConfig.HurtType)) > 0;
+            }
+            if (fightAttrType != 0)
+            {
+                isMatch = isMatch && (fightAttrType & (1 << heroInfo.heroConfig.Specialty)) > 0;
+            }
+            if (specialAttrType != 0)
+            {
+                bool isMatch2 = false;
+                for (int i = 0; i < heroInfo.heroConfig.Specialty2.Length; i++)
+                {
+                    isMatch2 = (specialAttrType & (1 << heroInfo.heroConfig.Specialty2[i])) > 0;
+                    if (isMatch2)
+                        break;
+                }
+                isMatch = isMatch && isMatch2;
+            }
+            if (isMatch)
+            {
+                retGuidList.Add(heroInfo.itemHero.guid);
+            }
+
+        }
+        return retGuidList;
+    }
+
+
+
+
     public void SortHeroDeleteList()
     {
-        heroDeleteSortList = HeroManager.Instance.GetHeroGuidList(selectHeroDeleteList);
+        heroDeleteSortList = GetHeroGuidListDelectFunc(selectHeroDeleteList);
         heroDeleteSortList.Sort(CmpDeleteHero);
     }
 
diff --git a/Main/System/HeroUI/HeroUIManager.cs b/Main/System/HeroUI/HeroUIManager.cs
index 84e6627..e8f86b2 100644
--- a/Main/System/HeroUI/HeroUIManager.cs
+++ b/Main/System/HeroUI/HeroUIManager.cs
@@ -467,12 +467,19 @@
     // 涓荤嚎涓婇樀姝﹀皢鎵嶉渶瑕佹彁閱�  瑙夐啋锛炲崌鏄燂紴绐佺牬锛炲崌绾�
     public int GetFuncState(HeroInfo hero)
     {
+        if (!hero.isAttrActive)
+            return 0;
+            
+        var heroCnt = PackManager.Instance.GetItemCountByID(PackType.Hero, hero.heroId);
         if (!hero.IsInTeamByTeamType(TeamType.Story))
         {
+            if (hero.heroStar < hero.GetCurMaxStar() && heroCnt > 1)
+            {
+                return 2;
+            }
             return 0;
         }
 
-        var heroCnt = PackManager.Instance.GetItemCountByID(PackType.Hero, hero.heroId);
         var itemPack = PackManager.Instance.GetSinglePack(PackType.Item);
         //5鏄熷悗鎵嶈兘瑙夐啋
         if (hero.heroStar < starLevelCanAwake)
@@ -493,7 +500,10 @@
             }
         }
 
-        if (heroCnt > 1) return 2;
+        if (hero.heroStar < hero.GetCurMaxStar() && heroCnt > 1)
+        {
+            return 2;
+        }
 
         var maxBreakLV = HeroBreakConfig.GetMaxBreakLv(hero.heroId);
         if (hero.breakLevel < maxBreakLV)
@@ -526,6 +536,8 @@
     List<Redpoint> heroOnTeamRedpointList = new List<Redpoint>();   //涓婇樀鐨勬灏嗙孩鐐�
     List<Redpoint> heroBookRedpointList = new List<Redpoint>(); //鍥鹃壌鎵�鏈夋灏嗙孩鐐�
 
+    //鐢熸晥鏈笂闃电殑 鍙悶鍣殑鍏辩敤涓�涓孩鐐�
+    Redpoint heroEatRedPoint = new Redpoint(MainRedDot.HeroCardRedpoint, MainRedDot.HeroCardRedpoint * 10 + 8);
     //鏂版爣璇嗙殑绾㈢偣 鎵�鏈夋灏嗙粺涓�涓�
     Redpoint newMarkRedPoint = new Redpoint(MainRedDot.HeroCardRedpoint, MainRedDot.HeroCardRedpoint * 10 + 9);
     void InitHeroOnTeamRedpointList()
@@ -566,6 +578,27 @@
         }
 
         newMarkRedPoint.state = newHeroIDList.Count > 0 ? RedPointState.New : RedPointState.None;
+
+        heroEatRedPoint.state = RedPointState.None;
+        var _list = HeroManager.Instance.GetHeroList();
+        foreach (var hero in _list)
+        {
+            if (!hero.isAttrActive)
+            {
+                continue;
+            }
+            if (hero.heroStar >= hero.GetCurMaxStar())
+            {
+                continue;
+            }
+
+            if (HeroManager.Instance.GetHeroCountByID(hero.heroId) > 1)
+            {
+                heroEatRedPoint.state = RedPointState.Simple;
+                break;
+            }
+        }
+
     }
 
 
diff --git a/Main/System/Redpoint/MainRedDot.cs b/Main/System/Redpoint/MainRedDot.cs
index 170f90c..b3d9398 100644
--- a/Main/System/Redpoint/MainRedDot.cs
+++ b/Main/System/Redpoint/MainRedDot.cs
@@ -70,7 +70,8 @@
     //鑷姩鎴樻枟
     public const int RedPoint_AutoBattleKey = 110;
     Redpoint autoBattleRedpoint = new Redpoint(RedPoint_AutoBattleKey);
-
+    public const int RedPoint_OSMainLevel = 111;
+    public const int RedPoint_OSHeroCard = 112;
     public const int RedPoint_Download = 116;
 
     //姝﹀皢鍗�
diff --git a/Main/Utility/EnumHelper.cs b/Main/Utility/EnumHelper.cs
index 6367e33..2a51539 100644
--- a/Main/Utility/EnumHelper.cs
+++ b/Main/Utility/EnumHelper.cs
@@ -837,8 +837,9 @@
     Horse = 37,  //鍧愰獞
     BattlePass = 40, //鍩洪噾锛堟垬浠わ級
     LLMJ = 41,  //鍘嗙粌绉樼瑘
+    OSMainLevl = 45, //寮�鏈嶅叧鍗℃娲诲姩
+    OSHeroCall = 46, //寮�鏈嶆灏嗗彫鍞ゆ娲诲姩
     FunctionPreview = 48, //鍔熻兘棰勮
-
 }
 
 

--
Gitblit v1.8.0