yyl
2025-08-11 b2d7bb59dc37c7b350786b076ee2f344b7c8911f
Main/System/HeroUI/HeroCardCell.cs
@@ -19,15 +19,17 @@
    [SerializeField] Text awakeLVText;
    [SerializeField] List<Image> starImgList;
    string guid;
    public void Display(int index)
    {
        var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.heroSortList[index]);
        guid = HeroUIManager.Instance.heroSortList[index];
        var hero = HeroManager.Instance.GetHero(guid);
        if (hero == null)
        {
            this.gameObject.SetActive(false);
            return;
        }
        this.gameObject.SetActive(true);
        heroCardBG.SetSprite("herocardbg" + hero.Quality);
        if (glowMaterial != null)
@@ -36,15 +38,15 @@
        }
        lvText.text = Language.Get("L1094") + hero.heroLevel.ToString();
        var heroConfig = hero.heroConfig;
        countryImg.SetSprite("herocountry" + heroConfig.Country);
        jobImg.SetSprite("herojob" + heroConfig.Class);
        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));
        redpoint.redpointId = MainRedDot.HeroCardRedpoint * 1000 + hero.itemHero.gridIndex;
        var funcState = hero.funcState;
        if (funcState > 0)
        {
        {
            trainStateImg.SetActive(true);
            trainStateImg.SetSprite("herofuncstate" + hero.funcState);
        }
@@ -67,13 +69,19 @@
            else if ((hero.heroStar - 1) % starImgList.Count >= i)
            {
                starImgList[i].SetActive(true);
                starImgList[i].SetSprite("herostar" +  (((hero.heroStar - 1)/starImgList.Count)+1)*starImgList.Count);
                starImgList[i].SetSprite("herostar" + (((hero.heroStar - 1) / starImgList.Count) + 1) * starImgList.Count);
            }
            else
            {
                starImgList[i].SetActive(false);
            }
        }
        heroCardBtn.AddListener(() =>
        {
            HeroUIManager.Instance.selectHeroGuid = guid;
            UIManager.Instance.OpenWindow<HeroTrainWin>();
        });
    }
}