hch
2026-02-02 04ffe31b6a2b2fbcfecc83abb44a8aa233f2e53f
Main/System/HeroUI/HeroCardCell.cs
@@ -14,6 +14,7 @@
    [SerializeField] RedpointBehaviour redpoint;
    [SerializeField] Image newImage;    //新标识和红点互斥
    [SerializeField] Image trainStateImg;
    [SerializeField] Image starRedImg;
    [SerializeField] Text nameText;
    [SerializeField] Image awakeImg;
    [SerializeField] Text awakeLVText;
@@ -29,6 +30,7 @@
            this.gameObject.SetActive(false);
            return;
        }
        this.gameObject.name = $"HeroCardCell_{hero.heroId}";
        this.gameObject.SetActive(true);
        heroCardBG.SetSprite("herocardbg" + hero.Quality);
@@ -37,9 +39,9 @@
        countryImg.SetSprite(HeroUIManager.Instance.GetCountryIconName(heroConfig.Country));
        jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(heroConfig.Class));
        heroModel.Create(heroConfig.SkinIDList[hero.SkinIndex], heroConfig.UIScale);
        onStateImg.SetActive(hero.IsInTeamByTeamType(TeamType.Story));
        onStateImg.SetActive(hero.IsInTeamByTeamType(BattlePreSetType.Story));
        int teamPos = TeamManager.Instance.GetTeam(TeamType.Story).GetPosition(hero.itemHero.guid);
        int teamPos = TeamManager.Instance.GetTeam(BattlePreSetType.Story).GetPosition(hero.itemHero.guid);
        if (teamPos >= 0)
        {
            redpoint.redpointId = MainRedDot.HeroCardRedpoint * 10 + teamPos;
@@ -61,6 +63,9 @@
        {
            trainStateImg.SetActive(false);
        }
        starRedImg.SetActive(funcState == 2);
        nameText.text = hero.breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, hero.breakLevel);
        awakeImg.SetActive(hero.awakeLevel > 0);
        awakeLVText.text = hero.awakeLevel.ToString();
@@ -87,7 +92,7 @@
        heroCardBtn.AddListener(() =>
        {
            HeroUIManager.Instance.selectHeroGuid = guid;
            UIManager.Instance.OpenWindow<HeroTrainWin>();
            UIManager.Instance.OpenWindow<HeroTrainWin>(funcState == 3 ? 1 : 0);
        });
    }
}