示例#1
0
        public void Save(ISaveFile saveFile, int index)
        {
            var offsets = MainOffsets.GetOffsets(saveFile.GetRevision());

            if (index >= offsets.Building_Count)
            {
                throw new IndexOutOfRangeException("Index was greater than the number of building slots!");
            }
            saveFile.WriteStruct(offsets.Offset_Buildings + index * 0x14, this);
        }