예제 #1
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "OBND":
                    if (ObjectBounds == null)
                    {
                        ObjectBounds = new ObjectBounds();
                    }

                    ObjectBounds.ReadBinary(reader);
                    break;

                case "FULL":
                    if (Name == null)
                    {
                        Name = new SimpleSubrecord <String>();
                    }

                    Name.ReadBinary(reader);
                    break;

                case "SCRI":
                    if (Script == null)
                    {
                        Script = new RecordReference();
                    }

                    Script.ReadBinary(reader);
                    break;

                case "EITM":
                    if (ObjectEffect == null)
                    {
                        ObjectEffect = new RecordReference();
                    }

                    ObjectEffect.ReadBinary(reader);
                    break;

                case "BMDT":
                    if (BipedData == null)
                    {
                        BipedData = new BipedData();
                    }

                    BipedData.ReadBinary(reader);
                    break;

                case "MODL":
                    if (MaleBipedModelFileName == null)
                    {
                        MaleBipedModelFileName = new SimpleSubrecord <String>();
                    }

                    MaleBipedModelFileName.ReadBinary(reader);
                    break;

                case "MODT":
                    if (MaleBipedModelTextureHashes == null)
                    {
                        MaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>();
                    }

                    MaleBipedModelTextureHashes.ReadBinary(reader);
                    break;

                case "MODS":
                    if (MaleBipedModelAlternateTextures == null)
                    {
                        MaleBipedModelAlternateTextures = new AlternateTextures();
                    }

                    MaleBipedModelAlternateTextures.ReadBinary(reader);
                    break;

                case "MODD":
                    if (MaleBipedModelFaceGenModelFlags == null)
                    {
                        MaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>();
                    }

                    MaleBipedModelFaceGenModelFlags.ReadBinary(reader);
                    break;

                case "MOD2":
                    if (MaleWorldModelFileName == null)
                    {
                        MaleWorldModelFileName = new SimpleSubrecord <String>();
                    }

                    MaleWorldModelFileName.ReadBinary(reader);
                    break;

                case "MO2T":
                    if (MaleWorldModelTextureHashes == null)
                    {
                        MaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>();
                    }

                    MaleWorldModelTextureHashes.ReadBinary(reader);
                    break;

                case "MO2S":
                    if (MaleWorldModelAlternateTextures == null)
                    {
                        MaleWorldModelAlternateTextures = new AlternateTextures();
                    }

                    MaleWorldModelAlternateTextures.ReadBinary(reader);
                    break;

                case "ICON":
                    if (MaleInventoryIcon == null)
                    {
                        MaleInventoryIcon = new SimpleSubrecord <String>();
                    }

                    MaleInventoryIcon.ReadBinary(reader);
                    break;

                case "MICO":
                    if (MaleMessageIcon == null)
                    {
                        MaleMessageIcon = new SimpleSubrecord <String>();
                    }

                    MaleMessageIcon.ReadBinary(reader);
                    break;

                case "MOD3":
                    if (FemaleBipedModelFileName == null)
                    {
                        FemaleBipedModelFileName = new SimpleSubrecord <String>();
                    }

                    FemaleBipedModelFileName.ReadBinary(reader);
                    break;

                case "MO3T":
                    if (FemaleBipedModelTextureHashes == null)
                    {
                        FemaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>();
                    }

                    FemaleBipedModelTextureHashes.ReadBinary(reader);
                    break;

                case "MO3S":
                    if (FemaleBipedModelAlternateTextures == null)
                    {
                        FemaleBipedModelAlternateTextures = new AlternateTextures();
                    }

                    FemaleBipedModelAlternateTextures.ReadBinary(reader);
                    break;

                case "MOSD":
                    if (FemaleBipedModelFaceGenModelFlags == null)
                    {
                        FemaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>();
                    }

                    FemaleBipedModelFaceGenModelFlags.ReadBinary(reader);
                    break;

                case "MOD4":
                    if (FemaleWorldModelFileName == null)
                    {
                        FemaleWorldModelFileName = new SimpleSubrecord <String>();
                    }

                    FemaleWorldModelFileName.ReadBinary(reader);
                    break;

                case "MO4T":
                    if (FemaleWorldModelTextureHashes == null)
                    {
                        FemaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>();
                    }

                    FemaleWorldModelTextureHashes.ReadBinary(reader);
                    break;

                case "MO4S":
                    if (FemaleWorldModelAlternateTextures == null)
                    {
                        FemaleWorldModelAlternateTextures = new AlternateTextures();
                    }

                    FemaleWorldModelAlternateTextures.ReadBinary(reader);
                    break;

                case "ICO2":
                    if (FemaleInventoryIcon == null)
                    {
                        FemaleInventoryIcon = new SimpleSubrecord <String>();
                    }

                    FemaleInventoryIcon.ReadBinary(reader);
                    break;

                case "MIC2":
                    if (FemaleMessageIcon == null)
                    {
                        FemaleMessageIcon = new SimpleSubrecord <String>();
                    }

                    FemaleMessageIcon.ReadBinary(reader);
                    break;

                case "BMCT":
                    if (RagdollConstraintTemplate == null)
                    {
                        RagdollConstraintTemplate = new SimpleSubrecord <String>();
                    }

                    RagdollConstraintTemplate.ReadBinary(reader);
                    break;

                case "REPL":
                    if (RepairList == null)
                    {
                        RepairList = new RecordReference();
                    }

                    RepairList.ReadBinary(reader);
                    break;

                case "BIPL":
                    if (BipedModelList == null)
                    {
                        BipedModelList = new RecordReference();
                    }

                    BipedModelList.ReadBinary(reader);
                    break;

                case "ETYP":
                    if (EquipmentType == null)
                    {
                        EquipmentType = new SimpleSubrecord <EquipmentType>();
                    }

                    EquipmentType.ReadBinary(reader);
                    break;

                case "YNAM":
                    if (PickupSound == null)
                    {
                        PickupSound = new RecordReference();
                    }

                    PickupSound.ReadBinary(reader);
                    break;

                case "ZNAM":
                    if (DropSound == null)
                    {
                        DropSound = new RecordReference();
                    }

                    DropSound.ReadBinary(reader);
                    break;

                case "DATA":
                    if (Data == null)
                    {
                        Data = new ArmorData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "DNAM":
                    if (ExtraData == null)
                    {
                        ExtraData = new ArmorExtraData();
                    }

                    ExtraData.ReadBinary(reader);
                    break;

                case "BNAM":
                    if (OverridesAnimationSounds == null)
                    {
                        OverridesAnimationSounds = new SimpleSubrecord <NoYes>();
                    }

                    OverridesAnimationSounds.ReadBinary(reader);
                    break;

                case "SNAM":
                    if (AnimationSounds == null)
                    {
                        AnimationSounds = new List <AnimationSound>();
                    }

                    AnimationSound tempSNAM = new AnimationSound();
                    tempSNAM.ReadBinary(reader);
                    AnimationSounds.Add(tempSNAM);
                    break;

                case "TNAM":
                    if (AnimationSoundsTemplate == null)
                    {
                        AnimationSoundsTemplate = new RecordReference();
                    }

                    AnimationSoundsTemplate.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
예제 #2
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "OBND":
                    if (ObjectBounds == null)
                    {
                        ObjectBounds = new ObjectBounds();
                    }

                    ObjectBounds.ReadBinary(reader);
                    break;

                case "FULL":
                    if (Name == null)
                    {
                        Name = new SimpleSubrecord <String>();
                    }

                    Name.ReadBinary(reader);
                    break;

                case "MODL":
                    if (Model == null)
                    {
                        Model = new Model();
                    }

                    Model.ReadBinary(reader);
                    break;

                case "ICON":
                    if (LargeIcon == null)
                    {
                        LargeIcon = new SimpleSubrecord <String>();
                    }

                    LargeIcon.ReadBinary(reader);
                    break;

                case "MICO":
                    if (SmallIcon == null)
                    {
                        SmallIcon = new SimpleSubrecord <String>();
                    }

                    SmallIcon.ReadBinary(reader);
                    break;

                case "SCRI":
                    if (Script == null)
                    {
                        Script = new RecordReference();
                    }

                    Script.ReadBinary(reader);
                    break;

                case "DEST":
                    if (Destructable == null)
                    {
                        Destructable = new Destructable();
                    }

                    Destructable.ReadBinary(reader);
                    break;

                case "YNAM":
                    if (PickUpSound == null)
                    {
                        PickUpSound = new RecordReference();
                    }

                    PickUpSound.ReadBinary(reader);
                    break;

                case "ZNAM":
                    if (DropSound == null)
                    {
                        DropSound = new RecordReference();
                    }

                    DropSound.ReadBinary(reader);
                    break;

                case "ETYP":
                    if (EquipmentType == null)
                    {
                        EquipmentType = new SimpleSubrecord <EquipmentType>();
                    }

                    EquipmentType.ReadBinary(reader);
                    break;

                case "DATA":
                    if (Weight == null)
                    {
                        Weight = new SimpleSubrecord <Single>();
                    }

                    Weight.ReadBinary(reader);
                    break;

                case "ENIT":
                    if (Data == null)
                    {
                        Data = new IngestibleData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "EFID":
                    if (Effects == null)
                    {
                        Effects = new List <Effect>();
                    }

                    Effect tempEFID = new Effect();
                    tempEFID.ReadBinary(reader);
                    Effects.Add(tempEFID);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
예제 #3
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "OBND":
                    if (ObjectBounds == null)
                    {
                        ObjectBounds = new ObjectBounds();
                    }

                    ObjectBounds.ReadBinary(reader);
                    break;

                case "FULL":
                    if (Name == null)
                    {
                        Name = new SimpleSubrecord <String>();
                    }

                    Name.ReadBinary(reader);
                    break;

                case "BMDT":
                    if (BipedData == null)
                    {
                        BipedData = new BipedData();
                    }

                    BipedData.ReadBinary(reader);
                    break;

                case "MODL":
                    if (MaleBipedModelFileName == null)
                    {
                        MaleBipedModelFileName = new SimpleSubrecord <String>();
                    }

                    MaleBipedModelFileName.ReadBinary(reader);
                    break;

                case "MODT":
                    if (MaleBipedModelTextureHashes == null)
                    {
                        MaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>();
                    }

                    MaleBipedModelTextureHashes.ReadBinary(reader);
                    break;

                case "MODS":
                    if (MaleBipedModelAlternateTextures == null)
                    {
                        MaleBipedModelAlternateTextures = new AlternateTextures();
                    }

                    MaleBipedModelAlternateTextures.ReadBinary(reader);
                    break;

                case "MODD":
                    if (MaleBipedModelFaceGenModelFlags == null)
                    {
                        MaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>();
                    }

                    MaleBipedModelFaceGenModelFlags.ReadBinary(reader);
                    break;

                case "MOD2":
                    if (MaleWorldModelFileName == null)
                    {
                        MaleWorldModelFileName = new SimpleSubrecord <String>();
                    }

                    MaleWorldModelFileName.ReadBinary(reader);
                    break;

                case "MO2T":
                    if (MaleWorldModelTextureHashes == null)
                    {
                        MaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>();
                    }

                    MaleWorldModelTextureHashes.ReadBinary(reader);
                    break;

                case "MO2S":
                    if (MaleWorldModelAlternateTextures == null)
                    {
                        MaleWorldModelAlternateTextures = new AlternateTextures();
                    }

                    MaleWorldModelAlternateTextures.ReadBinary(reader);
                    break;

                case "ICON":
                    if (MaleInventoryIcon == null)
                    {
                        MaleInventoryIcon = new SimpleSubrecord <String>();
                    }

                    MaleInventoryIcon.ReadBinary(reader);
                    break;

                case "MICO":
                    if (MaleMessageIcon == null)
                    {
                        MaleMessageIcon = new SimpleSubrecord <String>();
                    }

                    MaleMessageIcon.ReadBinary(reader);
                    break;

                case "MOD3":
                    if (FemaleBipedModelFileName == null)
                    {
                        FemaleBipedModelFileName = new SimpleSubrecord <String>();
                    }

                    FemaleBipedModelFileName.ReadBinary(reader);
                    break;

                case "MO3T":
                    if (FemaleBipedModelTextureHashes == null)
                    {
                        FemaleBipedModelTextureHashes = new SimpleSubrecord <Byte[]>();
                    }

                    FemaleBipedModelTextureHashes.ReadBinary(reader);
                    break;

                case "MO3S":
                    if (FemaleBipedModelAlternateTextures == null)
                    {
                        FemaleBipedModelAlternateTextures = new AlternateTextures();
                    }

                    FemaleBipedModelAlternateTextures.ReadBinary(reader);
                    break;

                case "MOSD":
                    if (FemaleBipedModelFaceGenModelFlags == null)
                    {
                        FemaleBipedModelFaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>();
                    }

                    FemaleBipedModelFaceGenModelFlags.ReadBinary(reader);
                    break;

                case "MOD4":
                    if (FemaleWorldModelFileName == null)
                    {
                        FemaleWorldModelFileName = new SimpleSubrecord <String>();
                    }

                    FemaleWorldModelFileName.ReadBinary(reader);
                    break;

                case "MO4T":
                    if (FemaleWorldModelTextureHashes == null)
                    {
                        FemaleWorldModelTextureHashes = new SimpleSubrecord <Byte[]>();
                    }

                    FemaleWorldModelTextureHashes.ReadBinary(reader);
                    break;

                case "MO4S":
                    if (FemaleWorldModelAlternateTextures == null)
                    {
                        FemaleWorldModelAlternateTextures = new AlternateTextures();
                    }

                    FemaleWorldModelAlternateTextures.ReadBinary(reader);
                    break;

                case "ICO2":
                    if (FemaleInventoryIcon == null)
                    {
                        FemaleInventoryIcon = new SimpleSubrecord <String>();
                    }

                    FemaleInventoryIcon.ReadBinary(reader);
                    break;

                case "MIC2":
                    if (FemaleMessageIcon == null)
                    {
                        FemaleMessageIcon = new SimpleSubrecord <String>();
                    }

                    FemaleMessageIcon.ReadBinary(reader);
                    break;

                case "ETYP":
                    if (EquipmentType == null)
                    {
                        EquipmentType = new SimpleSubrecord <EquipmentType>();
                    }

                    EquipmentType.ReadBinary(reader);
                    break;

                case "DATA":
                    if (Data == null)
                    {
                        Data = new ArmorData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "DNAM":
                    if (ExtraData == null)
                    {
                        ExtraData = new ArmorAddonData();
                    }

                    ExtraData.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }