public override void ExploreItemPacket(StreamWriter outputStream, ByteStream buffer, PacketDirection direction) { UInt32 StackSize = buffer.ReadUInt32(); buffer.SkipBytes(4); UInt32 Slot = buffer.ReadUInt32(); UInt32 MerchantSlot = buffer.ReadUInt32(); UInt32 Price = buffer.ReadUInt32(); Int32 Quantity = buffer.ReadInt32(); buffer.SetPosition(68); string Name = buffer.ReadString(true); outputStream.WriteLine("Item: {0} at Slot: {1}", Name, Slot); }
public override Item DecodeItemPacket(byte[] packetBuffer) { ByteStream Buffer = new ByteStream(packetBuffer); Item NewItem = new Item(); NewItem.StackSize = Buffer.ReadUInt32(); Buffer.SkipBytes(4); NewItem.Slot = Buffer.ReadUInt32(); NewItem.MerchantSlot = Buffer.ReadUInt32(); NewItem.Price = Buffer.ReadUInt32(); NewItem.Quantity = Buffer.ReadInt32(); Buffer.SetPosition(68); NewItem.Name = Buffer.ReadString(true); NewItem.Lore = Buffer.ReadString(true); NewItem.IDFile = Buffer.ReadString(true); NewItem.ID = Buffer.ReadUInt32(); return NewItem; }
public override Item DecodeItemPacket(byte[] packetBuffer) { ByteStream Buffer = new ByteStream(packetBuffer); Item NewItem = new Item(); Buffer.SetPosition(30); NewItem.MerchantSlot = Buffer.ReadByte(); // 13 NewItem.Price = Buffer.ReadUInt32(); // 14 Buffer.SkipBytes(5); NewItem.Quantity = Buffer.ReadInt32(); // 23 Buffer.SetPosition(97); NewItem.Name = Buffer.ReadString(true); NewItem.Lore = Buffer.ReadString(true); NewItem.IDFile = Buffer.ReadString(true); Buffer.SkipBytes(1); NewItem.ID = Buffer.ReadUInt32(); return NewItem; }
public override void ExploreSubItem(StreamWriter outputStream, ref ByteStream buffer) { buffer.SkipBytes(8); byte Area = buffer.ReadByte(); UInt16 MainSlot = buffer.ReadUInt16(); Int16 SubSlot = buffer.ReadInt16(); buffer.SkipBytes(54); string Name = buffer.ReadString(true); if (SubSlot >= 0) outputStream.Write(" "); string AreaName = "Unknown"; switch (Area) { case 0: AreaName = "Personal Inventory"; break; case 1: AreaName = "Bank"; break; case 2: AreaName = "Shared Bank"; break; case 6: AreaName = "Personal Tribute"; break; case 7: AreaName = "Guild Tribute"; break; case 8: AreaName = "Merchant"; break; } outputStream.WriteLine("Area: {0} {1} Main Slot {2,2} Sub Slot {3,3} Name {4}", Area, AreaName.PadRight(20), MainSlot, SubSlot, Name); buffer.ReadString(true); // Lore buffer.ReadString(true); // IDFile //Buffer.SkipBytes(236); // Item Body Struct UInt32 ID = buffer.ReadUInt32(); byte Weight = buffer.ReadByte(); byte NoRent = buffer.ReadByte(); byte NoDrop = buffer.ReadByte(); byte Attune = buffer.ReadByte(); byte Size = buffer.ReadByte(); outputStream.WriteLine(" ID: {0} Weight: {1} NoRent: {2} NoDrop: {3} Attune {4} Size {5}", ID, Weight, NoRent, NoDrop, Attune, Size); UInt32 Slots = buffer.ReadUInt32(); UInt32 Price = buffer.ReadUInt32(); UInt32 Icon = buffer.ReadUInt32(); buffer.SkipBytes(2); UInt32 BenefitFlags = buffer.ReadUInt32(); byte Tradeskills = buffer.ReadByte(); outputStream.WriteLine(" Slots: {0} Price: {1} Icon: {2} BenefitFlags {3} Tradeskills: {4}", Slots, Price, Icon, BenefitFlags, Tradeskills); byte CR = buffer.ReadByte(); byte DR = buffer.ReadByte(); byte PR = buffer.ReadByte(); byte MR = buffer.ReadByte(); byte FR = buffer.ReadByte(); byte SVC = buffer.ReadByte(); outputStream.WriteLine(" CR: {0} DR: {1} PR: {2} MR: {3} FR: {4} SVC: {5}", CR, DR, PR, MR, FR, SVC); byte AStr = buffer.ReadByte(); byte ASta = buffer.ReadByte(); byte AAgi = buffer.ReadByte(); byte ADex = buffer.ReadByte(); byte ACha = buffer.ReadByte(); byte AInt = buffer.ReadByte(); byte AWis = buffer.ReadByte(); outputStream.WriteLine(" AStr: {0} ASta: {1} AAgi: {2} ADex: {3} ACha: {4} AInt: {5} AWis: {6}", AStr, ASta, AAgi, ADex, ACha, AInt, AWis); Int32 HP = buffer.ReadInt32(); Int32 Mana = buffer.ReadInt32(); UInt32 Endurance = buffer.ReadUInt32(); Int32 AC = buffer.ReadInt32(); Int32 Regen = buffer.ReadInt32(); Int32 ManaRegen = buffer.ReadInt32(); Int32 EndRegen = buffer.ReadInt32(); UInt32 Classes = buffer.ReadUInt32(); UInt32 Races = buffer.ReadUInt32(); UInt32 Deity = buffer.ReadUInt32(); Int32 SkillModValue = buffer.ReadInt32(); buffer.SkipBytes(4); UInt32 SkillModType = buffer.ReadUInt32(); UInt32 BaneDamageRace = buffer.ReadUInt32(); UInt32 BaneDamageBody = buffer.ReadUInt32(); UInt32 BaneDamageRaceAmount = buffer.ReadUInt32(); Int32 BaneDamageAmount = buffer.ReadInt32(); byte Magic = buffer.ReadByte(); Int32 CastTime = buffer.ReadInt32(); UInt32 ReqLevel = buffer.ReadUInt32(); UInt32 RecLevel = buffer.ReadUInt32(); UInt32 ReqSkill = buffer.ReadUInt32(); UInt32 BardType = buffer.ReadUInt32(); Int32 BardValue = buffer.ReadInt32(); byte Light = buffer.ReadByte(); byte Delay = buffer.ReadByte(); byte ElemDamageAmount = buffer.ReadByte(); byte ElemDamageType = buffer.ReadByte(); byte Range = buffer.ReadByte(); UInt32 Damage = buffer.ReadUInt32(); UInt32 Color = buffer.ReadUInt32(); byte ItemType = buffer.ReadByte(); UInt32 Material = buffer.ReadUInt32(); buffer.SkipBytes(4); UInt32 EliteMaterial = buffer.ReadUInt32(); float SellRate = buffer.ReadSingle(); Int32 CombatEffects = buffer.ReadInt32(); Int32 Shielding = buffer.ReadInt32(); Int32 StunResist = buffer.ReadInt32(); Int32 StrikeThrough = buffer.ReadInt32(); Int32 ExtraDamageSkill = buffer.ReadInt32(); Int32 ExtraDamageAmount = buffer.ReadInt32(); Int32 SpellShield = buffer.ReadInt32(); Int32 Avoidance = buffer.ReadInt32(); Int32 Accuracy = buffer.ReadInt32(); UInt32 CharmFileID = buffer.ReadUInt32(); UInt32 FactionMod1 = buffer.ReadUInt32(); Int32 FactionAmount1 = buffer.ReadInt32(); UInt32 FactionMod2 = buffer.ReadUInt32(); Int32 FactionAmount2 = buffer.ReadInt32(); UInt32 FactionMod3 = buffer.ReadUInt32(); Int32 FactionAmount3 = buffer.ReadInt32(); UInt32 FactionMod4 = buffer.ReadUInt32(); Int32 FactionAmount4 = buffer.ReadInt32(); buffer.ReadString(true); // Charm File buffer.SkipBytes(64); // Item Secondary Body Struct buffer.ReadString(true); // Filename buffer.SkipBytes(76); // Item Tertiary Body Struct buffer.SkipBytes(30); // Click Effect Struct buffer.ReadString(true); // Clickname buffer.SkipBytes(4); // clickunk7 buffer.SkipBytes(30); // Proc Effect Struct buffer.ReadString(true); // Proc Name buffer.SkipBytes(4); // unknown5 buffer.SkipBytes(30); // Worn Effect Struct buffer.ReadString(true); // Worn Name buffer.SkipBytes(4); // unknown6 buffer.SkipBytes(30); // Worn Effect Struct buffer.ReadString(true); // Worn Name buffer.SkipBytes(4); // unknown6 buffer.SkipBytes(30); // Worn Effect Struct buffer.ReadString(true); // Worn Name buffer.SkipBytes(4); // unknown6 buffer.SkipBytes(30); // Worn Effect Struct buffer.ReadString(true); // Worn Name buffer.SkipBytes(4); // unknown6 buffer.SkipBytes(103); // Item Quaternary Body Struct - 4 (we want to read the SubLength field at the end) UInt32 SubLengths = buffer.ReadUInt32(); for (int i = 0; i < SubLengths; ++i) { buffer.SkipBytes(4); ExploreSubItem(outputStream, ref buffer); } }
public override List<Door> GetDoors() { List<Door> DoorList = new List<Door>(); List<byte[]> SpawnDoorPacket = GetPacketsOfType("OP_SpawnDoor", PacketDirection.ServerToClient); if ((SpawnDoorPacket.Count == 0) || (SpawnDoorPacket[0].Length == 0)) return DoorList; int DoorCount = SpawnDoorPacket[0].Length / 92; ByteStream Buffer = new ByteStream(SpawnDoorPacket[0]); for (int d = 0; d < DoorCount; ++d) { string DoorName = Buffer.ReadFixedLengthString(32, false); float YPos = Buffer.ReadSingle(); float XPos = Buffer.ReadSingle(); float ZPos = Buffer.ReadSingle(); float Heading = Buffer.ReadSingle(); UInt32 Incline = Buffer.ReadUInt32(); Int32 Size = Buffer.ReadInt32(); Buffer.SkipBytes(4); // Skip Unknown Byte DoorID = Buffer.ReadByte(); Byte OpenType = Buffer.ReadByte(); Byte StateAtSpawn = Buffer.ReadByte(); Byte InvertState = Buffer.ReadByte(); Int32 DoorParam = Buffer.ReadInt32(); // Skip past the trailing unknowns in the door struct, moving to the next door in the packet. Buffer.SkipBytes(24); string DestZone = "NONE"; Door NewDoor = new Door(DoorName, YPos, XPos, ZPos, Heading, Incline, Size, DoorID, OpenType, StateAtSpawn, InvertState, DoorParam, DestZone, 0, 0, 0, 0); DoorList.Add(NewDoor); } return DoorList; }
public override void ExploreHPUpdate(StreamWriter outputStream, ByteStream buffer, PacketDirection direction) { UInt32 CurrentHP = buffer.ReadUInt32(); Int32 MaxHP = buffer.ReadInt32(); UInt16 SpawnID = buffer.ReadUInt16(); string SpawnName = FindExplorerSpawn(SpawnID); outputStream.WriteLine("Spawn {0} {1} Current HP: {2} Max HP: {3}", SpawnID, SpawnName, CurrentHP, MaxHP); outputStream.WriteLine(""); }
public override void ExploreSpawnDoor(StreamWriter outputStream, ByteStream buffer, PacketDirection direction) { uint DoorCount = buffer.Length() / 96; outputStream.WriteLine("Door Count: {0}", DoorCount); for (int d = 0; d < DoorCount; ++d) { string DoorName = buffer.ReadFixedLengthString(32, false); float YPos = buffer.ReadSingle(); float XPos = buffer.ReadSingle(); float ZPos = buffer.ReadSingle(); float Heading = buffer.ReadSingle(); UInt32 Incline = buffer.ReadUInt32(); Int32 Size = buffer.ReadInt32(); buffer.SkipBytes(4); // Skip Unknown Byte DoorID = buffer.ReadByte(); Byte OpenType = buffer.ReadByte(); Byte StateAtSpawn = buffer.ReadByte(); Byte InvertState = buffer.ReadByte(); Int32 DoorParam = buffer.ReadInt32(); outputStream.WriteLine(" Name: {0} ID: {1} OT: {2} SAS: {3} IS: {4} DP: {5}", DoorName, DoorID, OpenType, StateAtSpawn, InvertState, DoorParam); // Skip past the trailing unknowns in the door struct, moving to the next door in the packet. buffer.SkipBytes(28); } }
public override bool DumpAAs(string fileName) { List<byte[]> AAPackets = GetPacketsOfType("OP_SendAATable", PacketDirection.ServerToClient); if (AAPackets.Count < 1) return false; StreamWriter OutputFile; try { OutputFile = new StreamWriter(fileName); } catch { return false; } OutputFile.WriteLine("-- There are " + AAPackets.Count + " OP_SendAATable packets."); OutputFile.WriteLine(""); foreach (byte[] Packet in AAPackets) { ByteStream Buffer = new ByteStream(Packet); UInt32 AAID = Buffer.ReadUInt32(); byte Unknown004 = Buffer.ReadByte(); UInt32 HotKeySID = Buffer.ReadUInt32(); UInt32 HotKeySID2 = Buffer.ReadUInt32(); UInt32 TitleSID = Buffer.ReadUInt32(); UInt32 DescSID = Buffer.ReadUInt32(); UInt32 ClassType = Buffer.ReadUInt32(); UInt32 Cost = Buffer.ReadUInt32(); UInt32 Seq = Buffer.ReadUInt32(); UInt32 CurrentLevel = Buffer.ReadUInt32(); UInt32 unknown037 = Buffer.ReadUInt32(); UInt32 PreReqSkill = Buffer.ReadUInt32(); UInt32 unknown045 = Buffer.ReadUInt32(); UInt32 PreReqMinPoint = Buffer.ReadUInt32(); UInt32 Type = Buffer.ReadUInt32(); UInt32 SpellID = Buffer.ReadUInt32(); UInt32 Unknown057 = Buffer.ReadUInt32(); UInt32 SpellType = Buffer.ReadUInt32(); UInt32 SpellRefresh = Buffer.ReadUInt32(); UInt16 Classes = Buffer.ReadUInt16(); UInt16 Berserker = Buffer.ReadUInt16(); UInt32 MaxLevel = Buffer.ReadUInt32(); UInt32 LastID = Buffer.ReadUInt32(); UInt32 NextID = Buffer.ReadUInt32(); UInt32 Cost2 = Buffer.ReadUInt32(); Buffer.SkipBytes(7); UInt32 AAExpansion = Buffer.ReadUInt32(); UInt32 SpecialCategory = Buffer.ReadUInt32(); Buffer.SkipBytes(8); UInt32 TotalAbilities = Buffer.ReadUInt32(); OutputFile.WriteLine(String.Format("AAID: {0}", AAID)); OutputFile.WriteLine(" Unknown004:\t" + Unknown004); OutputFile.WriteLine(" HotkeySID:\t" + HotKeySID); OutputFile.WriteLine(" HotkeySID2:\t" + HotKeySID2); OutputFile.WriteLine(" TitleSID:\t" + TitleSID); OutputFile.WriteLine(" DescSID:\t" + DescSID); OutputFile.WriteLine(" ClassType:\t" + ClassType); OutputFile.WriteLine(" Cost:\t\t" + Cost); OutputFile.WriteLine(" Seq:\t\t" + Seq); OutputFile.WriteLine(" CurrentLevel:\t" + CurrentLevel); OutputFile.WriteLine(" Unknown037:\t" + unknown037); OutputFile.WriteLine(" Unknown045:\t" + unknown045); OutputFile.Write(" PreReqSkill (SEQs):\t"); OutputFile.Write("{0} ", PreReqSkill); OutputFile.WriteLine(""); OutputFile.Write(" PreReqSkills MinPoints:\t"); OutputFile.Write("{0} ", PreReqMinPoint); OutputFile.WriteLine(""); OutputFile.WriteLine(" Type:\t\t" + Type); OutputFile.WriteLine(" SpellID:\t" + SpellID); OutputFile.WriteLine(" Unknown057:\t" + Unknown057); OutputFile.WriteLine(" SpellType:\t" + SpellType); OutputFile.WriteLine(" SpellRefresh:\t" + SpellRefresh); OutputFile.WriteLine(" Classes:\t" + Classes); OutputFile.WriteLine(" Berserker:\t" + Berserker); OutputFile.WriteLine(" MaxLevel:\t" + MaxLevel); OutputFile.WriteLine(" LastID:\t" + LastID); OutputFile.WriteLine(" NextID:\t" + NextID); OutputFile.WriteLine(" Cost2:\t\t" + Cost2); OutputFile.WriteLine(" AAExpansion:\t" + AAExpansion); OutputFile.WriteLine(" SpecialCat:\t" + SpecialCategory); OutputFile.WriteLine(""); OutputFile.WriteLine(" TotalAbilities:\t" + TotalAbilities); OutputFile.WriteLine(""); for (int i = 0; i < TotalAbilities; ++i) { UInt32 Ability = Buffer.ReadUInt32(); Int32 Base1 = Buffer.ReadInt32(); Int32 Base2 = Buffer.ReadInt32(); UInt32 Slot = Buffer.ReadUInt32(); OutputFile.WriteLine(String.Format(" Ability:\t{0}\tBase1:\t{1}\tBase2:\t{2}\tSlot:\t{3}", Ability, Base1, Base2, Slot)); } OutputFile.WriteLine(""); OutputFile.Flush(); } OutputFile.Close(); return true; }
/* * from seq source int32_t ZoneMgr::fillProfileStruct(charProfileStruct *player, const uint8_t *data, size_t len, bool checkLen) * * */ public override void ExplorePlayerProfile(StreamWriter outputStream, ByteStream buffer, PacketDirection direction) { outputStream.WriteLine("MooDump"); outputStream.WriteLine("{0, -5}: Checksum = {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); // Unknown buffer.SkipBytes(12); outputStream.WriteLine(""); outputStream.WriteLine("{0, -5}: Gender = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Race = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Class = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Level = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Level1 = {1}", buffer.GetPosition(), buffer.ReadByte()); // Bind points int BindCount = buffer.ReadInt32(); outputStream.WriteLine("{0, -5}: BindCount = {1}", buffer.GetPosition() - 4, BindCount); //not sure if this is right tbh for (int i = 0; i < BindCount; ++i) { outputStream.WriteLine("{0, -5}: Bind: {1} Zone: {2} XYZ: {3},{4},{5} Heading: {6}", buffer.GetPosition(), i, buffer.ReadUInt32(), buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle()); } outputStream.WriteLine(""); outputStream.WriteLine("{0, -5}: Deity = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Intoxication = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine(""); // Spell slot refresh int spellRefreshCount = buffer.ReadInt32(); outputStream.WriteLine("{0, -5}: SpellRefreshCount = {1}", buffer.GetPosition() - 4, spellRefreshCount); for (int i = 0; i < spellRefreshCount; i++) { outputStream.WriteLine("{0, -5}: SpellRefreshCount{1} = {2}", buffer.GetPosition(), i, buffer.ReadUInt32()); } // Equipment uint EquipmentCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: EquipmentCount = {1}", buffer.GetPosition() - 4, EquipmentCount); for (int i = 0; i < EquipmentCount; ++i) { outputStream.Write("{0, -5}: Equip: {1} Values: ", buffer.GetPosition(), i); for (int j = 0; j < 5; ++j) { outputStream.Write(j != 3 ? "{0} " : " ItemId {0} ", buffer.ReadUInt32()); } outputStream.WriteLine(""); } // Something (9 ints) var sCount = buffer.ReadUInt32(); for (var i = 0; i < sCount; i++) { buffer.SkipBytes(20); } // Something (9 ints) var sCount1 = buffer.ReadUInt32(); for (var i = 0; i < sCount1; i++) { buffer.SkipBytes(4); } // Something (9 ints) var sCount2 = buffer.ReadUInt32(); for (var i = 0; i < sCount2; i++) { buffer.SkipBytes(4); } int preposn = buffer.GetPosition(); outputStream.WriteLine("{0, -5}: Hair Color = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Beard Color = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Eye1 Color = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Eye2 Color = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Hairstyle = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Beard = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Face = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Drakkin Heritage = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Drakkin Tattoo = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Drakkin Details = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Height = {1}", buffer.GetPosition(), buffer.ReadSingle()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadSingle()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadSingle()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadSingle()); outputStream.WriteLine("{0, -5}: Primary = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Secondary = {1}", buffer.GetPosition(), buffer.ReadUInt32()); int diff = buffer.GetPosition() - preposn; outputStream.WriteLine("Diff should be 52: {0}", diff); // Looks like face, haircolor, beardcolor, eyes, etc. Skipping over it. //Buffer.SkipBytes(52); outputStream.WriteLine("{0, -5}: Unspent Skill Points = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Mana = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Current HP = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: STR = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: STA = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: CHA = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: DEX = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: INT = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: AGI = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: WIS = {1}", buffer.GetPosition(), buffer.ReadUInt32()); buffer.SkipBytes(28); //Buffer.SkipBytes(28); UInt32 AACount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: AA Count = {1}", buffer.GetPosition() - 4, AACount); for (int i = 0; i < AACount; ++i) { outputStream.WriteLine(" AA: {0}, Value: {1}, Unknown08: {2}", buffer.ReadUInt32(), buffer.ReadUInt32(), buffer.ReadUInt32()); //Buffer.SkipBytes(12); } // Something (100 ints) uint sCount3 = buffer.ReadUInt32(); for (int i = 0; i < sCount3; i++) { buffer.SkipBytes(4); } // Something (25 ints) uint sCount4 = buffer.ReadUInt32(); for (int i = 0; i < sCount4; i++) { buffer.SkipBytes(4); } // Something (300 ints) uint sCount5 = buffer.ReadUInt32(); for (int i = 0; i < sCount5; i++) { buffer.SkipBytes(4); } // Something (20 ints) uint sCount6 = buffer.ReadUInt32(); for (int i = 0; i < sCount6; i++) { buffer.SkipBytes(4); } // Something (20 floats) uint sCount7 = buffer.ReadUInt32(); for (int i = 0; i < sCount7; i++) { buffer.SkipBytes(4); } // Something (100 floats) uint sCount8 = buffer.ReadUInt32(); for (int i = 0; i < sCount8; i++) { buffer.SkipBytes(4); } UInt32 SpellBookSlots = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: SpellBookSlot Count = {1}", buffer.GetPosition() - 4, SpellBookSlots); for (int i = 0; i < SpellBookSlots; ++i) { buffer.SkipBytes(4); } UInt32 SpellMemSlots = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Spell Mem Count = {1}", buffer.GetPosition() - 4, SpellMemSlots); for (int i = 0; i < SpellMemSlots; ++i) { buffer.SkipBytes(4); } // Something (13 ints) uint sCount9 = buffer.ReadUInt32(); for (int i = 0; i < sCount9; i++) { buffer.SkipBytes(4); } // Unknown buffer.SkipBytes(1); UInt32 BuffCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Buff Count = {1}", buffer.GetPosition() - 4, BuffCount); for (int i = 0; i < BuffCount; ++i) { buffer.ReadByte(); float UnkFloat = buffer.ReadSingle(); UInt32 PlayerID = buffer.ReadUInt32(); Byte UnkByte = buffer.ReadByte(); UInt32 Counters1 = buffer.ReadUInt32(); UInt32 Duration = buffer.ReadUInt32(); Byte Level = buffer.ReadByte(); UInt32 SpellID = buffer.ReadUInt32(); UInt32 SlotID = buffer.ReadUInt32(); buffer.SkipBytes(5); UInt32 Counters2 = buffer.ReadUInt32(); outputStream.WriteLine( "Sl: {0}, UF: {1}, PID: {2}, UByte: {3}, Cnt1: {4}, Dur: {5}, Lvl: {6} SpellID: {7}, SlotID: {8}, Cnt2: {9}", i, UnkFloat, PlayerID, UnkByte, Counters1, Duration, Level, SpellID, SlotID, Counters2); buffer.SkipBytes(44); } outputStream.WriteLine("{0, -5}: Plat = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Gold = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Silver = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Copper = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Plat Cursor = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Gold Cursor = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Silver Cursor = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Copper Cursor = {1}", buffer.GetPosition(), buffer.ReadUInt32()); // Unknown buffer.SkipBytes(20); outputStream.WriteLine("{0, -5}: AA Spent = {1}", buffer.GetPosition(), buffer.ReadUInt32()); // Unknown buffer.SkipBytes(4); outputStream.WriteLine("{0, -5}: AA Assigned = {1}", buffer.GetPosition(), buffer.ReadUInt32()); // Unknown buffer.SkipBytes(16); outputStream.WriteLine("{0, -5}: AA Unspent = {1}", buffer.GetPosition(), buffer.ReadUInt32()); // Unknown buffer.SkipBytes(2); /* // Bandolier Buffer.SkipBytes(1319); // Potion Belt Buffer.SkipBytes(160); */ //this could be wrong we could just skip UInt32 BandolierCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Bandolier Count = {1}", buffer.GetPosition() - 4, BandolierCount); for (int i = 0; i < BandolierCount; ++i) { buffer.ReadString(false); buffer.ReadString(false); buffer.SkipBytes(8); buffer.ReadString(false); buffer.SkipBytes(8); buffer.ReadString(false); buffer.SkipBytes(8); buffer.ReadString(false); buffer.SkipBytes(8); } UInt32 PotionCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Potion Count = {1}", buffer.GetPosition() - 4, PotionCount); for (int i = 0; i < PotionCount; ++i) { buffer.ReadString(false); buffer.SkipBytes(8); } // Unknown buffer.SkipBytes(84); outputStream.WriteLine("{0, -5}: Endurance= {1}", buffer.GetPosition(), buffer.ReadUInt32()); // Unknown buffer.SkipBytes(8); UInt32 NameLength = buffer.ReadUInt32(); var posn = buffer.GetPosition(); outputStream.WriteLine("{0, -5}: Name Length: {1}", buffer.GetPosition() - 4, NameLength); var name = buffer.ReadString(false); outputStream.WriteLine("{0, -5}: Name: {1}", buffer.GetPosition(), name); int CurrentPosition = buffer.GetPosition(); diff = CurrentPosition - posn; var skip = (int) NameLength - diff; outputStream.WriteLine("Diff is {0}. If it is not 0, then we will go overboard when setting posn. Skipping {1} bytes", diff, skip); buffer.SkipBytes(skip); UInt32 LastNameLength = buffer.ReadUInt32(); posn = buffer.GetPosition(); outputStream.WriteLine("{0, -5}: LastName Length: {1}", buffer.GetPosition() - 4, LastNameLength); name = buffer.ReadString(false); outputStream.WriteLine("{0, -5}: Last Name: {1}", buffer.GetPosition(), name); CurrentPosition = buffer.GetPosition(); diff = CurrentPosition - posn; skip = (int)LastNameLength - diff; outputStream.WriteLine("Diff is {0}. If it is not 0, then we will go overboard when setting posn. Skipping {1} bytes", diff, skip); buffer.SkipBytes(skip); // Unknown //Buffer.SkipBytes(4); outputStream.WriteLine("{0, -5}: Birthday {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Account start date {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Last Save Date {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Time played in Minutes {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Time Entitled On Account {1}", buffer.GetPosition(),buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Expansions {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); UInt32 LanguageCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Language Count = {1}", buffer.GetPosition() - 4, LanguageCount); for (int i = 0; i < LanguageCount; ++i) { buffer.SkipBytes(1); } outputStream.WriteLine("{0, -5}: Zone ID {1}", buffer.GetPosition(), buffer.ReadUInt16()); outputStream.WriteLine("{0, -5}: Zone Instance {1}", buffer.GetPosition(), buffer.ReadUInt16()); outputStream.WriteLine("{0, -5}: Y,X,Z {1},{2},{3} Heading: {4}", buffer.GetPosition(), buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle()); //Moofta all above here is verified outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: GuildID? {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Experience {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Bank Plat {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Bank Gold {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Bank Silver {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Bank Copper {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Shared plat? {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); UInt32 Unknown42 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown, value 42? {1}", buffer.GetPosition() - 4, Unknown42); buffer.SkipBytes((int)(Unknown42 * 8)); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Career Tribute Favour {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Current Tribute Favour {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); UInt32 PersonalTributeCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Personal Tribute Count {1}", buffer.GetPosition() - 4, PersonalTributeCount); buffer.SkipBytes((int)(PersonalTributeCount * 8)); UInt32 GuildTributeCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Guild Tribute Count {1}", buffer.GetPosition() - 4, GuildTributeCount); buffer.SkipBytes((int)(GuildTributeCount * 8)); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("Skipping 121 bytes starting at offset {0}", buffer.GetPosition()); buffer.SkipBytes(121); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("Position now {0}", buffer.GetPosition()); UInt32 Unknown64 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown64 {1}", buffer.GetPosition() - 4, Unknown64); buffer.SkipBytes((int)Unknown64); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); Unknown64 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown64 {1}", buffer.GetPosition() - 4, Unknown64); buffer.SkipBytes((int)Unknown64); Unknown64 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown64 {1}", buffer.GetPosition() - 4, Unknown64); buffer.SkipBytes((int)Unknown64); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("Skipping 320 bytes starting at offset {0}", buffer.GetPosition()); buffer.SkipBytes(320); outputStream.WriteLine("Skipping 343 bytes starting at offset {0}", buffer.GetPosition()); buffer.SkipBytes(343); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); UInt32 Unknown6 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown6 {1} LDON Stuff then why have the count before it?", buffer.GetPosition() - 4, Unknown6); //for (int i = 0; i < Unknown6; ++i) //{ // OutputStream.WriteLine("{0, -5}: Unknown LDON? {1}", Buffer.GetPosition(), Buffer.ReadUInt32()); //} outputStream.WriteLine("{0, -5}: Ldon GUK points? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Ldon MIR points? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Ldon mmc points? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Ldon ruj points? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Ldon tak points? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Ldon available points? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); Unknown64 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown64 {1}", buffer.GetPosition() - 4, Unknown64); buffer.SkipBytes((int)Unknown64 * 4); // Air remaining ? outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); // Next 7 could be PVP stats, outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); // PVP LastKill struct ? outputStream.WriteLine("Skipping string + 24 bytes starting at offset {0}", buffer.GetPosition()); //Buffer.SkipBytes(25); Byte b; do { b = buffer.ReadByte(); } while (b != 0); buffer.SkipBytes(24); // PVP LastDeath struct ? outputStream.WriteLine("Skipping string + 24 bytes starting at offset {0}", buffer.GetPosition()); //Buffer.SkipBytes(25); do { b = buffer.ReadByte(); } while (b != 0); buffer.SkipBytes(24); // PVP Number of Kills in Last 24 hours ? outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); UInt32 Unknown50 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown50 {1}", buffer.GetPosition() - 4, Unknown50); // PVP Recent Kills ? outputStream.WriteLine("Pss pvp recent kills Skipping 50 x (String + 24 bytes) starting at offset {0}", buffer.GetPosition()); //Buffer.SkipBytes(1338); for (int i = 0; i < 50; ++i) { do { b = buffer.ReadByte(); } while (b != 0); buffer.SkipBytes(24); } // outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Group autoconsent? {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Raid autoconsent? {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Guild autoconsent? {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Level3? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Showhelm? {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: RestTimer? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("Skipping 1028 bytes starting at offset {0}", buffer.GetPosition()); buffer.SkipBytes(1028); //outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); //outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("Pointer is {0} bytes from end.", buffer.Length() - buffer.GetPosition()); }
public override void ExplorePlayerProfile(StreamWriter outputStream, ByteStream buffer, PacketDirection direction) { outputStream.WriteLine("{0, -5}: Checksum = {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: ChecksumSize = {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine(""); outputStream.WriteLine("{0, -5}: Gender = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Race = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Class = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Level = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Level1 = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine(""); UInt32 BindCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: BindCount = {1}", buffer.GetPosition() - 4, BindCount); for (int i = 0; i < BindCount; ++i) { outputStream.WriteLine("{0, -5}: Bind: {1} Zone: {2} XYZ: {3},{4},{5} Heading: {6}", buffer.GetPosition(), i, buffer.ReadUInt32(), buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle()); } outputStream.WriteLine(""); outputStream.WriteLine("{0, -5}: Deity = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Intoxication = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine(""); //Buffer.SkipBytes(8); // Deity, intoxication UInt32 UnknownCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown Count = {1}", buffer.GetPosition() - 4, UnknownCount); for (int i = 0; i < UnknownCount; ++i) { outputStream.WriteLine("{0, -5}: Unknown : {1}, Value = {2}", buffer.GetPosition(), i, buffer.ReadUInt32()); //Buffer.SkipBytes(4); } UInt32 EquipmentCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: EquipmentCount = {1}", buffer.GetPosition() - 4, EquipmentCount); for (int i = 0; i < EquipmentCount; ++i) { outputStream.Write("{0, -5}: Equip: {1} Values: ", buffer.GetPosition(), i); for (int j = 0; j < 5; ++j) outputStream.Write("{0} ", buffer.ReadUInt32()); outputStream.WriteLine(""); //Buffer.SkipBytes(20); } UInt32 EquipmentCount2 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: EquipmentCount2 = {1}", buffer.GetPosition() - 4, EquipmentCount2); for (int i = 0; i < EquipmentCount2; ++i) { outputStream.Write("{0, -5}: Equip2: {1} Values: ", buffer.GetPosition(), i); for (int j = 0; j < 5; ++j) outputStream.Write("{0} ", buffer.ReadUInt32()); outputStream.WriteLine(""); //Buffer.SkipBytes(20); } UInt32 TintCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: TintCount = {1}", buffer.GetPosition() - 4, TintCount); for (int i = 0; i < TintCount; ++i) { outputStream.WriteLine("{0, -5}: TintCount : {1}, Value = {2}", buffer.GetPosition(), i, buffer.ReadUInt32()); //Buffer.SkipBytes(4); } UInt32 TintCount2 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: TintCount2 = {1}", buffer.GetPosition() - 4, TintCount2); for (int i = 0; i < TintCount; ++i) { outputStream.WriteLine("{0, -5}: TintCount2 : {1}, Value = {2}", buffer.GetPosition(), i, buffer.ReadUInt32()); //Buffer.SkipBytes(4); } outputStream.WriteLine("{0, -5}: Hair Color = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Beard Color = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Eye1 Color = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Eye2 Color = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Hairstyle = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Beard = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Face = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Drakkin Heritage = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Drakkin Tattoo = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Drakkin Details = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Height = {1}", buffer.GetPosition(), buffer.ReadSingle()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadSingle()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadSingle()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadSingle()); outputStream.WriteLine("{0, -5}: Primary = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Secondary = {1}", buffer.GetPosition(), buffer.ReadUInt32()); //Buffer.SkipBytes(52); // Per SEQ, this looks like face, haircolor, beardcolor etc. outputStream.WriteLine("{0, -5}: Unspent Skill Points = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Mana = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Current HP = {1}", buffer.GetPosition(), buffer.ReadUInt32()); //UInt32 Points = Buffer.ReadUInt32(); //UInt32 Mana = Buffer.ReadUInt32(); //UInt32 CurHP = Buffer.ReadUInt32(); //OutputStream.WriteLine("Points, Mana, CurHP = {0}, {1}, {2}", Points, Mana, CurHP); outputStream.WriteLine("{0, -5}: STR = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: STA = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: CHA = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: DEX = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: INT = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: AGI = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: WIS = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); //Buffer.SkipBytes(28); //Buffer.SkipBytes(28); UInt32 AACount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: AA Count = {1}", buffer.GetPosition() - 4, AACount); for (int i = 0; i < AACount; ++i) { outputStream.WriteLine(" AA: {0}, Value: {1}, Unknown08: {2}", buffer.ReadUInt32(), buffer.ReadUInt32(), buffer.ReadUInt32()); //Buffer.SkipBytes(12); } UInt32 SkillCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Skill Count = {1}", buffer.GetPosition() - 4, SkillCount); for (int i = 0; i < SkillCount; ++i) { buffer.SkipBytes(4); } UInt32 SomethingCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Something Count = {1}", buffer.GetPosition() - 4, SomethingCount); for (int i = 0; i < SomethingCount; ++i) { //Buffer.SkipBytes(4); outputStream.WriteLine("Something {0} : {1}", i, buffer.ReadUInt32()); } UInt32 DisciplineCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Discipline Count = {1}", buffer.GetPosition() - 4, DisciplineCount); for (int i = 0; i < DisciplineCount; ++i) { buffer.SkipBytes(4); } UInt32 TimeStampCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: TimeStamp Count = {1}", buffer.GetPosition() - 4, TimeStampCount); for (int i = 0; i < TimeStampCount; ++i) { //Buffer.SkipBytes(4); outputStream.WriteLine("Timestamp {0} : {1}", i, buffer.ReadUInt32()); } System.DateTime dateTime; UInt32 RecastCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Recast Count = {1}", buffer.GetPosition() - 4, RecastCount); for (int i = 0; i < RecastCount; ++i) { //Buffer.SkipBytes(4); UInt32 TimeStamp = buffer.ReadUInt32(); dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0); dateTime = dateTime.AddSeconds(TimeStamp); outputStream.WriteLine("Recast {0} : {1} {2}", i, TimeStamp, dateTime.ToString()); } UInt32 TimeStamp2Count = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: TimeStamp2 Count = {1}", buffer.GetPosition() - 4, TimeStamp2Count); for (int i = 0; i < TimeStamp2Count; ++i) { //Buffer.SkipBytes(4); UInt32 TimeStamp = buffer.ReadUInt32(); dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0); dateTime = dateTime.AddSeconds(TimeStamp); outputStream.WriteLine("Timestamp {0} : {1} {2}", i, TimeStamp, dateTime.ToString()); } UInt32 SpellBookSlots = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: SpellBookSlot Count = {1}", buffer.GetPosition() - 4, SpellBookSlots); for (int i = 0; i < SpellBookSlots; ++i) { buffer.SkipBytes(4); } UInt32 SpellMemSlots = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Spell Mem Count = {1}", buffer.GetPosition() - 4, SpellMemSlots); for (int i = 0; i < SpellMemSlots; ++i) { buffer.SkipBytes(4); } SomethingCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown Count = {1}", buffer.GetPosition() - 4, SomethingCount); for (int i = 0; i < SomethingCount; ++i) { //Buffer.SkipBytes(4); outputStream.WriteLine("Unknown {0} : {1}", i, buffer.ReadUInt32()); } outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadByte()); UInt32 BuffCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Buff Count = {1}", buffer.GetPosition() - 4, BuffCount); for (int i = 0; i < BuffCount; ++i) { buffer.ReadByte(); float UnkFloat = buffer.ReadSingle(); UInt32 PlayerID = buffer.ReadUInt32(); Byte UnkByte = buffer.ReadByte(); UInt32 Counters1 = buffer.ReadUInt32(); UInt32 Duration = buffer.ReadUInt32(); Byte Level = buffer.ReadByte(); UInt32 SpellID = buffer.ReadUInt32(); UInt32 SlotID = buffer.ReadUInt32(); buffer.SkipBytes(5); UInt32 Counters2 = buffer.ReadUInt32(); outputStream.WriteLine("Sl: {0}, UF: {1}, PID: {2}, UByte: {3}, Cnt1: {4}, Dur: {5}, Lvl: {6} SpellID: {7}, SlotID: {8}, Cnt2: {9}", i, UnkFloat, PlayerID, UnkByte, Counters1, Duration, Level, SpellID, SlotID, Counters2); buffer.SkipBytes(44); } outputStream.WriteLine("{0, -5}: Plat = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Gold = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Silver = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Copper = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Plat Cursor = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Gold Cursor = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Silver Cursor = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Copper Cursor = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Toxicity? = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Thirst? = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Hunger? = {1}", buffer.GetPosition(), buffer.ReadUInt32()); //Buffer.SkipBytes(20); outputStream.WriteLine("{0, -5}: AA Spent = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: AA Point Count? = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: AA Assigned = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: AA Spent General = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: AA Spent Archetype = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: AA Spent Class = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: AA Spent Special = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: AA Unspent = {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown", buffer.GetPosition(), buffer.ReadUInt16()); //Buffer.SkipBytes(30); UInt32 BandolierCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Bandolier Count = {1}", buffer.GetPosition() - 4, BandolierCount); for (int i = 0; i < BandolierCount; ++i) { buffer.ReadString(false); buffer.ReadString(false); buffer.SkipBytes(8); buffer.ReadString(false); buffer.SkipBytes(8); buffer.ReadString(false); buffer.SkipBytes(8); buffer.ReadString(false); buffer.SkipBytes(8); } UInt32 PotionCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Potion Count = {1}", buffer.GetPosition() - 4, PotionCount); for (int i = 0; i < PotionCount; ++i) { buffer.ReadString(false); buffer.SkipBytes(8); } outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadInt32()); outputStream.WriteLine("{0, -5}: Item HP Total? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Endurance Total? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Mana Total? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Expansion Count {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); UInt32 NameLength = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Name Length: {1}", buffer.GetPosition() - 4, NameLength); int CurrentPosition = buffer.GetPosition(); outputStream.WriteLine("{0, -5}: Name: {1}", buffer.GetPosition(), buffer.ReadString(false)); buffer.SetPosition(CurrentPosition + (int)NameLength); UInt32 LastNameLength = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: LastName Length: {1}", buffer.GetPosition() - 4, LastNameLength); CurrentPosition = buffer.GetPosition(); outputStream.WriteLine("{0, -5}: Last Name: {1}", buffer.GetPosition(), buffer.ReadString(false)); buffer.SetPosition(CurrentPosition + (int)LastNameLength); outputStream.WriteLine("{0, -5}: Birthday {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Account Start Date {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Last Login Date {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Time Played Minutes {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Time Entitled On Account {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Expansions {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); UInt32 LanguageCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Language Count = {1}", buffer.GetPosition() - 4, LanguageCount); for (int i = 0; i < LanguageCount; ++i) { buffer.SkipBytes(1); } outputStream.WriteLine("{0, -5}: Zone ID {1}", buffer.GetPosition(), buffer.ReadUInt16()); outputStream.WriteLine("{0, -5}: Zone Instance {1}", buffer.GetPosition(), buffer.ReadUInt16()); outputStream.WriteLine("{0, -5}: Y,X,Z {1},{2},{3} Heading: {4}", buffer.GetPosition(), buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: GuildID? {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Experience {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Bank Plat {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Bank Gold {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Bank Silver {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Bank Copper {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); UInt32 Unknown42 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown, value 42? {1}", buffer.GetPosition() - 4, Unknown42); buffer.SkipBytes((int)(Unknown42 * 8)); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Career Tribute Favour {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Current Tribute Favour {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); UInt32 PersonalTributeCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Personal Tribute Count {1}", buffer.GetPosition() - 4, PersonalTributeCount); buffer.SkipBytes((int)(PersonalTributeCount * 8)); UInt32 GuildTributeCount = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Guild Tribute Count {1}", buffer.GetPosition() - 4, GuildTributeCount); buffer.SkipBytes((int)(GuildTributeCount * 8)); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("Skipping 121 bytes starting at offset {0}", buffer.GetPosition()); buffer.SkipBytes(121); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("Position now {0}", buffer.GetPosition()); UInt32 Unknown64 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown64 {1}", buffer.GetPosition() - 4, Unknown64); buffer.SkipBytes((int)Unknown64); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); Unknown64 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown64 {1}", buffer.GetPosition() - 4, Unknown64); buffer.SkipBytes((int)Unknown64); Unknown64 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown64 {1}", buffer.GetPosition() - 4, Unknown64); buffer.SkipBytes((int)Unknown64); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("Skipping 320 bytes starting at offset {0}", buffer.GetPosition()); buffer.SkipBytes(320); outputStream.WriteLine("Skipping 343 bytes starting at offset {0}", buffer.GetPosition()); buffer.SkipBytes(343); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); UInt32 Unknown6 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown6 {1} LDON Stuff ?", buffer.GetPosition() - 4, Unknown6); for (int i = 0; i < Unknown6; ++i) outputStream.WriteLine("{0, -5}: Unknown LDON? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); Unknown64 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown64 {1}", buffer.GetPosition() - 4, Unknown64); buffer.SkipBytes((int)Unknown64 * 4); // Air remaining ? outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); // Next 7 could be PVP stats, outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); // PVP LastKill struct ? outputStream.WriteLine("Skipping string + 24 bytes starting at offset {0}", buffer.GetPosition()); //Buffer.SkipBytes(25); Byte b; do { b = buffer.ReadByte(); } while (b != 0); buffer.SkipBytes(24); // PVP LastDeath struct ? outputStream.WriteLine("Skipping string + 24 bytes starting at offset {0}", buffer.GetPosition()); //Buffer.SkipBytes(25); do { b = buffer.ReadByte(); } while (b != 0); buffer.SkipBytes(24); // PVP Number of Kills in Last 24 hours ? outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); UInt32 Unknown50 = buffer.ReadUInt32(); outputStream.WriteLine("{0, -5}: Unknown50 {1}", buffer.GetPosition() - 4, Unknown50); // PVP Recent Kills ? outputStream.WriteLine("Skipping 50 x (String + 24 bytes) starting at offset {0}", buffer.GetPosition()); //Buffer.SkipBytes(1338); for (int i = 0; i < 50; ++i) { do { b = buffer.ReadByte(); } while (b != 0); buffer.SkipBytes(24); } // outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Group autoconsent? {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Raid autoconsent? {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Guild autoconsent? {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: Level3? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Showhelm? {1}", buffer.GetPosition(), buffer.ReadByte()); outputStream.WriteLine("{0, -5}: RestTimer? {1}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("Skipping 1028 bytes starting at offset {0}", buffer.GetPosition()); buffer.SkipBytes(1028); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("{0, -5}: Unknown {1:X}", buffer.GetPosition(), buffer.ReadUInt32()); outputStream.WriteLine("Pointer is {0} bytes from end.", buffer.Length() - buffer.GetPosition()); }
public override MerchantManager GetMerchantData(NPCSpawnList npcsl) { List<EQApplicationPacket> PacketList = Packets.PacketList; UInt32 OP_ShopRequest = OpManager.OpCodeNameToNumber("OP_ShopRequest"); UInt32 OP_ShopEnd = OpManager.OpCodeNameToNumber("OP_ShopEnd"); UInt32 OP_ItemPacket = OpManager.OpCodeNameToNumber("OP_ItemPacket"); MerchantManager mm = new MerchantManager(); for (int i = 0; i < PacketList.Count; ++i) { EQApplicationPacket p = PacketList[i]; if ((p.Direction == PacketDirection.ServerToClient) && (p.OpCode == OP_ShopRequest)) { ByteStream Buffer = new ByteStream(p.Buffer); UInt32 MerchantSpawnID = Buffer.ReadUInt32(); NPCSpawn npc = npcsl.GetNPC(MerchantSpawnID); UInt32 NPCTypeID; if (npc != null) NPCTypeID = npc.NPCTypeID; else NPCTypeID = 0; mm.AddMerchant(MerchantSpawnID); for (int j = i + 1; j < PacketList.Count; ++j) { p = PacketList[j]; if (p.OpCode == OP_ShopEnd) break; if (p.OpCode == OP_ItemPacket) { Buffer = new ByteStream(p.Buffer); UInt32 StackSize = Buffer.ReadUInt32(); Buffer.SkipBytes(4); UInt32 Slot = Buffer.ReadUInt32(); UInt32 MerchantSlot = Buffer.ReadUInt32(); UInt32 Price = Buffer.ReadUInt32(); Int32 Quantity = Buffer.ReadInt32(); Buffer.SetPosition(68); // Point to item name string ItemName = Buffer.ReadString(true); string Lore = Buffer.ReadString(true); string IDFile = Buffer.ReadString(true); UInt32 ItemID = Buffer.ReadUInt32(); //if (Quantity == -1) mm.AddMerchantItem(MerchantSpawnID, ItemID, ItemName, MerchantSlot, Quantity); } } } } return mm; }