From a123619cfe584a4cbb2dd1589c027d2d91f799b7 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 19 三月 2026 15:55:50 +0800
Subject: [PATCH] 492 武将登场 修改保底招募次数计算错误
---
Main/System/HeroDebut/HeroDebutCallWin.cs | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/Main/System/HeroDebut/HeroDebutCallWin.cs b/Main/System/HeroDebut/HeroDebutCallWin.cs
index e3d74fb..8c31f02 100644
--- a/Main/System/HeroDebut/HeroDebutCallWin.cs
+++ b/Main/System/HeroDebut/HeroDebutCallWin.cs
@@ -2,6 +2,7 @@
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
+using System.Linq;
public class HeroDebutCallWin : UIBase
{
@@ -254,7 +255,7 @@
xbButton10.Display(config.ActTreasureType, 1);
resMoneyCallCntText.text = Language.Get("HeroDebut24", Mathf.Max(treasureSetConfig.DailyMaxCountMoney - xbTypeInfo.treasureCountTodayGold, 0));
- var needCount = HappyXBModel.Instance.GetNextXBCountForBigAward(treasureType, out var qualityList);
+ var needCount = GetNextXBCountForBigAward(treasureType);
nextBigAwardCntText.text = needCount.ToString();
heroQualityText.text = Language.Get($"heroCallQaulity{heroConfig.Quality}");
@@ -286,6 +287,24 @@
OnSecondEvent();
}
+ public int GetNextXBCountForBigAward(int type)
+ {
+ XBTypeInfo typeInfo = HappyXBModel.Instance.GetXBInfoByType(type);
+ if (typeInfo == null) return 0;
+
+ var xbConfig = HappyXBModel.Instance.GetXBItemConfigByType(type);
+ var luckList = xbConfig.LuckyItemRateInfo.Keys.ToList();
+ luckList.Sort();
+ for (int i = 0; i < luckList.Count; i++)
+ {
+ var luckyValue = typeInfo.luckValue;
+ if (luckyValue < luckList[i])
+ {
+ return luckList[i] - luckyValue;
+ }
+ }
+ return 0;
+ }
void ShowTop3()
{
for (int i = 0; i < top3NameText.Length; i++)
--
Gitblit v1.8.0