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 "IDLF": if (IdleMarkerFlags == null) { IdleMarkerFlags = new SimpleSubrecord <IdleMarkerFlags>(); } IdleMarkerFlags.ReadBinary(reader); break; case "IDLC": if (AnimationCount == null) { AnimationCount = new SimpleSubrecord <Byte>(); } AnimationCount.ReadBinary(reader); break; case "IDLT": if (IdleTimer == null) { IdleTimer = new SimpleSubrecord <Single>(); } IdleTimer.ReadBinary(reader); break; case "IDLA": if (Animations == null) { Animations = new FormArray(); } Animations.ReadBinary(reader); break; default: throw new Exception(); } } }