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

            if (ele.TryPathTo("Force", false, out subEle))
            {
                Force = subEle.ToSingle();
            }

            if (ele.TryPathTo("Damage", false, out subEle))
            {
                Damage = subEle.ToSingle();
            }

            if (ele.TryPathTo("Radius", false, out subEle))
            {
                Radius = subEle.ToSingle();
            }

            if (ele.TryPathTo("Light", false, out subEle))
            {
                Light.ReadXML(subEle, master);
            }

            if (ele.TryPathTo("Sound1", false, out subEle))
            {
                Sound1.ReadXML(subEle, master);
            }

            if (ele.TryPathTo("Flags", false, out subEle))
            {
                Flags = subEle.ToEnum <ExplosionFlags>();
            }

            if (ele.TryPathTo("ISRadius", false, out subEle))
            {
                ISRadius = subEle.ToSingle();
            }

            if (ele.TryPathTo("ImpactDataSet", false, out subEle))
            {
                ImpactDataSet.ReadXML(subEle, master);
            }

            if (ele.TryPathTo("Sound2", false, out subEle))
            {
                Sound2.ReadXML(subEle, master);
            }

            if (ele.TryPathTo("Radiation/Level", false, out subEle))
            {
                RadiationLevel = subEle.ToSingle();
            }

            if (ele.TryPathTo("Radiation/DissipationTime", false, out subEle))
            {
                RadiationDissipationTime = subEle.ToSingle();
            }

            if (ele.TryPathTo("Radiation/Radius", false, out subEle))
            {
                RadiationRadius = subEle.ToSingle();
            }

            if (ele.TryPathTo("SoundLevel", false, out subEle))
            {
                SoundLevel = subEle.ToEnum <SoundLevel>();
            }
        }
Example #2
0
        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("Model", false, out subEle))
            {
                if (Model == null)
                {
                    Model = new Model();
                }

                Model.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Data", false, out subEle))
            {
                if (Data == null)
                {
                    Data = new ImpactData();
                }

                Data.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("DecalData", false, out subEle))
            {
                if (DecalData == null)
                {
                    DecalData = new DecalData();
                }

                DecalData.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("TextureSet", false, out subEle))
            {
                if (TextureSet == null)
                {
                    TextureSet = new RecordReference();
                }

                TextureSet.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Sound1", false, out subEle))
            {
                if (Sound1 == null)
                {
                    Sound1 = new RecordReference();
                }

                Sound1.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Sound2", false, out subEle))
            {
                if (Sound2 == null)
                {
                    Sound2 = new RecordReference();
                }

                Sound2.ReadXML(subEle, master);
            }
        }