예제 #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("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);
            }
        }
예제 #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("EncounterZone", false, out subEle))
            {
                if (EncounterZone == null)
                {
                    EncounterZone = new RecordReference();
                }

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

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

                ParentWorldspaceFlags.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("LODWater/Type", false, out subEle))
            {
                if (LODWaterType == null)
                {
                    LODWaterType = new RecordReference();
                }

                LODWaterType.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("LODWater/Height", false, out subEle))
            {
                if (LODWaterHeight == null)
                {
                    LODWaterHeight = new SimpleSubrecord <Single>();
                }

                LODWaterHeight.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("LandData", false, out subEle))
            {
                if (LandData == null)
                {
                    LandData = new WorldLandData();
                }

                LandData.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Large", false, out subEle))
            {
                if (LargeIcon == null)
                {
                    LargeIcon = new SimpleSubrecord <String>();
                }

                LargeIcon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Small", false, out subEle))
            {
                if (SmallIcon == null)
                {
                    SmallIcon = new SimpleSubrecord <String>();
                }

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

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

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

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

                WorldspaceFlags.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ObjectBounds/Min", false, out subEle))
            {
                if (MinObjectBounds == null)
                {
                    MinObjectBounds = new SimpleSubrecord <XYFloat>();
                }

                MinObjectBounds.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ObjectBounds/Max", false, out subEle))
            {
                if (MaxObjectBounds == null)
                {
                    MaxObjectBounds = new SimpleSubrecord <XYFloat>();
                }

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

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

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

                WaterNoiseTexture.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("SwappedImpacts", false, out subEle))
            {
                if (SwappedImpacts == null)
                {
                    SwappedImpacts = new List <SwappedImpact>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    SwappedImpact tempIMPS = new SwappedImpact();
                    tempIMPS.ReadXML(e, master);
                    SwappedImpacts.Add(tempIMPS);
                }
            }
            if (ele.TryPathTo("FootstepMaterial", false, out subEle))
            {
                if (FootstepMaterial == null)
                {
                    FootstepMaterial = new FootstepMaterial();
                }

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

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

                OffsetData.ReadXML(subEle, master);
            }
        }