From 27e508f58e143c1972c221578b5c9952fa018f54 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期二, 12 五月 2026 19:17:59 +0800
Subject: [PATCH] 492 武将登场和武将返场 增加元宝招募选项
---
Main/System/HeroDebut/HeroDebutCallButton.cs | 39 +++++++++++++++++++++++++++++++++------
1 files changed, 33 insertions(+), 6 deletions(-)
diff --git a/Main/System/HeroDebut/HeroDebutCallButton.cs b/Main/System/HeroDebut/HeroDebutCallButton.cs
index 36c203b..e30c548 100644
--- a/Main/System/HeroDebut/HeroDebutCallButton.cs
+++ b/Main/System/HeroDebut/HeroDebutCallButton.cs
@@ -40,14 +40,41 @@
needCostItemCnt = treasureSetConfig.CostItemCountList[index];
hasItemCnt = PackManager.Instance.GetItemCountByID(PackType.Item, treasureSetConfig.CostItemID);
- // 鐗╁搧涓嶈冻 && 娌¤秴璐у竵鎷涘嫙娆℃暟涓婇檺
- if (hasItemCnt < needCostItemCnt &&
- nowMoneyCnt + treasureCnt <= dailyMaxCountMoney)
+ // 鍐呴儴璇诲彇璐у竵鎷涘嫙寮�鍏崇姸鎬�
+ bool isMoneyToggleOn = false;
+ var act = manager.GetOperationHeroAppearInfo();
+ if (act != null)
{
- DisplayByMoney(treasureSetConfig.CostMoneyType, needCostMoneyCnt, moneyCount);
- return;
+ var config = ActHeroAppearConfig.Get(act.CfgID);
+ if (config != null)
+ {
+ isMoneyToggleOn = manager.LoadCallMoneyToggleData(config.CfgID, act.startDate, act.endDate);
+ }
}
- DisplayByItem(treasureSetConfig.CostItemID, treasureCnt);
+
+ if (isMoneyToggleOn)
+ {
+ // 鍕鹃�夛細璐у竵浼樺厛锛屾病瓒呮鏁板氨鐢ㄨ揣甯�
+ if (nowMoneyCnt + treasureCnt <= dailyMaxCountMoney)
+ {
+ DisplayByMoney(treasureSetConfig.CostMoneyType, needCostMoneyCnt, moneyCount);
+ }
+ else
+ {
+ DisplayByItem(treasureSetConfig.CostItemID, treasureCnt);
+ }
+ }
+ else
+ {
+ // 娌″嬀閫夛細淇濇寔鍘熼�昏緫
+ if (hasItemCnt < needCostItemCnt &&
+ nowMoneyCnt + treasureCnt <= dailyMaxCountMoney)
+ {
+ DisplayByMoney(treasureSetConfig.CostMoneyType, needCostMoneyCnt, moneyCount);
+ return;
+ }
+ DisplayByItem(treasureSetConfig.CostItemID, treasureCnt);
+ }
}
void DisplayByMoney(int moneyType, long needCostMoneyCnt, long moneyCount)
--
Gitblit v1.8.0