Ejemplo n.º 1
0
        internal void Load(SaveFileReader reader)
        {
            State      = reader.ReadEnum <SkirmishSlotState>();
            PlayerName = reader.ReadUnicodeString();

            var unknown1 = reader.ReadUInt16();

            if (unknown1 != 1u)
            {
                throw new InvalidDataException();
            }

            ColorIndex    = (sbyte)reader.ReadInt32();
            StartPosition = (byte)reader.ReadInt32();

            // Bit ugly... this is really an index into player templates,
            // but FactionIndex only counts playable sides... and also is 1-based.
            FactionIndex = (byte)(reader.ReadInt32() - 1);

            Team = (sbyte)reader.ReadInt32();

            var colorChosen               = reader.ReadInt32();
            var startPositionChosen       = reader.ReadInt32();
            var playerTemplateIndexChosen = reader.ReadInt32();
        }