Esempio n. 1
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("Name", false, out subEle))
            {
                if (Name == null)
                {
                    Name = new SimpleSubrecord <String>();
                }

                Name.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("NoiseMap", false, out subEle))
            {
                if (NoiseMap == null)
                {
                    NoiseMap = new SimpleSubrecord <String>();
                }

                NoiseMap.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Opacity", false, out subEle))
            {
                if (Opacity == null)
                {
                    Opacity = new SimpleSubrecord <Byte>();
                }

                Opacity.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("WaterFlags", false, out subEle))
            {
                if (WaterFlags == null)
                {
                    WaterFlags = new SimpleSubrecord <WaterFlags>();
                }

                WaterFlags.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("MaterialID", false, out subEle))
            {
                if (MaterialID == null)
                {
                    MaterialID = new SimpleSubrecord <String>();
                }

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

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

                ActorEffect.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Damage", false, out subEle))
            {
                if (Damage == null)
                {
                    Damage = new SimpleSubrecord <UInt16>();
                }

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

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

                RelatedWaters.ReadXML(subEle, master);
            }
        }