コード例 #1
0
ファイル: Note.cs プロジェクト: TaleOfTwoWastelands/ESPSharp
        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 "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 (Type == null)
                    {
                        Type = new SimpleSubrecord <NoteType>();
                    }

                    Type.ReadBinary(reader);
                    break;

                case "ONAM":
                    if (Quests == null)
                    {
                        Quests = new List <RecordReference>();
                    }

                    RecordReference tempONAM = new RecordReference();
                    tempONAM.ReadBinary(reader);
                    Quests.Add(tempONAM);
                    break;

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

                    Image.ReadBinary(reader);
                    break;

                case "TNAM":
                    ReadEntryData(reader);
                    break;

                case "SNAM":
                    if (Audio == null)
                    {
                        Audio = new RecordReference();
                    }

                    Audio.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 "FULL":
                    if (Name == null)
                    {
                        Name = new SimpleSubrecord <String>();
                    }

                    Name.ReadBinary(reader);
                    break;

                case "XEZN":
                    if (EncounterZone == null)
                    {
                        EncounterZone = new RecordReference();
                    }

                    EncounterZone.ReadBinary(reader);
                    break;

                case "WNAM":
                    if (ParentWorldspace == null)
                    {
                        ParentWorldspace = new RecordReference();
                    }

                    ParentWorldspace.ReadBinary(reader);
                    break;

                case "PNAM":
                    if (ParentWorldspaceFlags == null)
                    {
                        ParentWorldspaceFlags = new SimpleSubrecord <ParentWorldspaceFlags>();
                    }

                    ParentWorldspaceFlags.ReadBinary(reader);
                    break;

                case "CNAM":
                    if (Climate == null)
                    {
                        Climate = new RecordReference();
                    }

                    Climate.ReadBinary(reader);
                    break;

                case "NAM2":
                    if (Water == null)
                    {
                        Water = new RecordReference();
                    }

                    Water.ReadBinary(reader);
                    break;

                case "NAM3":
                    if (LODWaterType == null)
                    {
                        LODWaterType = new RecordReference();
                    }

                    LODWaterType.ReadBinary(reader);
                    break;

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

                    LODWaterHeight.ReadBinary(reader);
                    break;

                case "DNAM":
                    if (LandData == null)
                    {
                        LandData = new WorldLandData();
                    }

                    LandData.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 "MNAM":
                    if (MapData == null)
                    {
                        MapData = new MapData();
                    }

                    MapData.ReadBinary(reader);
                    break;

                case "ONAM":
                    if (WorldMapOffsetData == null)
                    {
                        WorldMapOffsetData = new WorldMapOffsetData();
                    }

                    WorldMapOffsetData.ReadBinary(reader);
                    break;

                case "INAM":
                    if (ImageSpace == null)
                    {
                        ImageSpace = new RecordReference();
                    }

                    ImageSpace.ReadBinary(reader);
                    break;

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

                    WorldspaceFlags.ReadBinary(reader);
                    break;

                case "NAM0":
                    if (MinObjectBounds == null)
                    {
                        MinObjectBounds = new SimpleSubrecord <XYFloat>();
                    }

                    MinObjectBounds.ReadBinary(reader);
                    break;

                case "NAM9":
                    if (MaxObjectBounds == null)
                    {
                        MaxObjectBounds = new SimpleSubrecord <XYFloat>();
                    }

                    MaxObjectBounds.ReadBinary(reader);
                    break;

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

                    Music.ReadBinary(reader);
                    break;

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

                    CanopyShadow.ReadBinary(reader);
                    break;

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

                    WaterNoiseTexture.ReadBinary(reader);
                    break;

                case "IMPS":
                    if (SwappedImpacts == null)
                    {
                        SwappedImpacts = new List <SwappedImpact>();
                    }

                    SwappedImpact tempIMPS = new SwappedImpact();
                    tempIMPS.ReadBinary(reader);
                    SwappedImpacts.Add(tempIMPS);
                    break;

                case "IMPF":
                    if (FootstepMaterial == null)
                    {
                        FootstepMaterial = new FootstepMaterial();
                    }

                    FootstepMaterial.ReadBinary(reader);
                    break;

                case "XXXX":
                    if (OffsetDataSize == null)
                    {
                        OffsetDataSize = new SimpleSubrecord <UInt32>();
                    }

                    OffsetDataSize.ReadBinary(reader);
                    break;

                case "OFST":
                    ReadOffsetData(reader);
                    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 "SCRI":
                    if (Script == null)
                    {
                        Script = new RecordReference();
                    }

                    Script.ReadBinary(reader);
                    break;

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

                    Name.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 "DATA":
                    if (Data == null)
                    {
                        Data = new QuestData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "CTDA":
                    if (Conditions == null)
                    {
                        Conditions = new List <Condition>();
                    }

                    Condition tempCTDA = new Condition();
                    tempCTDA.ReadBinary(reader);
                    Conditions.Add(tempCTDA);
                    break;

                case "INDX":
                    if (Stages == null)
                    {
                        Stages = new List <QuestStage>();
                    }

                    QuestStage tempINDX = new QuestStage();
                    tempINDX.ReadBinary(reader);
                    Stages.Add(tempINDX);
                    break;

                case "QOBJ":
                    if (Objectives == null)
                    {
                        Objectives = new List <QuestObjective>();
                    }

                    QuestObjective tempQOBJ = new QuestObjective();
                    tempQOBJ.ReadBinary(reader);
                    Objectives.Add(tempQOBJ);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
コード例 #4
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 "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 "DESC":
                    if (Description == null)
                    {
                        Description = new SimpleSubrecord <String>();
                    }

                    Description.ReadBinary(reader);
                    break;

                case "LNAM":
                    if (Locations == null)
                    {
                        Locations = new List <LoadScreenLocation>();
                    }

                    LoadScreenLocation tempLNAM = new LoadScreenLocation();
                    tempLNAM.ReadBinary(reader);
                    Locations.Add(tempLNAM);
                    break;

                case "WMI1":
                    if (LoadScreenType == null)
                    {
                        LoadScreenType = new RecordReference();
                    }

                    LoadScreenType.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }