From 51b0f6ed9f4e1d3bb6f8144470b46908c7699a96 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 11 五月 2026 16:20:37 +0800
Subject: [PATCH] Merge branch 'master' into h5version
---
Main/System/HeroUI/HeroUIManager.Collect.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/Main/System/HeroUI/HeroUIManager.Collect.cs b/Main/System/HeroUI/HeroUIManager.Collect.cs
index 924e3a2..06a977c 100644
--- a/Main/System/HeroUI/HeroUIManager.Collect.cs
+++ b/Main/System/HeroUI/HeroUIManager.Collect.cs
@@ -162,8 +162,8 @@
HeroConfig heroConfig = HeroConfig.Get(heroID);
if (heroConfig.PlayerCanUse == 0)
continue;
- // 鏂板锛氬紑鏈嶇x澶╂樉绀哄浘閴达紝0琛ㄧず涓嶉檺鍒跺紑鏈嶅ぉ
- if (heroConfig.OpenCollectionDay > 0 && TimeUtility.OpenDay + 1 < heroConfig.OpenCollectionDay)
+ // 寮�鏈嶇x澶╂樉绀哄浘閴达紝0琛ㄧず涓嶉檺鍒跺紑鏈嶅ぉ
+ if (HasOpenCollectionDayLimit(heroID) && !IsOpenCollectionDayMet(heroID))
continue;
if (!heroCollectDict.ContainsKey(heroConfig.Quality))
{
@@ -414,6 +414,57 @@
}
+ #region 寮�鏈嶅ぉ鏁扮浉鍏虫柟娉�
+
+ /// <summary>
+ /// 妫�鏌ユ灏嗘槸鍚﹂厤缃簡寮�鏈嶅睍绀哄ぉ鏁伴檺鍒�
+ /// </summary>
+ /// <param name="heroID">姝﹀皢ID</param>
+ /// <returns>true: 鏈夊紑鏈嶅ぉ闄愬埗; false: 鏃犻檺鍒讹紙OpenCollectionDay==0 鎴栭厤缃笉瀛樺湪锛�</returns>
+ public static bool HasOpenCollectionDayLimit(int heroID)
+ {
+ HeroConfig heroConfig = HeroConfig.Get(heroID);
+ if (heroConfig == null)
+ return false;
+ return heroConfig.OpenCollectionDay > 0;
+ }
+
+ /// <summary>
+ /// 妫�鏌ユ灏嗘槸鍚﹀凡婊¤冻寮�鏈嶅睍绀哄ぉ鏁拌姹傦紙浠呭湪鏈夐檺鍒舵椂璋冪敤鏈夋剰涔夛級
+ /// </summary>
+ /// <param name="heroID">姝﹀皢ID</param>
+ /// <returns>true: 宸叉弧瓒冲睍绀哄ぉ鏁�; false: 灏氭湭婊¤冻</returns>
+ public static bool IsOpenCollectionDayMet(int heroID)
+ {
+ HeroConfig heroConfig = HeroConfig.Get(heroID);
+ if (heroConfig == null)
+ return false;
+ // OpenCollectionDay==0 鏃犻檺鍒讹紝瑙嗕负宸叉弧瓒�
+ if (heroConfig.OpenCollectionDay <= 0)
+ return true;
+ return TimeUtility.OpenDay + 1 >= heroConfig.OpenCollectionDay;
+ }
+
+ /// <summary>
+ /// 妫�鏌ョ緛缁婄粍鍚堜腑鎵�鏈夋灏嗘槸鍚﹂兘婊¤冻寮�鏈嶅睍绀哄ぉ鏁�
+ /// 鍙湁閰嶇疆浜嗗紑鏈嶅ぉ闄愬埗鐨勬灏嗘墠闇�瑕佹鏌ワ紝鏈厤缃檺鍒剁殑姝﹀皢瑙嗕负婊¤冻
+ /// </summary>
+ /// <param name="fetterConfig">缇佺粖閰嶇疆</param>
+ /// <returns>true: 鎵�鏈夋灏嗛兘婊¤冻; false: 鏈夋灏嗕笉婊¤冻</returns>
+ public static bool IsFetterAllHeroOpen(HeroFetterConfig fetterConfig)
+ {
+ for (int i = 0; i < fetterConfig.HeroIDList.Length; i++)
+ {
+ int heroID = fetterConfig.HeroIDList[i];
+ // 鏈夐檺鍒朵絾鏈弧瓒� -> 璇ョ緛缁婁笉鍙樉绀�
+ if (HasOpenCollectionDayLimit(heroID) && !IsOpenCollectionDayMet(heroID))
+ return false;
+ }
+ return true;
+ }
+
+ #endregion
+
#endregion
}
--
Gitblit v1.8.0