Exemplo 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("Relationships", false, out subEle))
            {
                if (Relationships == null)
                {
                    Relationships = new List <Relationship>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    Relationship tempXNAM = new Relationship();
                    tempXNAM.ReadXML(e, master);
                    Relationships.Add(tempXNAM);
                }
            }
            if (ele.TryPathTo("Data", false, out subEle))
            {
                if (Data == null)
                {
                    Data = new FactionData();
                }

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

                Unused.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Ranks", false, out subEle))
            {
                if (Ranks == null)
                {
                    Ranks = new List <FactionRank>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    FactionRank tempRNAM = new FactionRank();
                    tempRNAM.ReadXML(e, master);
                    Ranks.Add(tempRNAM);
                }
            }
            if (ele.TryPathTo("Reputation", false, out subEle))
            {
                if (Reputation == null)
                {
                    Reputation = new RecordReference();
                }

                Reputation.ReadXML(subEle, master);
            }
        }
Exemplo n.º 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("Name", false, out subEle))
            {
                if (Name == null)
                {
                    Name = new SimpleSubrecord <String>();
                }

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

                CellFlags.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Grid", false, out subEle))
            {
                if (Grid == null)
                {
                    Grid = new CellGrid();
                }

                Grid.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Lighting", false, out subEle))
            {
                if (Lighting == null)
                {
                    Lighting = new CellLighting();
                }

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

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

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

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

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

                WaterNoiseTexture.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Regions", false, out subEle))
            {
                if (Regions == null)
                {
                    Regions = new SortedFormArray();
                }

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

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

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

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

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

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

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

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

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

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

                MusicType.ReadXML(subEle, master);
            }
        }
Exemplo n.º 3
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("ImageSpaceModifier/Sunrise", false, out subEle))
            {
                if (ImageSpaceModifierSunrise == null)
                {
                    ImageSpaceModifierSunrise = new RecordReference();
                }

                ImageSpaceModifierSunrise.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/Day", false, out subEle))
            {
                if (ImageSpaceModifierDay == null)
                {
                    ImageSpaceModifierDay = new RecordReference();
                }

                ImageSpaceModifierDay.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/Sunset", false, out subEle))
            {
                if (ImageSpaceModifierSunset == null)
                {
                    ImageSpaceModifierSunset = new RecordReference();
                }

                ImageSpaceModifierSunset.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/Night", false, out subEle))
            {
                if (ImageSpaceModifierNight == null)
                {
                    ImageSpaceModifierNight = new RecordReference();
                }

                ImageSpaceModifierNight.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/HighNoon", false, out subEle))
            {
                if (ImageSpaceModifierHighNoon == null)
                {
                    ImageSpaceModifierHighNoon = new RecordReference();
                }

                ImageSpaceModifierHighNoon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/Midnight", false, out subEle))
            {
                if (ImageSpaceModifierMidnight == null)
                {
                    ImageSpaceModifierMidnight = new RecordReference();
                }

                ImageSpaceModifierMidnight.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("CloudTexture/Layer0", false, out subEle))
            {
                if (CloudTextureLayer0 == null)
                {
                    CloudTextureLayer0 = new SimpleSubrecord <String>();
                }

                CloudTextureLayer0.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("CloudTexture/Layer1", false, out subEle))
            {
                if (CloudTextureLayer1 == null)
                {
                    CloudTextureLayer1 = new SimpleSubrecord <String>();
                }

                CloudTextureLayer1.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("CloudTexture/Layer2", false, out subEle))
            {
                if (CloudTextureLayer2 == null)
                {
                    CloudTextureLayer2 = new SimpleSubrecord <String>();
                }

                CloudTextureLayer2.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("CloudTexture/Layer3", false, out subEle))
            {
                if (CloudTextureLayer3 == null)
                {
                    CloudTextureLayer3 = new SimpleSubrecord <String>();
                }

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

                Model.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Unknown", false, out subEle))
            {
                if (Unknown == null)
                {
                    Unknown = new SimpleSubrecord <Byte[]>();
                }

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

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

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

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

                WeatherFogDistance.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Unused", false, out subEle))
            {
                if (Unused == null)
                {
                    Unused = new SimpleSubrecord <Byte[]>();
                }

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

                Data.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Sounds", false, out subEle))
            {
                if (Sounds == null)
                {
                    Sounds = new List <WeatherSound>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    WeatherSound tempSNAM = new WeatherSound();
                    tempSNAM.ReadXML(e, master);
                    Sounds.Add(tempSNAM);
                }
            }
        }
Exemplo n.º 4
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("Data", false, out subEle))
            {
                if (Data == null)
                {
                    Data = new PackageData();
                }

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

                Location1.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Location2", false, out subEle))
            {
                if (Location2 == null)
                {
                    Location2 = new PackageLocation();
                }

                Location2.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Schedule", false, out subEle))
            {
                if (Schedule == null)
                {
                    Schedule = new PackageScheduleData();
                }

                Schedule.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Target1", false, out subEle))
            {
                if (Target1 == null)
                {
                    Target1 = new PackageTarget();
                }

                Target1.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Conditions", false, out subEle))
            {
                if (Conditions == null)
                {
                    Conditions = new List <Condition>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    Condition tempCTDA = new Condition();
                    tempCTDA.ReadXML(e, master);
                    Conditions.Add(tempCTDA);
                }
            }
            if (ele.TryPathTo("Idle/Flags", false, out subEle))
            {
                if (IdleFlags == null)
                {
                    IdleFlags = new SimpleSubrecord <PackageIdleFlags>();
                }

                IdleFlags.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Idle/Count", false, out subEle))
            {
                if (IdleCount == null)
                {
                    IdleCount = new SimpleSubrecord <Byte>();
                }

                IdleCount.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Idle/TimerSetting", false, out subEle))
            {
                if (IdleTimerSetting == null)
                {
                    IdleTimerSetting = new SimpleSubrecord <Single>();
                }

                IdleTimerSetting.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Idle/Animations", false, out subEle))
            {
                if (IdleAnimations == null)
                {
                    IdleAnimations = new FormArray();
                }

                IdleAnimations.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Unused", false, out subEle))
            {
                if (Unused == null)
                {
                    Unused = new SimpleSubrecord <Byte[]>();
                }

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

                CombatStyle.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("EatMarker", false, out subEle))
            {
                if (EatMarker == null)
                {
                    EatMarker = new SubMarker();
                }

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

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

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

                PatrolIsRepeatable.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("UseWeaponData", false, out subEle))
            {
                if (UseWeaponData == null)
                {
                    UseWeaponData = new PackageUseWeaponData();
                }

                UseWeaponData.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Target2", false, out subEle))
            {
                if (Target2 == null)
                {
                    Target2 = new PackageTarget();
                }

                Target2.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("UseItemMarker", false, out subEle))
            {
                if (UseItemMarker == null)
                {
                    UseItemMarker = new SubMarker();
                }

                UseItemMarker.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("AmbushMarker", false, out subEle))
            {
                if (AmbushMarker == null)
                {
                    AmbushMarker = new SubMarker();
                }

                AmbushMarker.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("DialogData", false, out subEle))
            {
                if (DialogData == null)
                {
                    DialogData = new PackageDialogData();
                }

                DialogData.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("DummyIgnore", false, out subEle))
            {
                if (DummyIgnore == null)
                {
                    DummyIgnore = new PackageLocation();
                }

                DummyIgnore.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("OnBegin", false, out subEle))
            {
                if (OnBegin == null)
                {
                    OnBegin = new PackageEvent();
                }

                OnBegin.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("OnEnd", false, out subEle))
            {
                if (OnEnd == null)
                {
                    OnEnd = new PackageEvent();
                }

                OnEnd.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("OnChange", false, out subEle))
            {
                if (OnChange == null)
                {
                    OnChange = new PackageEvent();
                }

                OnChange.ReadXML(subEle, master);
            }
        }