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

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

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

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

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

                BipedData.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Male/FileName", false, out subEle))
            {
                if (MaleBipedModelFileName == null)
                {
                    MaleBipedModelFileName = new SimpleSubrecord <String>();
                }

                MaleBipedModelFileName.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Male/TextureHashes", false, out subEle))
            {
                if (MaleBipedModelTextureHashes == null)
                {
                    MaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>();
                }

                MaleBipedModelTextureHashes.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Male/AlternateTextures", false, out subEle))
            {
                if (MaleBipedModelAlternateTextures == null)
                {
                    MaleBipedModelAlternateTextures = new AlternateTextures();
                }

                MaleBipedModelAlternateTextures.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Male/FaceGenModelFlags", false, out subEle))
            {
                if (MaleBipedModelFaceGenModelFlags == null)
                {
                    MaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>();
                }

                MaleBipedModelFaceGenModelFlags.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Male/FileName", false, out subEle))
            {
                if (MaleWorldModelFileName == null)
                {
                    MaleWorldModelFileName = new SimpleSubrecord <String>();
                }

                MaleWorldModelFileName.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Male/TextureHashes", false, out subEle))
            {
                if (MaleWorldModelTextureHashes == null)
                {
                    MaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>();
                }

                MaleWorldModelTextureHashes.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Male/AlternateTextures", false, out subEle))
            {
                if (MaleWorldModelAlternateTextures == null)
                {
                    MaleWorldModelAlternateTextures = new AlternateTextures();
                }

                MaleWorldModelAlternateTextures.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Inventory/Male", false, out subEle))
            {
                if (MaleInventoryIcon == null)
                {
                    MaleInventoryIcon = new SimpleSubrecord <String>();
                }

                MaleInventoryIcon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Message/Male", false, out subEle))
            {
                if (MaleMessageIcon == null)
                {
                    MaleMessageIcon = new SimpleSubrecord <String>();
                }

                MaleMessageIcon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Female/FileName", false, out subEle))
            {
                if (FemaleBipedModelFileName == null)
                {
                    FemaleBipedModelFileName = new SimpleSubrecord <String>();
                }

                FemaleBipedModelFileName.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Female/TextureHashes", false, out subEle))
            {
                if (FemaleBipedModelTextureHashes == null)
                {
                    FemaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>();
                }

                FemaleBipedModelTextureHashes.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Female/AlternateTextures", false, out subEle))
            {
                if (FemaleBipedModelAlternateTextures == null)
                {
                    FemaleBipedModelAlternateTextures = new AlternateTextures();
                }

                FemaleBipedModelAlternateTextures.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Female/FaceGenModelFlags", false, out subEle))
            {
                if (FemaleBipedModelFaceGenModelFlags == null)
                {
                    FemaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>();
                }

                FemaleBipedModelFaceGenModelFlags.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Female/FileName", false, out subEle))
            {
                if (FemaleWorldModelFileName == null)
                {
                    FemaleWorldModelFileName = new SimpleSubrecord <String>();
                }

                FemaleWorldModelFileName.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Female/TextureHashes", false, out subEle))
            {
                if (FemaleWorldModelTextureHashes == null)
                {
                    FemaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>();
                }

                FemaleWorldModelTextureHashes.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Female/AlternateTextures", false, out subEle))
            {
                if (FemaleWorldModelAlternateTextures == null)
                {
                    FemaleWorldModelAlternateTextures = new AlternateTextures();
                }

                FemaleWorldModelAlternateTextures.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Inventory/Female", false, out subEle))
            {
                if (FemaleInventoryIcon == null)
                {
                    FemaleInventoryIcon = new SimpleSubrecord <String>();
                }

                FemaleInventoryIcon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Message/Female", false, out subEle))
            {
                if (FemaleMessageIcon == null)
                {
                    FemaleMessageIcon = new SimpleSubrecord <String>();
                }

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

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

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

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

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

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

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

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

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

                OverridesAnimationSounds.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("AnimationSounds", false, out subEle))
            {
                if (AnimationSounds == null)
                {
                    AnimationSounds = new List <AnimationSound>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    AnimationSound tempSNAM = new AnimationSound();
                    tempSNAM.ReadXML(e, master);
                    AnimationSounds.Add(tempSNAM);
                }
            }
            if (ele.TryPathTo("AnimationSoundsTemplate", false, out subEle))
            {
                if (AnimationSoundsTemplate == null)
                {
                    AnimationSoundsTemplate = new RecordReference();
                }

                AnimationSoundsTemplate.ReadXML(subEle, master);
            }
        }
Beispiel #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("ObjectBounds", false, out subEle))
            {
                if (ObjectBounds == null)
                {
                    ObjectBounds = new ObjectBounds();
                }

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

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

                BipedData.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Male/FileName", false, out subEle))
            {
                if (MaleBipedModelFileName == null)
                {
                    MaleBipedModelFileName = new SimpleSubrecord <String>();
                }

                MaleBipedModelFileName.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Male/TextureHashes", false, out subEle))
            {
                if (MaleBipedModelTextureHashes == null)
                {
                    MaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>();
                }

                MaleBipedModelTextureHashes.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Male/AlternateTextures", false, out subEle))
            {
                if (MaleBipedModelAlternateTextures == null)
                {
                    MaleBipedModelAlternateTextures = new AlternateTextures();
                }

                MaleBipedModelAlternateTextures.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Male/FaceGenModelFlags", false, out subEle))
            {
                if (MaleBipedModelFaceGenModelFlags == null)
                {
                    MaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>();
                }

                MaleBipedModelFaceGenModelFlags.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Male/FileName", false, out subEle))
            {
                if (MaleWorldModelFileName == null)
                {
                    MaleWorldModelFileName = new SimpleSubrecord <String>();
                }

                MaleWorldModelFileName.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Male/TextureHashes", false, out subEle))
            {
                if (MaleWorldModelTextureHashes == null)
                {
                    MaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>();
                }

                MaleWorldModelTextureHashes.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Male/AlternateTextures", false, out subEle))
            {
                if (MaleWorldModelAlternateTextures == null)
                {
                    MaleWorldModelAlternateTextures = new AlternateTextures();
                }

                MaleWorldModelAlternateTextures.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Inventory/Male", false, out subEle))
            {
                if (MaleInventoryIcon == null)
                {
                    MaleInventoryIcon = new SimpleSubrecord <String>();
                }

                MaleInventoryIcon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Message/Male", false, out subEle))
            {
                if (MaleMessageIcon == null)
                {
                    MaleMessageIcon = new SimpleSubrecord <String>();
                }

                MaleMessageIcon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Female/FileName", false, out subEle))
            {
                if (FemaleBipedModelFileName == null)
                {
                    FemaleBipedModelFileName = new SimpleSubrecord <String>();
                }

                FemaleBipedModelFileName.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Female/TextureHashes", false, out subEle))
            {
                if (FemaleBipedModelTextureHashes == null)
                {
                    FemaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>();
                }

                FemaleBipedModelTextureHashes.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Female/AlternateTextures", false, out subEle))
            {
                if (FemaleBipedModelAlternateTextures == null)
                {
                    FemaleBipedModelAlternateTextures = new AlternateTextures();
                }

                FemaleBipedModelAlternateTextures.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/Biped/Female/FaceGenModelFlags", false, out subEle))
            {
                if (FemaleBipedModelFaceGenModelFlags == null)
                {
                    FemaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>();
                }

                FemaleBipedModelFaceGenModelFlags.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Female/FileName", false, out subEle))
            {
                if (FemaleWorldModelFileName == null)
                {
                    FemaleWorldModelFileName = new SimpleSubrecord <String>();
                }

                FemaleWorldModelFileName.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Female/TextureHashes", false, out subEle))
            {
                if (FemaleWorldModelTextureHashes == null)
                {
                    FemaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>();
                }

                FemaleWorldModelTextureHashes.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Models/World/Female/AlternateTextures", false, out subEle))
            {
                if (FemaleWorldModelAlternateTextures == null)
                {
                    FemaleWorldModelAlternateTextures = new AlternateTextures();
                }

                FemaleWorldModelAlternateTextures.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Inventory/Female", false, out subEle))
            {
                if (FemaleInventoryIcon == null)
                {
                    FemaleInventoryIcon = new SimpleSubrecord <String>();
                }

                FemaleInventoryIcon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Message/Female", false, out subEle))
            {
                if (FemaleMessageIcon == null)
                {
                    FemaleMessageIcon = new SimpleSubrecord <String>();
                }

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

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

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

                ExtraData.ReadXML(subEle, master);
            }
        }