yyl
2026-01-29 83ff2cfc367d3227449fa8414a25541374929ecb
Main/System/Team/TeamBase.cs
@@ -31,6 +31,8 @@
    public TeamHero[] serverHeroes { get; private set; } = new TeamHero[TeamConst.MaxTeamHeroCount];
    public TeamMingge teamMingge { get; private set; }
    public TeamBase(int _teamType)
    {
        teamType = _teamType;
@@ -51,17 +53,30 @@
        for (int i = 0; i < lineUp.ObjCnt; i++)
        {
            if (i < tempHeroes.Length)
            {
            // if (i < tempHeroes.Length)
            // {
                var fightObj = lineUp.ObjList[i];
                TeamHero hero = new TeamHero(fightObj, this);
                tempHeroes[hero.positionNum] = hero;
                serverHeroes[hero.positionNum] = hero;
            }
            else
            {
                Debug.LogError("TeamBase: Too many heroes in lineup, exceeding MaxTeamHeroCount.");
            }
                // 在本阵容中的站位,从1开始到7为武将 99为命格 101及以上为灵兽
                if (fightObj.PosNum == 99)
                {
                    teamMingge = new TeamMingge(fightObj, this);
                }
                else if (fightObj.PosNum >= 101)
                {
                }
                else if (fightObj.PosNum >= 1 && fightObj.PosNum <= 7)
                {
                    TeamHero hero = new TeamHero(fightObj, this);
                    tempHeroes[hero.positionNum] = hero;
                    serverHeroes[hero.positionNum] = hero;
                }
            // }
            // else
            // {
            //     Debug.LogError("TeamBase: Too many heroes in lineup, exceeding MaxTeamHeroCount.");
            // }
        }
        // 刷新服务器数据
@@ -464,4 +479,5 @@
        if (tempHeroes[index2] != null) tempHeroes[index2].positionNum = index2;
    }
    
}
}