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 +++++++++++++++++--
Main/System/HeroUI/HeroDeleteWin.cs | 26 ++++++++++++++++++++++++--
2 files changed, 41 insertions(+), 4 deletions(-)
diff --git a/Main/System/HeroUI/HeroDeleteWin.cs b/Main/System/HeroUI/HeroDeleteWin.cs
index 737c79b..ee7189a 100644
--- a/Main/System/HeroUI/HeroDeleteWin.cs
+++ b/Main/System/HeroUI/HeroDeleteWin.cs
@@ -115,14 +115,36 @@
void QuickSelect()
{
- //鍙�夌簿鑻�
+ //鍏堥亶鍘嗕竴閬嶆壘鍑哄搧璐ㄦ渶浣庣殑
+ int minQuality = 100;
+ for (int i = 0; i < HeroUIManager.Instance.heroDeleteSortList.Count; i++)
+ {
+ HeroInfo hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.heroDeleteSortList[i]);
+ if (hero == null)
+ continue;
+ if (hero.Quality < minQuality)
+ {
+ minQuality = hero.Quality;
+ }
+ if (minQuality == 1)
+ {
+ //宸茬粡鎵惧埌浜嗘渶浣庡搧璐ㄧ殑锛屽氨涓嶇敤鍐嶆壘浜�
+ break;
+ }
+ }
+ if (minQuality == 100 || minQuality > 2)
+ {
+ //鍙湁浣庡搧璐ㄧ殑鎵嶆湁蹇�熼�夋嫨
+ minQuality = 1;
+ }
+ //鍙�夌簿鑻变互涓�
for (int i = 0; i < HeroUIManager.Instance.heroDeleteSortList.Count; i++)
{
HeroInfo hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.heroDeleteSortList[i]);
if (hero == null)
continue;
- if (hero.Quality > 2)
+ if (hero.Quality != minQuality)
continue;
if (hero.awakeLevel > 0)
continue;
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