| | |
| | | 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) |