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

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

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

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

                RagdollBipedData.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Patrol", false, out subEle))
            {
                if (Patrol == null)
                {
                    Patrol = new ReferencePatrolData();
                }

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

                LevelModifier.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("MerchantContainer", false, out subEle))
            {
                if (MerchantContainer == null)
                {
                    MerchantContainer = new RecordReference();
                }

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

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

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

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

                foreach (XElement e in subEle.Elements())
                {
                    SimpleSubrecord <Byte[]> tempXDCR = new SimpleSubrecord <Byte[]>();
                    tempXDCR.ReadXML(e, master);
                    Decals.Add(tempXDCR);
                }
            }
            if (ele.TryPathTo("LinkedReference", false, out subEle))
            {
                if (LinkedReference == null)
                {
                    LinkedReference = new RecordReference();
                }

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

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

                ParentActivateOnly.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ActivateParents", false, out subEle))
            {
                if (ActivateParents == null)
                {
                    ActivateParents = new List <ActivateParent>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    ActivateParent tempXAPR = new ActivateParent();
                    tempXAPR.ReadXML(e, master);
                    ActivateParents.Add(tempXAPR);
                }
            }
            if (ele.TryPathTo("ActivationPrompt", false, out subEle))
            {
                if (ActivationPrompt == null)
                {
                    ActivationPrompt = new SimpleSubrecord <String>();
                }

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

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

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

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

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

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

                PositionRotation.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("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.º 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("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);
            }
        }