From 2b9b8d0e57659152149a13c2db5d9e39ca31ee20 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 03 二月 2026 13:00:34 +0800
Subject: [PATCH] 0312 遣散-快速选择 只选符合条件中当前最低品质的;优化武将多选根据星数计算,显示按武将个数计算

---
 Main/System/HeroUI/HeroGiftRoleListCell.cs |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/Main/System/HeroUI/HeroGiftRoleListCell.cs b/Main/System/HeroUI/HeroGiftRoleListCell.cs
index d4466f2..defb77a 100644
--- a/Main/System/HeroUI/HeroGiftRoleListCell.cs
+++ b/Main/System/HeroUI/HeroGiftRoleListCell.cs
@@ -75,7 +75,7 @@
 
         int maxStarCnt = HeroUIManager.Instance.GetMaxStarCount(hero.heroId, hero.Quality);
         int girdIndex = hero.itemHero.gridIndex;
-        if (hero.heroStar > 0)
+        if (hero.heroStar > 0 && !selectToggle.isOn)
         {
             ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
             Language.Get("HeroGift13"), (bool isOK) =>
@@ -96,7 +96,22 @@
     {
         if (!selectToggle.isOn)
         {
-            if (HeroUIManager.Instance.selectEatHeroIndexList.Count >= maxStarCnt)
+
+            //闇�瑕佺粺璁¤鍚炲櫖鐨勬灏嗘槦鏁�
+            int eatStar = 0;
+            for (int i = 0; i < HeroUIManager.Instance.selectEatHeroIndexList.Count; i++)
+            {
+                var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.heroEatList[i]);
+                if (hero == null)
+                    continue;
+                eatStar += hero.heroStar + 1;  //鏈綋涔熺畻鍙鍔�1鏄�
+            }
+            // 闇�澧炲姞寰呴�夎繖鍙殑鏄熺骇
+            var selectStar = HeroManager.Instance.GetHeroByIndex(girdIndex).heroStar + 1; //鏈綋涔熺畻鍙鍔�1鏄�
+
+            // 涓绘灏嗘槦绾�
+            var star = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuidForGiftFunc)?.heroStar;
+            if (eatStar + selectStar + star > maxStarCnt)
             {
                 SysNotifyMgr.Instance.ShowTip("HeroGiftEat1");
                 return;

--
Gitblit v1.8.0