public void ReadFormationData(BinaryReader br)
    {
        int unitDataCount = br.ReadInt32();

        UnitData.Clear();
        for (int i = 0; i < unitDataCount; i++)
        {
            var newFormationUnitData = new FormationUnitSaveData();
            newFormationUnitData.ReadFormationUnitData(br);
            UnitData.Add(newFormationUnitData);
        }
    }
    public void ReadBattlegroundData(BinaryReader br)
    {
        RoundNumber = br.ReadInt32();

        RoundStatus    = (RoundStatus)br.ReadInt32();
        TurnType       = (TurnType)br.ReadInt32();
        TurnStatus     = (TurnStatus)br.ReadInt32();
        HeroAction     = (HeroTurnAction)br.ReadInt32();
        BattleStatus   = (BattleStatus)br.ReadInt32();
        SurpriseStatus = (SurpriseStatus)br.ReadInt32();

        StallingRoundNumber = br.ReadInt32();
        SelectedUnitId      = br.ReadInt32();
        SelectedTargetId    = br.ReadInt32();
        LastSkillUsed       = br.ReadString();

        int orderedUnitsCount = br.ReadInt32();

        OrderedUnitsCombatIds.Clear();
        for (int i = 0; i < orderedUnitsCount; i++)
        {
            OrderedUnitsCombatIds.Add(br.ReadInt32());
        }

        int combatIdsCount = br.ReadInt32();

        CombatIds.Clear();
        for (int i = 0; i < combatIdsCount; i++)
        {
            CombatIds.Add(br.ReadInt32());
        }

        int companionsCount = br.ReadInt32();

        Companions.Clear();
        for (int i = 0; i < companionsCount; i++)
        {
            Companions.Add(br.ReadInt32());
        }

        int capturesCount = br.ReadInt32();

        Captures.Clear();
        for (int i = 0; i < capturesCount; i++)
        {
            Captures.Add(br.ReadInt32());
        }

        int controlsCount = br.ReadInt32();

        Controls.Clear();
        for (int i = 0; i < controlsCount; i++)
        {
            Controls.Add(br.ReadInt32());
        }

        int lastDamagedCount = br.ReadInt32();

        LastDamaged.Clear();
        for (int i = 0; i < lastDamagedCount; i++)
        {
            LastDamaged.Add(br.ReadString());
        }

        int battleLootCount = br.ReadInt32();

        BattleLoot.Clear();
        for (int i = 0; i < battleLootCount; i++)
        {
            var newBattleLoot = new LootDefinition()
            {
                Code  = br.ReadString(),
                Count = br.ReadInt32(),
            };
            BattleLoot.Add(newBattleLoot);
        }

        int removedUnitsCount = br.ReadInt32();

        RemovedUnits.Clear();
        for (int i = 0; i < removedUnitsCount; i++)
        {
            var newFormationUnitData = new FormationUnitSaveData();
            newFormationUnitData.ReadFormationUnitData(br);
            RemovedUnits.Add(newFormationUnitData);
        }

        MonsterFormation.ReadFormationData(br);
    }