public override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("EditorID", false, out subEle)) { if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadXML(subEle, master); } if (ele.TryPathTo("ObjectBounds", false, out subEle)) { if (ObjectBounds == null) { ObjectBounds = new ObjectBounds(); } ObjectBounds.ReadXML(subEle, master); } if (ele.TryPathTo("Name", false, out subEle)) { if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadXML(subEle, master); } if (ele.TryPathTo("Model", false, out subEle)) { if (Model == null) { Model = new Model(); } Model.ReadXML(subEle, master); } if (ele.TryPathTo("BaseStats", false, out subEle)) { if (BaseStats == null) { BaseStats = new NPCBaseStats(); } BaseStats.ReadXML(subEle, master); } if (ele.TryPathTo("Factions", false, out subEle)) { if (Factions == null) { Factions = new List <FactionMembership>(); } foreach (XElement e in subEle.Elements()) { FactionMembership tempSNAM = new FactionMembership(); tempSNAM.ReadXML(e, master); Factions.Add(tempSNAM); } } if (ele.TryPathTo("DeathItem", false, out subEle)) { if (DeathItem == null) { DeathItem = new RecordReference(); } DeathItem.ReadXML(subEle, master); } if (ele.TryPathTo("VoiceType", false, out subEle)) { if (VoiceType == null) { VoiceType = new RecordReference(); } VoiceType.ReadXML(subEle, master); } if (ele.TryPathTo("Template", false, out subEle)) { if (Template == null) { Template = new RecordReference(); } Template.ReadXML(subEle, master); } if (ele.TryPathTo("Race", false, out subEle)) { if (Race == null) { Race = new RecordReference(); } Race.ReadXML(subEle, master); } if (ele.TryPathTo("ActorEffects", false, out subEle)) { if (ActorEffects == null) { ActorEffects = new List <RecordReference>(); } foreach (XElement e in subEle.Elements()) { RecordReference tempSPLO = new RecordReference(); tempSPLO.ReadXML(e, master); ActorEffects.Add(tempSPLO); } } if (ele.TryPathTo("Unarmed/AttackEffect", false, out subEle)) { if (UnarmedAttackEffect == null) { UnarmedAttackEffect = new RecordReference(); } UnarmedAttackEffect.ReadXML(subEle, master); } if (ele.TryPathTo("Unarmed/AttackAnimation", false, out subEle)) { if (UnarmedAttackAnimation == null) { UnarmedAttackAnimation = new SimpleSubrecord <UInt16>(); } UnarmedAttackAnimation.ReadXML(subEle, master); } if (ele.TryPathTo("Destructable", false, out subEle)) { if (Destructable == null) { Destructable = new Destructable(); } Destructable.ReadXML(subEle, master); } if (ele.TryPathTo("Script", false, out subEle)) { if (Script == null) { Script = new RecordReference(); } Script.ReadXML(subEle, master); } if (ele.TryPathTo("Contents", false, out subEle)) { if (Contents == null) { Contents = new List <InventoryItem>(); } foreach (XElement e in subEle.Elements()) { InventoryItem tempCNTO = new InventoryItem(); tempCNTO.ReadXML(e, master); Contents.Add(tempCNTO); } } if (ele.TryPathTo("AIData", false, out subEle)) { if (AIData == null) { AIData = new AIData(); } AIData.ReadXML(subEle, master); } if (ele.TryPathTo("Packages", false, out subEle)) { if (Packages == null) { Packages = new List <RecordReference>(); } foreach (XElement e in subEle.Elements()) { RecordReference tempPKID = new RecordReference(); tempPKID.ReadXML(e, master); Packages.Add(tempPKID); } } if (ele.TryPathTo("Class", false, out subEle)) { if (Class == null) { Class = new RecordReference(); } Class.ReadXML(subEle, master); } if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) { Data = new NPCData(); } Data.ReadXML(subEle, master); } if (ele.TryPathTo("Skills", false, out subEle)) { if (Skills == null) { Skills = new NPCSkills(); } Skills.ReadXML(subEle, master); } if (ele.TryPathTo("HeadParts", false, out subEle)) { if (HeadParts == null) { HeadParts = new List <RecordReference>(); } foreach (XElement e in subEle.Elements()) { RecordReference tempPNAM = new RecordReference(); tempPNAM.ReadXML(e, master); HeadParts.Add(tempPNAM); } } if (ele.TryPathTo("Hair/Type", false, out subEle)) { if (HairType == null) { HairType = new RecordReference(); } HairType.ReadXML(subEle, master); } if (ele.TryPathTo("Hair/Length", false, out subEle)) { if (HairLength == null) { HairLength = new SimpleSubrecord <Single>(); } HairLength.ReadXML(subEle, master); } if (ele.TryPathTo("Eyes", false, out subEle)) { if (Eyes == null) { Eyes = new RecordReference(); } Eyes.ReadXML(subEle, master); } if (ele.TryPathTo("Hair/Color", false, out subEle)) { if (HairColor == null) { HairColor = new SimpleSubrecord <Color>(); } HairColor.ReadXML(subEle, master); } if (ele.TryPathTo("CombatStyle", false, out subEle)) { if (CombatStyle == null) { CombatStyle = new RecordReference(); } CombatStyle.ReadXML(subEle, master); } if (ele.TryPathTo("ImpactMaterialType", false, out subEle)) { if (ImpactMaterialType == null) { ImpactMaterialType = new SimpleSubrecord <MaterialTypeUInt>(); } ImpactMaterialType.ReadXML(subEle, master); } if (ele.TryPathTo("FaceGen/Geometry/Symmetric", false, out subEle)) { if (FaceGenGeometrySymmetric == null) { FaceGenGeometrySymmetric = new SimpleSubrecord <Byte[]>(); } FaceGenGeometrySymmetric.ReadXML(subEle, master); } if (ele.TryPathTo("FaceGen/Geometry/Asymmetric", false, out subEle)) { if (FaceGenGeometryAsymmetric == null) { FaceGenGeometryAsymmetric = new SimpleSubrecord <Byte[]>(); } FaceGenGeometryAsymmetric.ReadXML(subEle, master); } if (ele.TryPathTo("FaceGen/Texture", false, out subEle)) { if (FaceGenTexture == null) { FaceGenTexture = new SimpleSubrecord <Byte[]>(); } FaceGenTexture.ReadXML(subEle, master); } if (ele.TryPathTo("Unknown", false, out subEle)) { if (Unknown == null) { Unknown = new SimpleSubrecord <UInt16>(); } Unknown.ReadXML(subEle, master); } if (ele.TryPathTo("Height", false, out subEle)) { if (Height == null) { Height = new SimpleSubrecord <Single>(); } Height.ReadXML(subEle, master); } if (ele.TryPathTo("Weight", false, out subEle)) { if (Weight == null) { Weight = new SimpleSubrecord <Single>(); } Weight.ReadXML(subEle, master); } }
public CombatStyle(CombatStyle copyObject) { }
public override void WriteData(ESPWriter writer) { if (EditorID != null) { EditorID.WriteBinary(writer); } if (ObjectBounds != null) { ObjectBounds.WriteBinary(writer); } if (Name != null) { Name.WriteBinary(writer); } if (Model != null) { Model.WriteBinary(writer); } if (BaseStats != null) { BaseStats.WriteBinary(writer); } if (Factions != null) { Factions.Sort(); foreach (var item in Factions) { item.WriteBinary(writer); } } if (DeathItem != null) { DeathItem.WriteBinary(writer); } if (VoiceType != null) { VoiceType.WriteBinary(writer); } if (Template != null) { Template.WriteBinary(writer); } if (Race != null) { Race.WriteBinary(writer); } if (ActorEffects != null) { ActorEffects.Sort(); foreach (var item in ActorEffects) { item.WriteBinary(writer); } } if (UnarmedAttackEffect != null) { UnarmedAttackEffect.WriteBinary(writer); } if (UnarmedAttackAnimation != null) { UnarmedAttackAnimation.WriteBinary(writer); } if (Destructable != null) { Destructable.WriteBinary(writer); } if (Script != null) { Script.WriteBinary(writer); } if (Contents != null) { Contents.Sort(); foreach (var item in Contents) { item.WriteBinary(writer); } } if (AIData != null) { AIData.WriteBinary(writer); } if (Packages != null) { foreach (var item in Packages) { item.WriteBinary(writer); } } if (Class != null) { Class.WriteBinary(writer); } if (Data != null) { Data.WriteBinary(writer); } if (Skills != null) { Skills.WriteBinary(writer); } if (HeadParts != null) { HeadParts.Sort(); foreach (var item in HeadParts) { item.WriteBinary(writer); } } if (HairType != null) { HairType.WriteBinary(writer); } if (HairLength != null) { HairLength.WriteBinary(writer); } if (Eyes != null) { Eyes.WriteBinary(writer); } if (HairColor != null) { HairColor.WriteBinary(writer); } if (CombatStyle != null) { CombatStyle.WriteBinary(writer); } if (ImpactMaterialType != null) { ImpactMaterialType.WriteBinary(writer); } if (FaceGenGeometrySymmetric != null) { FaceGenGeometrySymmetric.WriteBinary(writer); } if (FaceGenGeometryAsymmetric != null) { FaceGenGeometryAsymmetric.WriteBinary(writer); } if (FaceGenTexture != null) { FaceGenTexture.WriteBinary(writer); } if (Unknown != null) { Unknown.WriteBinary(writer); } if (Height != null) { Height.WriteBinary(writer); } if (Weight != null) { Weight.WriteBinary(writer); } }
public override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (EditorID != null) { ele.TryPathTo("EditorID", true, out subEle); EditorID.WriteXML(subEle, master); } if (ObjectBounds != null) { ele.TryPathTo("ObjectBounds", true, out subEle); ObjectBounds.WriteXML(subEle, master); } if (Name != null) { ele.TryPathTo("Name", true, out subEle); Name.WriteXML(subEle, master); } if (Model != null) { ele.TryPathTo("Model", true, out subEle); Model.WriteXML(subEle, master); } if (BaseStats != null) { ele.TryPathTo("BaseStats", true, out subEle); BaseStats.WriteXML(subEle, master); } if (Factions != null) { ele.TryPathTo("Factions", true, out subEle); List <string> xmlNames = new List <string> { "Faction" }; int i = 0; Factions.Sort(); foreach (var entry in Factions) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (DeathItem != null) { ele.TryPathTo("DeathItem", true, out subEle); DeathItem.WriteXML(subEle, master); } if (VoiceType != null) { ele.TryPathTo("VoiceType", true, out subEle); VoiceType.WriteXML(subEle, master); } if (Template != null) { ele.TryPathTo("Template", true, out subEle); Template.WriteXML(subEle, master); } if (Race != null) { ele.TryPathTo("Race", true, out subEle); Race.WriteXML(subEle, master); } if (ActorEffects != null) { ele.TryPathTo("ActorEffects", true, out subEle); List <string> xmlNames = new List <string> { "ActorEffect" }; int i = 0; ActorEffects.Sort(); foreach (var entry in ActorEffects) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (UnarmedAttackEffect != null) { ele.TryPathTo("Unarmed/AttackEffect", true, out subEle); UnarmedAttackEffect.WriteXML(subEle, master); } if (UnarmedAttackAnimation != null) { ele.TryPathTo("Unarmed/AttackAnimation", true, out subEle); UnarmedAttackAnimation.WriteXML(subEle, master); } if (Destructable != null) { ele.TryPathTo("Destructable", true, out subEle); Destructable.WriteXML(subEle, master); } if (Script != null) { ele.TryPathTo("Script", true, out subEle); Script.WriteXML(subEle, master); } if (Contents != null) { ele.TryPathTo("Contents", true, out subEle); List <string> xmlNames = new List <string> { "Item" }; int i = 0; Contents.Sort(); foreach (var entry in Contents) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (AIData != null) { ele.TryPathTo("AIData", true, out subEle); AIData.WriteXML(subEle, master); } if (Packages != null) { ele.TryPathTo("Packages", true, out subEle); List <string> xmlNames = new List <string> { "Package" }; int i = 0; foreach (var entry in Packages) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (Class != null) { ele.TryPathTo("Class", true, out subEle); Class.WriteXML(subEle, master); } if (Data != null) { ele.TryPathTo("Data", true, out subEle); Data.WriteXML(subEle, master); } if (Skills != null) { ele.TryPathTo("Skills", true, out subEle); Skills.WriteXML(subEle, master); } if (HeadParts != null) { ele.TryPathTo("HeadParts", true, out subEle); List <string> xmlNames = new List <string> { "HeadPart" }; int i = 0; HeadParts.Sort(); foreach (var entry in HeadParts) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (HairType != null) { ele.TryPathTo("Hair/Type", true, out subEle); HairType.WriteXML(subEle, master); } if (HairLength != null) { ele.TryPathTo("Hair/Length", true, out subEle); HairLength.WriteXML(subEle, master); } if (Eyes != null) { ele.TryPathTo("Eyes", true, out subEle); Eyes.WriteXML(subEle, master); } if (HairColor != null) { ele.TryPathTo("Hair/Color", true, out subEle); HairColor.WriteXML(subEle, master); } if (CombatStyle != null) { ele.TryPathTo("CombatStyle", true, out subEle); CombatStyle.WriteXML(subEle, master); } if (ImpactMaterialType != null) { ele.TryPathTo("ImpactMaterialType", true, out subEle); ImpactMaterialType.WriteXML(subEle, master); } if (FaceGenGeometrySymmetric != null) { ele.TryPathTo("FaceGen/Geometry/Symmetric", true, out subEle); FaceGenGeometrySymmetric.WriteXML(subEle, master); } if (FaceGenGeometryAsymmetric != null) { ele.TryPathTo("FaceGen/Geometry/Asymmetric", true, out subEle); FaceGenGeometryAsymmetric.WriteXML(subEle, master); } if (FaceGenTexture != null) { ele.TryPathTo("FaceGen/Texture", true, out subEle); FaceGenTexture.WriteXML(subEle, master); } if (Unknown != null) { ele.TryPathTo("Unknown", true, out subEle); Unknown.WriteXML(subEle, master); } if (Height != null) { ele.TryPathTo("Height", true, out subEle); Height.WriteXML(subEle, master); } if (Weight != null) { ele.TryPathTo("Weight", true, out subEle); Weight.WriteXML(subEle, master); } }
public override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("EditorID", false, out subEle)) { if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadXML(subEle, master); } if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) { Data = new PackageData(); } Data.ReadXML(subEle, master); } if (ele.TryPathTo("Location1", false, out subEle)) { if (Location1 == null) { Location1 = new PackageLocation(); } Location1.ReadXML(subEle, master); } if (ele.TryPathTo("Location2", false, out subEle)) { if (Location2 == null) { Location2 = new PackageLocation(); } Location2.ReadXML(subEle, master); } if (ele.TryPathTo("Schedule", false, out subEle)) { if (Schedule == null) { Schedule = new PackageScheduleData(); } Schedule.ReadXML(subEle, master); } if (ele.TryPathTo("Target1", false, out subEle)) { if (Target1 == null) { Target1 = new PackageTarget(); } Target1.ReadXML(subEle, master); } if (ele.TryPathTo("Conditions", false, out subEle)) { if (Conditions == null) { Conditions = new List <Condition>(); } foreach (XElement e in subEle.Elements()) { Condition tempCTDA = new Condition(); tempCTDA.ReadXML(e, master); Conditions.Add(tempCTDA); } } if (ele.TryPathTo("Idle/Flags", false, out subEle)) { if (IdleFlags == null) { IdleFlags = new SimpleSubrecord <PackageIdleFlags>(); } IdleFlags.ReadXML(subEle, master); } if (ele.TryPathTo("Idle/Count", false, out subEle)) { if (IdleCount == null) { IdleCount = new SimpleSubrecord <Byte>(); } IdleCount.ReadXML(subEle, master); } if (ele.TryPathTo("Idle/TimerSetting", false, out subEle)) { if (IdleTimerSetting == null) { IdleTimerSetting = new SimpleSubrecord <Single>(); } IdleTimerSetting.ReadXML(subEle, master); } if (ele.TryPathTo("Idle/Animations", false, out subEle)) { if (IdleAnimations == null) { IdleAnimations = new FormArray(); } IdleAnimations.ReadXML(subEle, master); } if (ele.TryPathTo("Unused", false, out subEle)) { if (Unused == null) { Unused = new SimpleSubrecord <Byte[]>(); } Unused.ReadXML(subEle, master); } if (ele.TryPathTo("CombatStyle", false, out subEle)) { if (CombatStyle == null) { CombatStyle = new RecordReference(); } CombatStyle.ReadXML(subEle, master); } if (ele.TryPathTo("EatMarker", false, out subEle)) { if (EatMarker == null) { EatMarker = new SubMarker(); } EatMarker.ReadXML(subEle, master); } if (ele.TryPathTo("EscortDistance", false, out subEle)) { if (EscortDistance == null) { EscortDistance = new SimpleSubrecord <UInt32>(); } EscortDistance.ReadXML(subEle, master); } if (ele.TryPathTo("FollowDistance_StartLocation_TriggerRadius", false, out subEle)) { if (FollowDistance_StartLocation_TriggerRadius == null) { FollowDistance_StartLocation_TriggerRadius = new SimpleSubrecord <UInt32>(); } FollowDistance_StartLocation_TriggerRadius.ReadXML(subEle, master); } if (ele.TryPathTo("PatrolIsRepeatable", false, out subEle)) { if (PatrolIsRepeatable == null) { PatrolIsRepeatable = new SimpleSubrecord <NoYesByte>(); } PatrolIsRepeatable.ReadXML(subEle, master); } if (ele.TryPathTo("UseWeaponData", false, out subEle)) { if (UseWeaponData == null) { UseWeaponData = new PackageUseWeaponData(); } UseWeaponData.ReadXML(subEle, master); } if (ele.TryPathTo("Target2", false, out subEle)) { if (Target2 == null) { Target2 = new PackageTarget(); } Target2.ReadXML(subEle, master); } if (ele.TryPathTo("UseItemMarker", false, out subEle)) { if (UseItemMarker == null) { UseItemMarker = new SubMarker(); } UseItemMarker.ReadXML(subEle, master); } if (ele.TryPathTo("AmbushMarker", false, out subEle)) { if (AmbushMarker == null) { AmbushMarker = new SubMarker(); } AmbushMarker.ReadXML(subEle, master); } if (ele.TryPathTo("DialogData", false, out subEle)) { if (DialogData == null) { DialogData = new PackageDialogData(); } DialogData.ReadXML(subEle, master); } if (ele.TryPathTo("DummyIgnore", false, out subEle)) { if (DummyIgnore == null) { DummyIgnore = new PackageLocation(); } DummyIgnore.ReadXML(subEle, master); } if (ele.TryPathTo("OnBegin", false, out subEle)) { if (OnBegin == null) { OnBegin = new PackageEvent(); } OnBegin.ReadXML(subEle, master); } if (ele.TryPathTo("OnEnd", false, out subEle)) { if (OnEnd == null) { OnEnd = new PackageEvent(); } OnEnd.ReadXML(subEle, master); } if (ele.TryPathTo("OnChange", false, out subEle)) { if (OnChange == null) { OnChange = new PackageEvent(); } OnChange.ReadXML(subEle, master); } }
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 "FULL": if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadBinary(reader); break; case "MODL": if (Model == null) { Model = new Model(); } Model.ReadBinary(reader); break; case "ACBS": if (BaseStats == null) { BaseStats = new NPCBaseStats(); } BaseStats.ReadBinary(reader); break; case "SNAM": if (Factions == null) { Factions = new List <FactionMembership>(); } FactionMembership tempSNAM = new FactionMembership(); tempSNAM.ReadBinary(reader); Factions.Add(tempSNAM); break; case "INAM": if (DeathItem == null) { DeathItem = new RecordReference(); } DeathItem.ReadBinary(reader); break; case "VTCK": if (VoiceType == null) { VoiceType = new RecordReference(); } VoiceType.ReadBinary(reader); break; case "TPLT": if (Template == null) { Template = new RecordReference(); } Template.ReadBinary(reader); break; case "RNAM": if (Race == null) { Race = new RecordReference(); } Race.ReadBinary(reader); break; case "SPLO": if (ActorEffects == null) { ActorEffects = new List <RecordReference>(); } RecordReference tempSPLO = new RecordReference(); tempSPLO.ReadBinary(reader); ActorEffects.Add(tempSPLO); break; case "EITM": if (UnarmedAttackEffect == null) { UnarmedAttackEffect = new RecordReference(); } UnarmedAttackEffect.ReadBinary(reader); break; case "EAMT": if (UnarmedAttackAnimation == null) { UnarmedAttackAnimation = new SimpleSubrecord <UInt16>(); } UnarmedAttackAnimation.ReadBinary(reader); break; case "DEST": if (Destructable == null) { Destructable = new Destructable(); } Destructable.ReadBinary(reader); break; case "SCRI": if (Script == null) { Script = new RecordReference(); } Script.ReadBinary(reader); break; case "CNTO": if (Contents == null) { Contents = new List <InventoryItem>(); } InventoryItem tempCNTO = new InventoryItem(); tempCNTO.ReadBinary(reader); Contents.Add(tempCNTO); break; case "AIDT": if (AIData == null) { AIData = new AIData(); } AIData.ReadBinary(reader); break; case "PKID": if (Packages == null) { Packages = new List <RecordReference>(); } RecordReference tempPKID = new RecordReference(); tempPKID.ReadBinary(reader); Packages.Add(tempPKID); break; case "CNAM": if (Class == null) { Class = new RecordReference(); } Class.ReadBinary(reader); break; case "DATA": if (Data == null) { Data = new NPCData(); } Data.ReadBinary(reader); break; case "DNAM": if (Skills == null) { Skills = new NPCSkills(); } Skills.ReadBinary(reader); break; case "PNAM": if (HeadParts == null) { HeadParts = new List <RecordReference>(); } RecordReference tempPNAM = new RecordReference(); tempPNAM.ReadBinary(reader); HeadParts.Add(tempPNAM); break; case "HNAM": if (HairType == null) { HairType = new RecordReference(); } HairType.ReadBinary(reader); break; case "LNAM": if (HairLength == null) { HairLength = new SimpleSubrecord <Single>(); } HairLength.ReadBinary(reader); break; case "ENAM": if (Eyes == null) { Eyes = new RecordReference(); } Eyes.ReadBinary(reader); break; case "HCLR": if (HairColor == null) { HairColor = new SimpleSubrecord <Color>(); } HairColor.ReadBinary(reader); break; case "ZNAM": if (CombatStyle == null) { CombatStyle = new RecordReference(); } CombatStyle.ReadBinary(reader); break; case "NAM4": if (ImpactMaterialType == null) { ImpactMaterialType = new SimpleSubrecord <MaterialTypeUInt>(); } ImpactMaterialType.ReadBinary(reader); break; case "FGGS": if (FaceGenGeometrySymmetric == null) { FaceGenGeometrySymmetric = new SimpleSubrecord <Byte[]>(); } FaceGenGeometrySymmetric.ReadBinary(reader); break; case "FGGA": if (FaceGenGeometryAsymmetric == null) { FaceGenGeometryAsymmetric = new SimpleSubrecord <Byte[]>(); } FaceGenGeometryAsymmetric.ReadBinary(reader); break; case "FGTS": if (FaceGenTexture == null) { FaceGenTexture = new SimpleSubrecord <Byte[]>(); } FaceGenTexture.ReadBinary(reader); break; case "NAM5": if (Unknown == null) { Unknown = new SimpleSubrecord <UInt16>(); } Unknown.ReadBinary(reader); break; case "NAM6": if (Height == null) { Height = new SimpleSubrecord <Single>(); } Height.ReadBinary(reader); break; case "NAM7": if (Weight == null) { Weight = new SimpleSubrecord <Single>(); } Weight.ReadBinary(reader); break; default: throw new Exception(); } } }
public override void WriteData(ESPWriter writer) { if (EditorID != null) { EditorID.WriteBinary(writer); } if (Data != null) { Data.WriteBinary(writer); } if (Location1 != null) { Location1.WriteBinary(writer); } if (Location2 != null) { Location2.WriteBinary(writer); } if (Schedule != null) { Schedule.WriteBinary(writer); } if (Target1 != null) { Target1.WriteBinary(writer); } if (Conditions != null) { foreach (var item in Conditions) { item.WriteBinary(writer); } } if (IdleFlags != null) { IdleFlags.WriteBinary(writer); } if (IdleCount != null) { IdleCount.WriteBinary(writer); } if (IdleTimerSetting != null) { IdleTimerSetting.WriteBinary(writer); } if (IdleAnimations != null) { IdleAnimations.WriteBinary(writer); } if (Unused != null) { Unused.WriteBinary(writer); } if (CombatStyle != null) { CombatStyle.WriteBinary(writer); } if (EatMarker != null) { EatMarker.WriteBinary(writer); } if (EscortDistance != null) { EscortDistance.WriteBinary(writer); } if (FollowDistance_StartLocation_TriggerRadius != null) { FollowDistance_StartLocation_TriggerRadius.WriteBinary(writer); } if (PatrolIsRepeatable != null) { PatrolIsRepeatable.WriteBinary(writer); } if (UseWeaponData != null) { UseWeaponData.WriteBinary(writer); } if (Target2 != null) { Target2.WriteBinary(writer); } if (UseItemMarker != null) { UseItemMarker.WriteBinary(writer); } if (AmbushMarker != null) { AmbushMarker.WriteBinary(writer); } if (DialogData != null) { DialogData.WriteBinary(writer); } WriteDummyIgnore(writer); if (OnBegin != null) { OnBegin.WriteBinary(writer); } if (OnEnd != null) { OnEnd.WriteBinary(writer); } if (OnChange != null) { OnChange.WriteBinary(writer); } }
public override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (EditorID != null) { ele.TryPathTo("EditorID", true, out subEle); EditorID.WriteXML(subEle, master); } if (Data != null) { ele.TryPathTo("Data", true, out subEle); Data.WriteXML(subEle, master); } if (Location1 != null) { ele.TryPathTo("Location1", true, out subEle); Location1.WriteXML(subEle, master); } if (Location2 != null) { ele.TryPathTo("Location2", true, out subEle); Location2.WriteXML(subEle, master); } if (Schedule != null) { ele.TryPathTo("Schedule", true, out subEle); Schedule.WriteXML(subEle, master); } if (Target1 != null) { ele.TryPathTo("Target1", true, out subEle); Target1.WriteXML(subEle, master); } if (Conditions != null) { ele.TryPathTo("Conditions", true, out subEle); List <string> xmlNames = new List <string> { "Condition" }; int i = 0; foreach (var entry in Conditions) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (IdleFlags != null) { ele.TryPathTo("Idle/Flags", true, out subEle); IdleFlags.WriteXML(subEle, master); } if (IdleCount != null) { ele.TryPathTo("Idle/Count", true, out subEle); IdleCount.WriteXML(subEle, master); } if (IdleTimerSetting != null) { ele.TryPathTo("Idle/TimerSetting", true, out subEle); IdleTimerSetting.WriteXML(subEle, master); } if (IdleAnimations != null) { ele.TryPathTo("Idle/Animations", true, out subEle); IdleAnimations.WriteXML(subEle, master); } if (Unused != null) { ele.TryPathTo("Unused", true, out subEle); Unused.WriteXML(subEle, master); } if (CombatStyle != null) { ele.TryPathTo("CombatStyle", true, out subEle); CombatStyle.WriteXML(subEle, master); } if (EatMarker != null) { ele.TryPathTo("EatMarker", true, out subEle); EatMarker.WriteXML(subEle, master); } if (EscortDistance != null) { ele.TryPathTo("EscortDistance", true, out subEle); EscortDistance.WriteXML(subEle, master); } if (FollowDistance_StartLocation_TriggerRadius != null) { ele.TryPathTo("FollowDistance_StartLocation_TriggerRadius", true, out subEle); FollowDistance_StartLocation_TriggerRadius.WriteXML(subEle, master); } if (PatrolIsRepeatable != null) { ele.TryPathTo("PatrolIsRepeatable", true, out subEle); PatrolIsRepeatable.WriteXML(subEle, master); } if (UseWeaponData != null) { ele.TryPathTo("UseWeaponData", true, out subEle); UseWeaponData.WriteXML(subEle, master); } if (Target2 != null) { ele.TryPathTo("Target2", true, out subEle); Target2.WriteXML(subEle, master); } if (UseItemMarker != null) { ele.TryPathTo("UseItemMarker", true, out subEle); UseItemMarker.WriteXML(subEle, master); } if (AmbushMarker != null) { ele.TryPathTo("AmbushMarker", true, out subEle); AmbushMarker.WriteXML(subEle, master); } if (DialogData != null) { ele.TryPathTo("DialogData", true, out subEle); DialogData.WriteXML(subEle, master); } if (DummyIgnore != null) { ele.TryPathTo("DummyIgnore", true, out subEle); DummyIgnore.WriteXML(subEle, master); } if (OnBegin != null) { ele.TryPathTo("OnBegin", true, out subEle); OnBegin.WriteXML(subEle, master); } if (OnEnd != null) { ele.TryPathTo("OnEnd", true, out subEle); OnEnd.WriteXML(subEle, master); } if (OnChange != null) { ele.TryPathTo("OnChange", true, out subEle); OnChange.WriteXML(subEle, master); } }
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 "PKDT": if (Data == null) { Data = new PackageData(); } Data.ReadBinary(reader); break; case "PLDT": if (Location1 == null) { Location1 = new PackageLocation(); } Location1.ReadBinary(reader); break; case "PLD2": if (Location2 == null) { Location2 = new PackageLocation(); } Location2.ReadBinary(reader); break; case "PSDT": if (Schedule == null) { Schedule = new PackageScheduleData(); } Schedule.ReadBinary(reader); break; case "PTDT": if (Target1 == null) { Target1 = new PackageTarget(); } Target1.ReadBinary(reader); break; case "CTDA": if (Conditions == null) { Conditions = new List <Condition>(); } Condition tempCTDA = new Condition(); tempCTDA.ReadBinary(reader); Conditions.Add(tempCTDA); break; case "IDLF": if (IdleFlags == null) { IdleFlags = new SimpleSubrecord <PackageIdleFlags>(); } IdleFlags.ReadBinary(reader); break; case "IDLC": if (IdleCount == null) { IdleCount = new SimpleSubrecord <Byte>(); } IdleCount.ReadBinary(reader); break; case "IDLT": if (IdleTimerSetting == null) { IdleTimerSetting = new SimpleSubrecord <Single>(); } IdleTimerSetting.ReadBinary(reader); break; case "IDLA": if (IdleAnimations == null) { IdleAnimations = new FormArray(); } IdleAnimations.ReadBinary(reader); break; case "IDLB": if (Unused == null) { Unused = new SimpleSubrecord <Byte[]>(); } Unused.ReadBinary(reader); break; case "CNAM": if (CombatStyle == null) { CombatStyle = new RecordReference(); } CombatStyle.ReadBinary(reader); break; case "PKED": if (EatMarker == null) { EatMarker = new SubMarker(); } EatMarker.ReadBinary(reader); break; case "PKE2": if (EscortDistance == null) { EscortDistance = new SimpleSubrecord <UInt32>(); } EscortDistance.ReadBinary(reader); break; case "PKFD": if (FollowDistance_StartLocation_TriggerRadius == null) { FollowDistance_StartLocation_TriggerRadius = new SimpleSubrecord <UInt32>(); } FollowDistance_StartLocation_TriggerRadius.ReadBinary(reader); break; case "PKPT": if (PatrolIsRepeatable == null) { PatrolIsRepeatable = new SimpleSubrecord <NoYesByte>(); } PatrolIsRepeatable.ReadBinary(reader); break; case "PKW3": if (UseWeaponData == null) { UseWeaponData = new PackageUseWeaponData(); } UseWeaponData.ReadBinary(reader); break; case "PTD2": if (Target2 == null) { Target2 = new PackageTarget(); } Target2.ReadBinary(reader); break; case "PUID": if (UseItemMarker == null) { UseItemMarker = new SubMarker(); } UseItemMarker.ReadBinary(reader); break; case "PKAM": if (AmbushMarker == null) { AmbushMarker = new SubMarker(); } AmbushMarker.ReadBinary(reader); break; case "PKDD": if (DialogData == null) { DialogData = new PackageDialogData(); } DialogData.ReadBinary(reader); break; case "DUMY": if (DummyIgnore == null) { DummyIgnore = new PackageLocation(); } DummyIgnore.ReadBinary(reader); break; case "POBA": if (OnBegin == null) { OnBegin = new PackageEvent(); } OnBegin.ReadBinary(reader); break; case "POEA": if (OnEnd == null) { OnEnd = new PackageEvent(); } OnEnd.ReadBinary(reader); break; case "POCA": if (OnChange == null) { OnChange = new PackageEvent(); } OnChange.ReadBinary(reader); break; default: throw new Exception(); } } }
public override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("EditorID", false, out subEle)) { if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadXML(subEle, master); } if (ele.TryPathTo("ObjectBounds", false, out subEle)) { if (ObjectBounds == null) { ObjectBounds = new ObjectBounds(); } ObjectBounds.ReadXML(subEle, master); } if (ele.TryPathTo("Name", false, out subEle)) { if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadXML(subEle, master); } if (ele.TryPathTo("Model", false, out subEle)) { if (Model == null) { Model = new Model(); } Model.ReadXML(subEle, master); } if (ele.TryPathTo("ActorEffects", false, out subEle)) { if (ActorEffects == null) { ActorEffects = new List <RecordReference>(); } foreach (XElement e in subEle.Elements()) { RecordReference tempSPLO = new RecordReference(); tempSPLO.ReadXML(e, master); ActorEffects.Add(tempSPLO); } } if (ele.TryPathTo("Unarmed/AttackEffect", false, out subEle)) { if (UnarmedAttackEffect == null) { UnarmedAttackEffect = new RecordReference(); } UnarmedAttackEffect.ReadXML(subEle, master); } if (ele.TryPathTo("Unarmed/AttackAnimation", false, out subEle)) { if (UnarmedAttackAnimation == null) { UnarmedAttackAnimation = new SimpleSubrecord <UInt16>(); } UnarmedAttackAnimation.ReadXML(subEle, master); } if (ele.TryPathTo("Models", false, out subEle)) { if (Models == null) { Models = new SubNullStringList(); } Models.ReadXML(subEle, master); } if (ele.TryPathTo("TextureHashes", false, out subEle)) { if (TextureHashes == null) { TextureHashes = new SimpleSubrecord <Byte[]>(); } TextureHashes.ReadXML(subEle, master); } if (ele.TryPathTo("BaseStats", false, out subEle)) { if (BaseStats == null) { BaseStats = new CreatureBaseStats(); } BaseStats.ReadXML(subEle, master); } if (ele.TryPathTo("Factions", false, out subEle)) { if (Factions == null) { Factions = new List <FactionMembership>(); } foreach (XElement e in subEle.Elements()) { FactionMembership tempSNAM = new FactionMembership(); tempSNAM.ReadXML(e, master); Factions.Add(tempSNAM); } } if (ele.TryPathTo("DeathItem", false, out subEle)) { if (DeathItem == null) { DeathItem = new RecordReference(); } DeathItem.ReadXML(subEle, master); } if (ele.TryPathTo("VoiceType", false, out subEle)) { if (VoiceType == null) { VoiceType = new RecordReference(); } VoiceType.ReadXML(subEle, master); } if (ele.TryPathTo("Template", false, out subEle)) { if (Template == null) { Template = new RecordReference(); } Template.ReadXML(subEle, master); } if (ele.TryPathTo("Destructable", false, out subEle)) { if (Destructable == null) { Destructable = new Destructable(); } Destructable.ReadXML(subEle, master); } if (ele.TryPathTo("Script", false, out subEle)) { if (Script == null) { Script = new RecordReference(); } Script.ReadXML(subEle, master); } if (ele.TryPathTo("Contents", false, out subEle)) { if (Contents == null) { Contents = new List <InventoryItem>(); } foreach (XElement e in subEle.Elements()) { InventoryItem tempCNTO = new InventoryItem(); tempCNTO.ReadXML(e, master); Contents.Add(tempCNTO); } } if (ele.TryPathTo("AIData", false, out subEle)) { if (AIData == null) { AIData = new AIData(); } AIData.ReadXML(subEle, master); } if (ele.TryPathTo("Packages", false, out subEle)) { if (Packages == null) { Packages = new List <RecordReference>(); } foreach (XElement e in subEle.Elements()) { RecordReference tempPKID = new RecordReference(); tempPKID.ReadXML(e, master); Packages.Add(tempPKID); } } if (ele.TryPathTo("Animations", false, out subEle)) { if (Animations == null) { Animations = new SubNullStringList(); } Animations.ReadXML(subEle, master); } if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) { Data = new CreatureData(); } Data.ReadXML(subEle, master); } if (ele.TryPathTo("AttackReach", false, out subEle)) { if (AttackReach == null) { AttackReach = new SimpleSubrecord <Byte>(); } AttackReach.ReadXML(subEle, master); } if (ele.TryPathTo("CombatStyle", false, out subEle)) { if (CombatStyle == null) { CombatStyle = new RecordReference(); } CombatStyle.ReadXML(subEle, master); } if (ele.TryPathTo("BodyPartData", false, out subEle)) { if (BodyPartData == null) { BodyPartData = new RecordReference(); } BodyPartData.ReadXML(subEle, master); } if (ele.TryPathTo("TurningSpeed", false, out subEle)) { if (TurningSpeed == null) { TurningSpeed = new SimpleSubrecord <Single>(); } TurningSpeed.ReadXML(subEle, master); } if (ele.TryPathTo("BaseScale", false, out subEle)) { if (BaseScale == null) { BaseScale = new SimpleSubrecord <Single>(); } BaseScale.ReadXML(subEle, master); } if (ele.TryPathTo("FootWeight", false, out subEle)) { if (FootWeight == null) { FootWeight = new SimpleSubrecord <Single>(); } FootWeight.ReadXML(subEle, master); } if (ele.TryPathTo("ImpactMaterialType", false, out subEle)) { if (ImpactMaterialType == null) { ImpactMaterialType = new SimpleSubrecord <MaterialTypeUInt>(); } ImpactMaterialType.ReadXML(subEle, master); } if (ele.TryPathTo("SoundLevel", false, out subEle)) { if (SoundLevel == null) { SoundLevel = new SimpleSubrecord <SoundLevel>(); } SoundLevel.ReadXML(subEle, master); } if (ele.TryPathTo("SoundTemplate", false, out subEle)) { if (SoundTemplate == null) { SoundTemplate = new RecordReference(); } SoundTemplate.ReadXML(subEle, master); } if (ele.TryPathTo("SoundData", false, out subEle)) { if (SoundData == null) { SoundData = new List <CreatureSoundData>(); } foreach (XElement e in subEle.Elements()) { CreatureSoundData tempCSDT = new CreatureSoundData(); tempCSDT.ReadXML(e, master); SoundData.Add(tempCSDT); } } if (ele.TryPathTo("ImpactDataset", false, out subEle)) { if (ImpactDataset == null) { ImpactDataset = new RecordReference(); } ImpactDataset.ReadXML(subEle, master); } if (ele.TryPathTo("MeleeWeaponList", false, out subEle)) { if (MeleeWeaponList == null) { MeleeWeaponList = new RecordReference(); } MeleeWeaponList.ReadXML(subEle, master); } }
public override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (EditorID != null) { ele.TryPathTo("EditorID", true, out subEle); EditorID.WriteXML(subEle, master); } if (ObjectBounds != null) { ele.TryPathTo("ObjectBounds", true, out subEle); ObjectBounds.WriteXML(subEle, master); } if (Name != null) { ele.TryPathTo("Name", true, out subEle); Name.WriteXML(subEle, master); } if (Model != null) { ele.TryPathTo("Model", true, out subEle); Model.WriteXML(subEle, master); } if (ActorEffects != null) { ele.TryPathTo("ActorEffects", true, out subEle); List <string> xmlNames = new List <string> { "ActorEffect" }; int i = 0; ActorEffects.Sort(); foreach (var entry in ActorEffects) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (UnarmedAttackEffect != null) { ele.TryPathTo("Unarmed/AttackEffect", true, out subEle); UnarmedAttackEffect.WriteXML(subEle, master); } if (UnarmedAttackAnimation != null) { ele.TryPathTo("Unarmed/AttackAnimation", true, out subEle); UnarmedAttackAnimation.WriteXML(subEle, master); } if (Models != null) { ele.TryPathTo("Models", true, out subEle); Models.WriteXML(subEle, master); } if (TextureHashes != null) { ele.TryPathTo("TextureHashes", true, out subEle); TextureHashes.WriteXML(subEle, master); } if (BaseStats != null) { ele.TryPathTo("BaseStats", true, out subEle); BaseStats.WriteXML(subEle, master); } if (Factions != null) { ele.TryPathTo("Factions", true, out subEle); List <string> xmlNames = new List <string> { "Faction" }; int i = 0; Factions.Sort(); foreach (var entry in Factions) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (DeathItem != null) { ele.TryPathTo("DeathItem", true, out subEle); DeathItem.WriteXML(subEle, master); } if (VoiceType != null) { ele.TryPathTo("VoiceType", true, out subEle); VoiceType.WriteXML(subEle, master); } if (Template != null) { ele.TryPathTo("Template", true, out subEle); Template.WriteXML(subEle, master); } if (Destructable != null) { ele.TryPathTo("Destructable", true, out subEle); Destructable.WriteXML(subEle, master); } if (Script != null) { ele.TryPathTo("Script", true, out subEle); Script.WriteXML(subEle, master); } if (Contents != null) { ele.TryPathTo("Contents", true, out subEle); List <string> xmlNames = new List <string> { "Item" }; int i = 0; Contents.Sort(); foreach (var entry in Contents) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (AIData != null) { ele.TryPathTo("AIData", true, out subEle); AIData.WriteXML(subEle, master); } if (Packages != null) { ele.TryPathTo("Packages", true, out subEle); List <string> xmlNames = new List <string> { "Package" }; int i = 0; foreach (var entry in Packages) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (Animations != null) { ele.TryPathTo("Animations", true, out subEle); Animations.WriteXML(subEle, master); } if (Data != null) { ele.TryPathTo("Data", true, out subEle); Data.WriteXML(subEle, master); } if (AttackReach != null) { ele.TryPathTo("AttackReach", true, out subEle); AttackReach.WriteXML(subEle, master); } if (CombatStyle != null) { ele.TryPathTo("CombatStyle", true, out subEle); CombatStyle.WriteXML(subEle, master); } if (BodyPartData != null) { ele.TryPathTo("BodyPartData", true, out subEle); BodyPartData.WriteXML(subEle, master); } if (TurningSpeed != null) { ele.TryPathTo("TurningSpeed", true, out subEle); TurningSpeed.WriteXML(subEle, master); } if (BaseScale != null) { ele.TryPathTo("BaseScale", true, out subEle); BaseScale.WriteXML(subEle, master); } if (FootWeight != null) { ele.TryPathTo("FootWeight", true, out subEle); FootWeight.WriteXML(subEle, master); } if (ImpactMaterialType != null) { ele.TryPathTo("ImpactMaterialType", true, out subEle); ImpactMaterialType.WriteXML(subEle, master); } if (SoundLevel != null) { ele.TryPathTo("SoundLevel", true, out subEle); SoundLevel.WriteXML(subEle, master); } if (SoundTemplate != null) { ele.TryPathTo("SoundTemplate", true, out subEle); SoundTemplate.WriteXML(subEle, master); } if (SoundData != null) { ele.TryPathTo("SoundData", true, out subEle); List <string> xmlNames = new List <string> { "Sound" }; int i = 0; foreach (var entry in SoundData) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } if (ImpactDataset != null) { ele.TryPathTo("ImpactDataset", true, out subEle); ImpactDataset.WriteXML(subEle, master); } if (MeleeWeaponList != null) { ele.TryPathTo("MeleeWeaponList", true, out subEle); MeleeWeaponList.WriteXML(subEle, master); } }
public override void WriteData(ESPWriter writer) { if (EditorID != null) { EditorID.WriteBinary(writer); } if (ObjectBounds != null) { ObjectBounds.WriteBinary(writer); } if (Name != null) { Name.WriteBinary(writer); } if (Model != null) { Model.WriteBinary(writer); } if (ActorEffects != null) { ActorEffects.Sort(); foreach (var item in ActorEffects) { item.WriteBinary(writer); } } if (UnarmedAttackEffect != null) { UnarmedAttackEffect.WriteBinary(writer); } if (UnarmedAttackAnimation != null) { UnarmedAttackAnimation.WriteBinary(writer); } if (Models != null) { Models.WriteBinary(writer); } if (TextureHashes != null) { TextureHashes.WriteBinary(writer); } if (BaseStats != null) { BaseStats.WriteBinary(writer); } if (Factions != null) { Factions.Sort(); foreach (var item in Factions) { item.WriteBinary(writer); } } if (DeathItem != null) { DeathItem.WriteBinary(writer); } if (VoiceType != null) { VoiceType.WriteBinary(writer); } if (Template != null) { Template.WriteBinary(writer); } if (Destructable != null) { Destructable.WriteBinary(writer); } if (Script != null) { Script.WriteBinary(writer); } if (Contents != null) { Contents.Sort(); foreach (var item in Contents) { item.WriteBinary(writer); } } if (AIData != null) { AIData.WriteBinary(writer); } if (Packages != null) { foreach (var item in Packages) { item.WriteBinary(writer); } } if (Animations != null) { Animations.WriteBinary(writer); } if (Data != null) { Data.WriteBinary(writer); } if (AttackReach != null) { AttackReach.WriteBinary(writer); } if (CombatStyle != null) { CombatStyle.WriteBinary(writer); } if (BodyPartData != null) { BodyPartData.WriteBinary(writer); } if (TurningSpeed != null) { TurningSpeed.WriteBinary(writer); } if (BaseScale != null) { BaseScale.WriteBinary(writer); } if (FootWeight != null) { FootWeight.WriteBinary(writer); } if (ImpactMaterialType != null) { ImpactMaterialType.WriteBinary(writer); } if (SoundLevel != null) { SoundLevel.WriteBinary(writer); } if (SoundTemplate != null) { SoundTemplate.WriteBinary(writer); } if (SoundData != null) { foreach (var item in SoundData) { item.WriteBinary(writer); } } if (ImpactDataset != null) { ImpactDataset.WriteBinary(writer); } if (MeleeWeaponList != null) { MeleeWeaponList.WriteBinary(writer); } }
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 "FULL": if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadBinary(reader); break; case "MODL": if (Model == null) { Model = new Model(); } Model.ReadBinary(reader); break; case "SPLO": if (ActorEffects == null) { ActorEffects = new List <RecordReference>(); } RecordReference tempSPLO = new RecordReference(); tempSPLO.ReadBinary(reader); ActorEffects.Add(tempSPLO); break; case "EITM": if (UnarmedAttackEffect == null) { UnarmedAttackEffect = new RecordReference(); } UnarmedAttackEffect.ReadBinary(reader); break; case "EAMT": if (UnarmedAttackAnimation == null) { UnarmedAttackAnimation = new SimpleSubrecord <UInt16>(); } UnarmedAttackAnimation.ReadBinary(reader); break; case "NIFZ": if (Models == null) { Models = new SubNullStringList(); } Models.ReadBinary(reader); break; case "NIFT": if (TextureHashes == null) { TextureHashes = new SimpleSubrecord <Byte[]>(); } TextureHashes.ReadBinary(reader); break; case "ACBS": if (BaseStats == null) { BaseStats = new CreatureBaseStats(); } BaseStats.ReadBinary(reader); break; case "SNAM": if (Factions == null) { Factions = new List <FactionMembership>(); } FactionMembership tempSNAM = new FactionMembership(); tempSNAM.ReadBinary(reader); Factions.Add(tempSNAM); break; case "INAM": if (DeathItem == null) { DeathItem = new RecordReference(); } DeathItem.ReadBinary(reader); break; case "VTCK": if (VoiceType == null) { VoiceType = new RecordReference(); } VoiceType.ReadBinary(reader); break; case "TPLT": if (Template == null) { Template = new RecordReference(); } Template.ReadBinary(reader); break; case "DEST": if (Destructable == null) { Destructable = new Destructable(); } Destructable.ReadBinary(reader); break; case "SCRI": if (Script == null) { Script = new RecordReference(); } Script.ReadBinary(reader); break; case "CNTO": if (Contents == null) { Contents = new List <InventoryItem>(); } InventoryItem tempCNTO = new InventoryItem(); tempCNTO.ReadBinary(reader); Contents.Add(tempCNTO); break; case "AIDT": if (AIData == null) { AIData = new AIData(); } AIData.ReadBinary(reader); break; case "PKID": if (Packages == null) { Packages = new List <RecordReference>(); } RecordReference tempPKID = new RecordReference(); tempPKID.ReadBinary(reader); Packages.Add(tempPKID); break; case "KFFZ": if (Animations == null) { Animations = new SubNullStringList(); } Animations.ReadBinary(reader); break; case "DATA": if (Data == null) { Data = new CreatureData(); } Data.ReadBinary(reader); break; case "RNAM": if (AttackReach == null) { AttackReach = new SimpleSubrecord <Byte>(); } AttackReach.ReadBinary(reader); break; case "ZNAM": if (CombatStyle == null) { CombatStyle = new RecordReference(); } CombatStyle.ReadBinary(reader); break; case "PNAM": if (BodyPartData == null) { BodyPartData = new RecordReference(); } BodyPartData.ReadBinary(reader); break; case "TNAM": if (TurningSpeed == null) { TurningSpeed = new SimpleSubrecord <Single>(); } TurningSpeed.ReadBinary(reader); break; case "BNAM": if (BaseScale == null) { BaseScale = new SimpleSubrecord <Single>(); } BaseScale.ReadBinary(reader); break; case "WNAM": if (FootWeight == null) { FootWeight = new SimpleSubrecord <Single>(); } FootWeight.ReadBinary(reader); break; case "NAM4": if (ImpactMaterialType == null) { ImpactMaterialType = new SimpleSubrecord <MaterialTypeUInt>(); } ImpactMaterialType.ReadBinary(reader); break; case "NAM5": if (SoundLevel == null) { SoundLevel = new SimpleSubrecord <SoundLevel>(); } SoundLevel.ReadBinary(reader); break; case "CSCR": if (SoundTemplate == null) { SoundTemplate = new RecordReference(); } SoundTemplate.ReadBinary(reader); break; case "CSDT": if (SoundData == null) { SoundData = new List <CreatureSoundData>(); } CreatureSoundData tempCSDT = new CreatureSoundData(); tempCSDT.ReadBinary(reader); SoundData.Add(tempCSDT); break; case "CNAM": if (ImpactDataset == null) { ImpactDataset = new RecordReference(); } ImpactDataset.ReadBinary(reader); break; case "LNAM": if (MeleeWeaponList == null) { MeleeWeaponList = new RecordReference(); } MeleeWeaponList.ReadBinary(reader); break; default: throw new Exception(); } } }