hch
2026-02-02 04ffe31b6a2b2fbcfecc83abb44a8aa233f2e53f
Main/System/HeroUI/HeroTrainWin.cs
@@ -30,6 +30,7 @@
    [SerializeField] HeroConnectionCell connetionForm;  //羁绊
    [SerializeField] Button resetBtn;
    [SerializeField] Button deleteBtn;
    [SerializeField] Transform deleteTip;
    [SerializeField] Button seeLhBtn;   //查看立绘
    [SerializeField] SkillBaseCell normalSkillCell;
    [SerializeField] SkillBaseCell angerSkillCell;
@@ -208,6 +209,7 @@
        {
            functionOrder = 0;
            DisplayTrainOrBreak(hero);
            ForceRefreshLayout();
        });
        breakMainButton.AddListener(() =>
@@ -294,11 +296,23 @@
        RefreshFreeze();
        RefreshRedImg();
        DisplayTrainOrBreak(hero);
        ShowDeleteTip();
        HeroUIManager.Instance.RemoveNewHero(hero.heroId);
        ForceRefreshLayout();
    }
    void ShowDeleteTip()
    {
        deleteTip.SetActive(false);
        if (hero != null && hero.Quality == 1 && HeroUIManager.Instance.IsTheSameHeroFullStar(hero.heroId))
        {
            deleteTip.SetActive(true);
        }
    }
    /// <summary>
    /// 强制刷新Layout,解决嵌套Layout和ContentSizeFitter的重叠问题
@@ -339,6 +353,7 @@
            return;
        }
        RefreshAttr();
        heroLVBreakCell.RefreshLV(hero);
    }
    void RefreshHeroEvent(HeroInfo hero)
@@ -392,8 +407,24 @@
        //     SysNotifyMgr.Instance.ShowTip("UnlockHero");
        //     return;
        // }
        HeroUIManager.Instance.jumpDeleteHeroGuid = guid;
        if (CanDelete())
        {
            HeroUIManager.Instance.jumpDeleteHeroGuid = guid;
        }
        else
        {
            HeroUIManager.Instance.jumpDeleteHeroGuid = "";
        }
        UIManager.Instance.OpenWindow<HeroDeleteWin>();
    }
    bool CanDelete()
    {
        if (hero.isActive)
            return false;
        return HeroUIManager.Instance.IsTheSameHeroFullStar(hero.heroId);
    }
    void RefreshStars()
@@ -793,9 +824,9 @@
        }
    }
    void TeamPosChangeEvent(TeamType teamType)
    void TeamPosChangeEvent(int teamType)
    {
        if (teamType != TeamType.Story)
        if (teamType != TeamManager.Instance.GetMainTeamID())
            return;
        fightPowerText.text = UIHelper.ReplaceLargeArtNum(hero.CalculateFightPower());
    }
@@ -846,7 +877,7 @@
        var itemPack = PackManager.Instance.GetSinglePack(PackType.Item);
        if (heroCnt > 1)
        if (heroCnt > 1 && hero.heroStar < hero.GetCurMaxStar())
        {
            redpointGift.SetActive(true);
            trainMainRedImg.SetActive(true);
@@ -865,14 +896,14 @@
        }
        if (!hero.IsInTeamByTeamType(TeamType.Story))
        if (!hero.IsInTeamByTeamType(BattlePreSetType.Story))
        {
            return;
        }
        //5星后才能觉醒
        if (hero.heroStar >= HeroUIManager.Instance.starLevelCanAwake)
        if (hero.heroStar >= HeroUIManager.Instance.starLevelCanAwake && FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.HeroAwake))
        {
            //判断觉醒材料是否足够
            var maxAwakeLV = HeroAwakeConfig.GetMaxAwakeLV(hero.heroId);