Exemple #1
0
        void ReadRegionData(BinaryReader reader)
        {
            // Step through region data
            regionDataList.Clear();
            for (int i = 0; i < regionCount; i++)
            {
                PlayerEntity.RegionDataRecord regionData = new PlayerEntity.RegionDataRecord();
                reader.BaseStream.Position = regionDataOffset + (i * regionDataLength);
                regionData.Values          = new byte[29];

                for (int j = 0; j < 29; j++)
                {
                    regionData.Values[j] = reader.ReadByte();
                }

                regionData.Flags = new bool[29];
                for (int j = 0; j < 29; j++)
                {
                    regionData.Flags[j] = reader.ReadBoolean();
                }

                regionData.Flags2 = new bool[14];
                for (int j = 0; j < 14; j++)
                {
                    regionData.Flags2[j] = reader.ReadBoolean();
                }

                regionData.PrecipitationOverride = reader.ReadByte();
                regionData.SeverePunishmentFlags = reader.ReadByte();
                regionData.LegalRep             = reader.ReadInt16();
                regionData.IDOfPersecutedTemple = reader.ReadUInt16();
                regionData.PriceAdjustment      = reader.ReadUInt16();

                regionDataList.Add(regionData);
            }
        }
        void ReadRegionData(BinaryReader reader)
        {
            // Step through region data
            regionDataList.Clear();
            for (int i = 0; i < regionCount; i++)
            {
                PlayerEntity.RegionDataRecord regionData = new PlayerEntity.RegionDataRecord();
                reader.BaseStream.Position = regionDataOffset + (i * regionDataLength);
                regionData.Values          = new byte[29];

                for (int j = 0; j < 29; j++)
                {
                    regionData.Values[j] = reader.ReadByte();
                }

                regionData.Flags = new bool[29];
                for (int j = 0; j < 29; j++)
                {
                    regionData.Flags[j] = reader.ReadBoolean();
                }

                regionData.Flags2 = new bool[14];
                for (int j = 0; j < 14; j++)
                {
                    regionData.Flags2[j] = reader.ReadBoolean();
                }

                reader.BaseStream.Position += 2; // unknown

                regionData.LegalRep        = reader.ReadInt16();
                regionData.Unknown         = reader.ReadUInt16();
                regionData.PriceAdjustment = reader.ReadUInt16();

                regionDataList.Add(regionData);
            }
        }