public override void ReadData(ESPReader reader, long dataEnd) { while (reader.BaseStream.Position < dataEnd) { string subTag = reader.PeekTag(); switch (subTag) { case "EDID": if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadBinary(reader); break; case "OBND": if (ObjectBounds == null) { ObjectBounds = new ObjectBounds(); } ObjectBounds.ReadBinary(reader); break; case "SNAM": if (Sounds == null) { Sounds = new List <RecordReference>(); } RecordReference tempSNAM = new RecordReference(); tempSNAM.ReadBinary(reader); Sounds.Add(tempSNAM); break; case "WNAM": if (WallaTriggerCount == null) { WallaTriggerCount = new SimpleSubrecord <UInt32>(); } WallaTriggerCount.ReadBinary(reader); break; case "RDAT": if (UseSoundFromRegion == null) { UseSoundFromRegion = new RecordReference(); } UseSoundFromRegion.ReadBinary(reader); break; case "ANAM": if (EnvironmentType == null) { EnvironmentType = new SimpleSubrecord <EnvironmentType>(); } EnvironmentType.ReadBinary(reader); break; case "INAM": if (IsInterior == null) { IsInterior = new SimpleSubrecord <IsInteriorEnum>(); } IsInterior.ReadBinary(reader); break; default: throw new Exception(); } } }