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 (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);
            }
        }
예제 #2
0
        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 (EquipmentType != null)
            {
                ele.TryPathTo("EquipmentType", true, out subEle);
                EquipmentType.WriteXML(subEle, master);
            }
            if (Weight != null)
            {
                ele.TryPathTo("Weight", true, out subEle);
                Weight.WriteXML(subEle, master);
            }
            if (Data != null)
            {
                ele.TryPathTo("Data", true, out subEle);
                Data.WriteXML(subEle, master);
            }
            if (Effects != null)
            {
                ele.TryPathTo("Effects", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Effect"
                };
                int i = 0;
                foreach (var entry in Effects)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
        }
예제 #3
0
        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 (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 (Type != null)
            {
                ele.TryPathTo("Type", true, out subEle);
                Type.WriteXML(subEle, master);
            }
            if (Quests != null)
            {
                ele.TryPathTo("Quests", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Quest"
                };
                int i = 0;
                foreach (var entry in Quests)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (Image != null)
            {
                ele.TryPathTo("Image", true, out subEle);
                Image.WriteXML(subEle, master);
            }

            WriteEntryDataXML(ele, master);
            if (Audio != null)
            {
                ele.TryPathTo("Audio", true, out subEle);
                Audio.WriteXML(subEle, master);
            }
        }