Esempio n. 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 "NAME":
                    if (Base == null)
                    {
                        Base = new RecordReference();
                    }

                    Base.ReadBinary(reader);
                    break;

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

                    EncounterZone.ReadBinary(reader);
                    break;

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

                    RagdollData.ReadBinary(reader);
                    break;

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

                    RagdollBipedData.ReadBinary(reader);
                    break;

                case "XPRD":
                    if (Patrol == null)
                    {
                        Patrol = new ReferencePatrolData();
                    }

                    Patrol.ReadBinary(reader);
                    break;

                case "XLCM":
                    if (LevelModifier == null)
                    {
                        LevelModifier = new SimpleSubrecord <Int32>();
                    }

                    LevelModifier.ReadBinary(reader);
                    break;

                case "XOWN":
                    if (Owner == null)
                    {
                        Owner = new RecordReference();
                    }

                    Owner.ReadBinary(reader);
                    break;

                case "XRNK":
                    if (FactionRank == null)
                    {
                        FactionRank = new SimpleSubrecord <Int32>();
                    }

                    FactionRank.ReadBinary(reader);
                    break;

                case "XMRC":
                    if (MerchantContainer == null)
                    {
                        MerchantContainer = new RecordReference();
                    }

                    MerchantContainer.ReadBinary(reader);
                    break;

                case "XCNT":
                    if (Count == null)
                    {
                        Count = new SimpleSubrecord <Int32>();
                    }

                    Count.ReadBinary(reader);
                    break;

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

                    Radius.ReadBinary(reader);
                    break;

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

                    Health.ReadBinary(reader);
                    break;

                case "XDCR":
                    if (Decals == null)
                    {
                        Decals = new List <SimpleSubrecord <Byte[]> >();
                    }

                    SimpleSubrecord <Byte[]> tempXDCR = new SimpleSubrecord <Byte[]>();
                    tempXDCR.ReadBinary(reader);
                    Decals.Add(tempXDCR);
                    break;

                case "XLKR":
                    if (LinkedReference == null)
                    {
                        LinkedReference = new RecordReference();
                    }

                    LinkedReference.ReadBinary(reader);
                    break;

                case "XCLP":
                    if (LinkedReferenceColor == null)
                    {
                        LinkedReferenceColor = new LinkedReferenceColor();
                    }

                    LinkedReferenceColor.ReadBinary(reader);
                    break;

                case "XAPD":
                    if (ParentActivateOnly == null)
                    {
                        ParentActivateOnly = new SimpleSubrecord <NoYesByte>();
                    }

                    ParentActivateOnly.ReadBinary(reader);
                    break;

                case "XAPR":
                    if (ActivateParents == null)
                    {
                        ActivateParents = new List <ActivateParent>();
                    }

                    ActivateParent tempXAPR = new ActivateParent();
                    tempXAPR.ReadBinary(reader);
                    ActivateParents.Add(tempXAPR);
                    break;

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

                    ActivationPrompt.ReadBinary(reader);
                    break;

                case "XESP":
                    if (EnableParent == null)
                    {
                        EnableParent = new EnableParent();
                    }

                    EnableParent.ReadBinary(reader);
                    break;

                case "XEMI":
                    if (Emittance == null)
                    {
                        Emittance = new RecordReference();
                    }

                    Emittance.ReadBinary(reader);
                    break;

                case "XMBR":
                    if (MultiBound == null)
                    {
                        MultiBound = new RecordReference();
                    }

                    MultiBound.ReadBinary(reader);
                    break;

                case "XIBS":
                    if (IgnoredBySandbox == null)
                    {
                        IgnoredBySandbox = new SubMarker();
                    }

                    IgnoredBySandbox.ReadBinary(reader);
                    break;

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

                    Scale.ReadBinary(reader);
                    break;

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

                    PositionRotation.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Esempio n. 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 "XNAM":
                    if (Relationships == null)
                    {
                        Relationships = new List <Relationship>();
                    }

                    Relationship tempXNAM = new Relationship();
                    tempXNAM.ReadBinary(reader);
                    Relationships.Add(tempXNAM);
                    break;

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

                    Data.ReadBinary(reader);
                    break;

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

                    Unused.ReadBinary(reader);
                    break;

                case "RNAM":
                    if (Ranks == null)
                    {
                        Ranks = new List <FactionRank>();
                    }

                    FactionRank tempRNAM = new FactionRank();
                    tempRNAM.ReadBinary(reader);
                    Ranks.Add(tempRNAM);
                    break;

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

                    Reputation.ReadBinary(reader);
                    break;

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

                    Name.ReadBinary(reader);
                    break;

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

                    CellFlags.ReadBinary(reader);
                    break;

                case "XCLC":
                    if (Grid == null)
                    {
                        Grid = new CellGrid();
                    }

                    Grid.ReadBinary(reader);
                    break;

                case "XCLL":
                    if (Lighting == null)
                    {
                        Lighting = new CellLighting();
                    }

                    Lighting.ReadBinary(reader);
                    break;

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

                    FootstepMaterial.ReadBinary(reader);
                    break;

                case "LTMP":
                    if (LightTemplate == null)
                    {
                        LightTemplate = new RecordReference();
                    }

                    LightTemplate.ReadBinary(reader);
                    break;

                case "LNAM":
                    if (LightTemplateInherit == null)
                    {
                        LightTemplateInherit = new SimpleSubrecord <LightTemplateInheritFlags>();
                    }

                    LightTemplateInherit.ReadBinary(reader);
                    break;

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

                    WaterHeight.ReadBinary(reader);
                    break;

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

                    WaterNoiseTexture.ReadBinary(reader);
                    break;

                case "XCLR":
                    if (Regions == null)
                    {
                        Regions = new SortedFormArray();
                    }

                    Regions.ReadBinary(reader);
                    break;

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

                    ImageSpace.ReadBinary(reader);
                    break;

                case "XCET":
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <Byte>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

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

                    EncounterZone.ReadBinary(reader);
                    break;

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

                    Climate.ReadBinary(reader);
                    break;

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

                    Water.ReadBinary(reader);
                    break;

                case "XOWN":
                    if (Owner == null)
                    {
                        Owner = new RecordReference();
                    }

                    Owner.ReadBinary(reader);
                    break;

                case "XRNK":
                    if (FactionRank == null)
                    {
                        FactionRank = new SimpleSubrecord <Int32>();
                    }

                    FactionRank.ReadBinary(reader);
                    break;

                case "XCAS":
                    if (AcousticSpace == null)
                    {
                        AcousticSpace = new RecordReference();
                    }

                    AcousticSpace.ReadBinary(reader);
                    break;

                case "XCMT":
                    if (Unused == null)
                    {
                        Unused = new SimpleSubrecord <Byte>();
                    }

                    Unused.ReadBinary(reader);
                    break;

                case "XCMO":
                    if (MusicType == null)
                    {
                        MusicType = new RecordReference();
                    }

                    MusicType.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }