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 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 (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 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); } }