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 "MODL": if (Model == null) { Model = new Model(); } Model.ReadBinary(reader); break; case "DATA": if (Data == null) { Data = new ImpactData(); } Data.ReadBinary(reader); break; case "DODT": if (DecalData == null) { DecalData = new DecalData(); } DecalData.ReadBinary(reader); break; case "DNAM": if (TextureSet == null) { TextureSet = new RecordReference(); } TextureSet.ReadBinary(reader); break; case "SNAM": if (Sound1 == null) { Sound1 = new RecordReference(); } Sound1.ReadBinary(reader); break; case "NAM1": if (Sound2 == null) { Sound2 = new RecordReference(); } Sound2.ReadBinary(reader); break; default: throw new Exception(); } } }
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 "ICON": if (LargeIcon == null) { LargeIcon = new SimpleSubrecord <String>(); } LargeIcon.ReadBinary(reader); break; case "MICO": if (SmallIcon == null) { SmallIcon = new SimpleSubrecord <String>(); } SmallIcon.ReadBinary(reader); break; case "TNAM": if (TextureSet == null) { TextureSet = new RecordReference(); } TextureSet.ReadBinary(reader); break; case "HNAM": if (HavokData == null) { HavokData = new HavokData(); } HavokData.ReadBinary(reader); break; case "SNAM": if (TextureSpecularExponent == null) { TextureSpecularExponent = new SimpleSubrecord <Byte>(); } TextureSpecularExponent.ReadBinary(reader); break; case "GNAM": if (Grasses == null) { Grasses = new List <RecordReference>(); } RecordReference tempGNAM = new RecordReference(); tempGNAM.ReadBinary(reader); Grasses.Add(tempGNAM); break; default: throw new Exception(); } } }