hch
2025-07-29 81298e554df8d11aeefe7b08aa3d45f1593bf586
0312 防范报错
7个文件已修改
56 ■■■■■ 已修改文件
Main/System/Battle/BattleField/BattleField.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleObject/BattleObjMgr.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleObject/BattleObject.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleObject/BattleObjectFactory.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroListWin.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroUIManager.cs 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Team/TeamManager.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleField/BattleField.cs
@@ -151,7 +151,8 @@
        {
            return;
        }
        if (recordPlayer == null || battleObjMgr == null)
            return;
        recordPlayer.Run();
        battleObjMgr.Run();
Main/System/Battle/BattleObject/BattleObjMgr.cs
@@ -33,15 +33,17 @@
        }
        for (int i = 0; i < teamBase.serverHeroes.Length; i++)
        {
            TeamHero teamHero = teamBase.serverHeroes[i];
            if (teamHero != null)
            {
                TeamHero teamHero = teamBase.serverHeroes[i];
                if (teamHero != null)
                {
                    BattleObject battleObj = BattleObjectFactory.CreateBattleObject(battleField, posNodeList, teamHero, _Camp);
                    allBattleObjDict.Add(battleObj.ObjID, battleObj);
                    campDict.Add(teamHero.positionNum, battleObj);
                }
                BattleObject battleObj = BattleObjectFactory.CreateBattleObject(battleField, posNodeList, teamHero, _Camp);
                if (battleObj.ObjID == 0)
                    continue;
                allBattleObjDict.Add(battleObj.ObjID, battleObj);
                campDict.Add(teamHero.positionNum, battleObj);
            }
        }
    }
    
    public BattleObject GetBattleObject(int objId)
Main/System/Battle/BattleObject/BattleObject.cs
@@ -67,7 +67,7 @@
        motionBase = new MotionBase();
        motionBase.Init(heroGo.GetComponentInChildren<SkeletonGraphic>(true));
        motionBase.onAnimationComplete += OnAnimationComplete;
        buffMgr = new BattleObjectBuffMgr();
        buffMgr.Init(this);
        renderers = heroGo.GetComponentsInChildren<Renderer>(true);
Main/System/Battle/BattleObject/BattleObjectFactory.cs
@@ -13,7 +13,7 @@
    {
        HeroSkinConfig skinCfg = teamHero.skinConfig;
        GameObject battleGO = ResManager.Instance.LoadAsset<GameObject>("Hero/SpineRes", "Hero_001"/*skinCfg.SpineRes*/);
        SkeletonGraphic skeletonGraphic = battleGO.GetComponent<SkeletonGraphic>();
        SkeletonGraphic skeletonGraphic = battleGO.GetComponentInChildren<SkeletonGraphic>();
        skeletonGraphic.skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("Hero/SpineRes/", skinCfg.SpineRes);
        skeletonGraphic.Initialize(true);
        GameObject goParent = posNodeList[teamHero.positionNum];
Main/System/HeroUI/HeroListWin.cs
@@ -84,6 +84,8 @@
        {
            for (int i = 0; i < team.serverHeroes.Length; i++)
            {
                if (team.serverHeroes[i] == null)
                    continue;
                var hero = HeroManager.Instance.GetHero(team.serverHeroes[i].guid);
                if (hero != null)
                {
Main/System/HeroUI/HeroUIManager.cs
@@ -189,31 +189,14 @@
        return new Int2((int)country, maxValue);
    }
    //AttackType 0 攻击阵容 1 防守阵容
    int GetSelectTeamTypeByAttackType(int AttackType)
    //在不同页签下选AttackType 0 攻击阵容 1 防守阵容
    public int GetSelectTeamTypeByAttackType(int AttackType)
    {
        if (selectTeamType == TeamType.Arena)
        if (selectTeamType == TeamType.Arena || selectTeamType == TeamType.ArenaDefense)
        {
            if (AttackType == 0)
            {
                return (int)TeamType.Arena;
            }
            else if (AttackType == 1)
            {
                return (int)TeamType.ArenaDefense;
            }
            return AttackType == 0 ? (int)TeamType.Arena : (int)TeamType.ArenaDefense;
        }
        else if (selectTeamType == TeamType.ArenaDefense)
        {
            if (AttackType == 0)
            {
                return (int)TeamType.ArenaDefense;
            }
            else if (AttackType == 1)
            {
                return (int)TeamType.Arena;
            }
        }
        
        return (int)TeamType.Story;
    }
Main/System/Team/TeamManager.cs
@@ -151,8 +151,8 @@
        if (!teamDict.TryGetValue(teamType, out team))
        {
            team = new TeamBase(teamType);
            team.CreateDefault(HeroManager.Instance.GetPowerfulHeroList());
            teamDict.Add(teamType, team);
            // team.CreateDefault(HeroManager.Instance.GetPowerfulHeroList());
            // teamDict.Add(teamType, team);
        }
        return team;