partial void ReadDamage(ESPReader reader) { var tag = reader.ReadTag(); var size = reader.ReadUInt16(); reader.BaseStream.Seek(-6, SeekOrigin.Current); if (size == 2) { Damage = new SimpleSubrecord <ushort>(); Damage.ReadBinary(reader); } else { Data = new WaterData(); Data.ReadBinary(reader); Data.Tag = "DNAM"; reader.BaseStream.Seek(-2, SeekOrigin.Current); Damage = new SimpleSubrecord <ushort>(); Damage.Tag = "DATA"; Damage.Value = reader.ReadUInt16(); } }
partial void ReadLocalReference(ESPReader reader) { if (References == null) { References = new List <Subrecord>(); } var localRef = new SimpleSubrecord <uint>(); localRef.ReadBinary(reader); References.Add(localRef); }
partial void ReadOffsetData(ESPReader reader) { OffsetData = new SimpleSubrecord <byte[]>(); if (OffsetDataSize == null) { OffsetData.ReadBinary(reader); } else { OffsetData.Tag = reader.ReadTag(); reader.ReadUInt16(); OffsetData.Value = reader.ReadBytes((int)OffsetDataSize.Value); } }
partial void ReadValue2(ESPReader reader) { switch (Data.Type) { case ChallengeType.KillFromAFormList: Value2 = new RecordReference(); Value2.ReadBinary(reader); break; case ChallengeType.KillASpecificFormID: Value2 = new RecordReference(); Value2.ReadBinary(reader); break; case ChallengeType.KillAnyInACategory: Value2 = new RecordReference(); Value2.ReadBinary(reader); break; case ChallengeType.HitAnEnemy: Value2 = new RecordReference(); Value2.ReadBinary(reader); break; case ChallengeType.DiscoverAMapMarker: Value2 = new RecordReference(); Value2.ReadBinary(reader); break; case ChallengeType.UseAnItem: Value2 = new SimpleSubrecord <byte[]>(); Value2.ReadBinary(reader); break; case ChallengeType.AcquireAnItem: Value2 = new SimpleSubrecord <byte[]>(); Value2.ReadBinary(reader); break; case ChallengeType.UseASkill: Value2 = new SimpleSubrecord <byte[]>(); Value2.ReadBinary(reader); break; case ChallengeType.DoDamage: Value2 = new RecordReference(); Value2.ReadBinary(reader); break; case ChallengeType.UseAnItemFromAList: Value2 = new SimpleSubrecord <byte[]>(); Value2.ReadBinary(reader); break; case ChallengeType.AcquireAnItemFromAList: Value2 = new SimpleSubrecord <byte[]>(); Value2.ReadBinary(reader); break; case ChallengeType.MiscellaneousStat: Value2 = new SimpleSubrecord <byte[]>(); Value2.ReadBinary(reader); break; case ChallengeType.CraftUsingAnItem: Value2 = new SimpleSubrecord <byte[]>(); Value2.ReadBinary(reader); break; case ChallengeType.ScriptedChallenge: Value2 = new SimpleSubrecord <byte[]>(); Value2.ReadBinary(reader); break; } }
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(); } } }
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 (Data == null) { Data = new CasinoData(); } Data.ReadBinary(reader); break; case "MODL": if (Models == null) { Models = new List <SimpleSubrecord <String> >(); } SimpleSubrecord <String> tempMODL = new SimpleSubrecord <String>(); tempMODL.ReadBinary(reader); Models.Add(tempMODL); break; case "MOD2": if (ModelSlotMachine == null) { ModelSlotMachine = new SimpleSubrecord <String>(); } ModelSlotMachine.ReadBinary(reader); break; case "MOD3": if (ModelBlackjackTable == null) { ModelBlackjackTable = new SimpleSubrecord <String>(); } ModelBlackjackTable.ReadBinary(reader); break; case "MOD4": if (ModelRouletteTable == null) { ModelRouletteTable = new SimpleSubrecord <String>(); } ModelRouletteTable.ReadBinary(reader); break; case "ICON": if (SlotReelTextures == null) { SlotReelTextures = new List <SimpleSubrecord <String> >(); } SimpleSubrecord <String> tempICON = new SimpleSubrecord <String>(); tempICON.ReadBinary(reader); SlotReelTextures.Add(tempICON); break; case "ICO2": if (BlackjackTextures == null) { BlackjackTextures = new List <SimpleSubrecord <String> >(); } SimpleSubrecord <String> tempICO2 = new SimpleSubrecord <String>(); tempICO2.ReadBinary(reader); BlackjackTextures.Add(tempICO2); break; default: throw new Exception(); } } }