lcy
2025-10-16 3b64befcd8b2ab5abef1a33c5c8f73a6b245aff0
Main/System/Team/TeamBase.cs
@@ -239,6 +239,15 @@
        return false;
    }
    public TeamHero GetServerHeroByIndex(int index)
    {
        if (index < 0 || index >= serverHeroes.Length)
        {
            return null;
        }
        return serverHeroes[index];
    }
    public TeamHero GetNextServerHero(string guid)
    {
        if (string.IsNullOrEmpty(guid))
@@ -286,6 +295,18 @@
        return -1; // No empty position
    }
    public int GetPosition(string guid)
    {
        foreach (var hero in serverHeroes)
        {
            if (hero != null && hero.guid == guid)
            {
                return hero.positionNum;
            }
        }
        return  -1;
    }
    //  布阵接口
    private void SetTeamHero(int posNum, TeamHero hero)
    {