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 (LargeIcon != null) { ele.TryPathTo("Icon/Large", true, out subEle); LargeIcon.WriteXML(subEle, master); } if (SmallIcon != null) { ele.TryPathTo("Icon/Small", true, out subEle); SmallIcon.WriteXML(subEle, master); } if (Script != null) { ele.TryPathTo("Script", true, out subEle); Script.WriteXML(subEle, master); } if (Destructable != null) { ele.TryPathTo("Destructable", true, out subEle); Destructable.WriteXML(subEle, master); } if (PickUpSound != null) { ele.TryPathTo("PickUpSound", true, out subEle); PickUpSound.WriteXML(subEle, master); } if (DropSound != null) { ele.TryPathTo("DropSound", true, out subEle); DropSound.WriteXML(subEle, master); } if (Data != null) { ele.TryPathTo("Data", true, out subEle); Data.WriteXML(subEle, master); } if (ExtraData != null) { ele.TryPathTo("ExtraData", true, out subEle); ExtraData.WriteXML(subEle, master); } if (ShortName != null) { ele.TryPathTo("ShortName", true, out subEle); ShortName.WriteXML(subEle, master); } if (Abbreviation != null) { ele.TryPathTo("Abbreviation", true, out subEle); Abbreviation.WriteXML(subEle, master); } if (AmmoEffects != null) { ele.TryPathTo("AmmoEffects", true, out subEle); List <string> xmlNames = new List <string> { "Effect" }; int i = 0; foreach (var entry in AmmoEffects) { i = i % xmlNames.Count(); XElement newEle = new XElement(xmlNames[i]); entry.WriteXML(newEle, master); subEle.Add(newEle); i++; } } }