hch
2025-09-04 619223516d631189a2f97ec4843d00877a0cce01
155 子 【武将】招募系统 / 【武将】招募系统-客户端
2个文件已修改
45 ■■■■■ 已修改文件
Main/System/HappyXB/HappyXBModel.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HappyXB/HeroCallWin.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HappyXB/HappyXBModel.cs
@@ -428,6 +428,33 @@
        return freeCountToday < funcSet.DailyFreeCount;
    }
    //获取还需多少次可得幸运奖励
    public int GetNextXBCountForBigAward(int type, out List<int> qualityList)
    {
        qualityList = new List<int>();
        XBTypeInfo typeInfo = GetXBInfoByType(type);
        if (typeInfo == null)
        {
            return 0;
        }
        var xbConfig = GetXBItemConfigByType(type);
        var luckList = xbConfig.LuckyItemRateInfo.Keys.ToList();
        luckList.Sort();
        //按阶梯显示
        for (int i = 0; i < luckList.Count; i++)
        {
            if (typeInfo.luckValue < luckList[i])
            {
                //把二维数组里的所有第二个元素组成新列表
                qualityList = xbConfig.LuckyItemRateInfo[luckList[i]].Select(x => x[1]).ToList();
                qualityList.Sort();
                return luckList[i] - typeInfo.luckValue;
            }
        }
        return 0;
    }
    public bool CheckIsXBTool(int itemId, int type)
    {
Main/System/HappyXB/HeroCallWin.cs
@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
@@ -22,6 +23,7 @@
    [SerializeField] Image call10ItemIcon;
    [SerializeField] Text call10Text;
    [SerializeField] Button closeBtn;
    [SerializeField] Text callTip;
    protected override void InitComponent()
@@ -43,7 +45,7 @@
        {
            UIManager.Instance.OpenWindow<HeroCallScoreWin>();
        });
        ruleBtn.AddListener(() =>
        {
            UIManager.Instance.OpenWindow<HeroCallRuleWin>();
@@ -78,14 +80,14 @@
        }
        else
        {
            call1Text.text = Language.Get("L1100", item.ItemName, UIHelper.AppendColor(funcSet.CostItemCountList[0] > itemCount ? TextColType.Red :TextColType.LightWhite, funcSet.CostItemCountList[0].ToString()));
            call1Text.text = Language.Get("L1100", item.ItemName, UIHelper.AppendColor(funcSet.CostItemCountList[0] > itemCount ? TextColType.Red : TextColType.LightWhite, funcSet.CostItemCountList[0].ToString()));
        }
        call10Text.text = Language.Get("L1100", item.ItemName, UIHelper.AppendColor(funcSet.CostItemCountList[1] > itemCount ? TextColType.Red : TextColType.LightWhite, funcSet.CostItemCountList[1].ToString()));
        scoreText.text = UIHelper.GetMoneyCnt(51) + "/" + TreasureSetConfig.Get((int)HappXBTitle.HeroCallScore).CostMoneyList[0];
        if (UIHelper.GetMoneyCnt(51) >= TreasureSetConfig.Get((int)HappXBTitle.HeroCallScore).CostMoneyList[0])
        {
        {
            scoreTween.SetActive(true);
        }
        else
@@ -94,6 +96,16 @@
        }
        RefreshFreeTime();
        //再招募{0}次后必得{1}武将
        List<int> qualityList = new List<int>();
        var needCount = HappyXBModel.Instance.GetNextXBCountForBigAward((int)HappXBTitle.HeroCallAdvanced, out qualityList);
        List<string> qualityStrList = new List<string>();
        for (int i = 0; i < qualityList.Count; i++)
        {
            qualityStrList.Add(UIHelper.AppendColor(qualityList[i], Language.Get("equipQualityFormat", Language.Get("CommonQuality" + qualityList[i]))));
        }
        callTip.text = Language.Get("HeroCall6", needCount, string.Join(Language.Get("L1130"), qualityStrList.ToArray()));
    }
    //每秒刷新免费CD的倒计时