protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("Flags", true, out subEle);
            subEle.Value = MagicEffectFlags.ToString();

            ele.TryPathTo("BaseCost", true, out subEle);
            subEle.Value = BaseCost.ToString("G15");

            ele.TryPathTo("AssociatedItem", true, out subEle);
            AssociatedItem.WriteXML(subEle, master);

            ele.TryPathTo("MagicSchool", true, out subEle);
            subEle.Value = MagicSchool.ToString();

            ele.TryPathTo("ResistanceType", true, out subEle);
            subEle.Value = ResistanceType.ToString();

            ele.TryPathTo("Unknown", true, out subEle);
            subEle.Value = Unknown.ToString();

            WriteUnusedXML(ele, master);

            ele.TryPathTo("Light", true, out subEle);
            Light.WriteXML(subEle, master);

            ele.TryPathTo("ProjectileSpeed", true, out subEle);
            subEle.Value = ProjectileSpeed.ToString("G15");

            ele.TryPathTo("EffectShader", true, out subEle);
            EffectShader.WriteXML(subEle, master);

            ele.TryPathTo("ObjectDisplayShader", true, out subEle);
            ObjectDisplayShader.WriteXML(subEle, master);

            ele.TryPathTo("EffectSound", true, out subEle);
            EffectSound.WriteXML(subEle, master);

            ele.TryPathTo("BoltSound", true, out subEle);
            BoltSound.WriteXML(subEle, master);

            ele.TryPathTo("HitSound", true, out subEle);
            HitSound.WriteXML(subEle, master);

            ele.TryPathTo("AreaSound", true, out subEle);
            AreaSound.WriteXML(subEle, master);

            ele.TryPathTo("ConstantEffectEnchantmentFactor", true, out subEle);
            subEle.Value = ConstantEffectEnchantmentFactor.ToString("G15");

            ele.TryPathTo("ConstantEffectBarterFactor", true, out subEle);
            subEle.Value = ConstantEffectBarterFactor.ToString("G15");

            ele.TryPathTo("Archetype", true, out subEle);
            subEle.Value = Archetype.ToString();

            ele.TryPathTo("ActorValue", true, out subEle);
            subEle.Value = ActorValue.ToString();
        }
 public MagicEffectData(MagicEffectFlags MagicEffectFlags, Single BaseCost, FormID AssociatedItem, MagicSchool MagicSchool, ActorValues ResistanceType, UInt16 Unknown, Byte[] Unused, FormID Light, Single ProjectileSpeed, FormID EffectShader, FormID ObjectDisplayShader, FormID EffectSound, FormID BoltSound, FormID HitSound, FormID AreaSound, Single ConstantEffectEnchantmentFactor, Single ConstantEffectBarterFactor, MagicEffectArchetype Archetype, ActorValues ActorValue)
 {
     this.MagicEffectFlags                = MagicEffectFlags;
     this.BaseCost                        = BaseCost;
     this.AssociatedItem                  = AssociatedItem;
     this.MagicSchool                     = MagicSchool;
     this.ResistanceType                  = ResistanceType;
     this.Unknown                         = Unknown;
     this.Unused                          = Unused;
     this.Light                           = Light;
     this.ProjectileSpeed                 = ProjectileSpeed;
     this.EffectShader                    = EffectShader;
     this.ObjectDisplayShader             = ObjectDisplayShader;
     this.EffectSound                     = EffectSound;
     this.BoltSound                       = BoltSound;
     this.HitSound                        = HitSound;
     this.AreaSound                       = AreaSound;
     this.ConstantEffectEnchantmentFactor = ConstantEffectEnchantmentFactor;
     this.ConstantEffectBarterFactor      = ConstantEffectBarterFactor;
     this.Archetype                       = Archetype;
     this.ActorValue                      = ActorValue;
 }
 public MagicEffectData(string Tag = null)
     : base(Tag)
 {
     MagicEffectFlags                = new MagicEffectFlags();
     BaseCost                        = new Single();
     AssociatedItem                  = new FormID();
     MagicSchool                     = new MagicSchool();
     ResistanceType                  = new ActorValues();
     Unknown                         = new UInt16();
     Unused                          = new byte[2];
     Light                           = new FormID();
     ProjectileSpeed                 = new Single();
     EffectShader                    = new FormID();
     ObjectDisplayShader             = new FormID();
     EffectSound                     = new FormID();
     BoltSound                       = new FormID();
     HitSound                        = new FormID();
     AreaSound                       = new FormID();
     ConstantEffectEnchantmentFactor = new Single();
     ConstantEffectBarterFactor      = new Single();
     Archetype                       = new MagicEffectArchetype();
     ActorValue                      = new ActorValues();
 }