public static void HandleAuthSession(Packet packet) { var sha = new byte[20]; packet.ReadUInt32("UInt32 1"); packet.ReadUInt32("UInt32 2"); packet.ReadByte("Unk Byte"); sha[10] = packet.ReadByte(); sha[18] = packet.ReadByte(); sha[12] = packet.ReadByte(); sha[5] = packet.ReadByte(); packet.ReadInt64("Int64"); sha[15] = packet.ReadByte(); sha[9] = packet.ReadByte(); sha[19] = packet.ReadByte(); sha[4] = packet.ReadByte(); sha[7] = packet.ReadByte(); sha[16] = packet.ReadByte(); sha[3] = packet.ReadByte(); packet.ReadInt16E<ClientVersionBuild>("Client Build"); sha[8] = packet.ReadByte(); packet.ReadUInt32("UInt32 3"); packet.ReadByte("Unk Byte"); sha[17] = packet.ReadByte(); sha[6] = packet.ReadByte(); sha[0] = packet.ReadByte(); sha[1] = packet.ReadByte(); sha[11] = packet.ReadByte(); packet.ReadUInt32("Client seed"); sha[2] = packet.ReadByte(); packet.ReadUInt32("UInt32 4"); sha[14] = packet.ReadByte(); sha[13] = packet.ReadByte(); var addons = new Packet(packet.ReadBytes(packet.ReadInt32()), packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName); CoreParsers.AddonHandler.ReadClientAddonsList(addons); addons.ClosePacket(false); packet.ReadBit("Unk bit"); var size = (int)packet.ReadBits(12); packet.ReadBytesString("Account name", size); packet.AddValue("Proof SHA-1 Hash", Utilities.ByteArrayToHexString(sha)); }
public static void HandlePartyMemberStats(Packet packet) { var guid = new byte[8]; packet.StartBitStream(guid, 0, 5); packet.ReadBit("unk1"); // Add arena opponent ? packet.StartBitStream(guid, 1, 4); packet.ReadBit("unk2"); packet.StartBitStream(guid, 6, 2, 7, 3); packet.ParseBitStream(guid, 3, 2, 6, 7, 5); var updateFlags = packet.ReadUInt32E<GroupUpdateFlag548>("Update Flags"); packet.ParseBitStream(guid, 1, 4, 0); packet.WriteGuid("Guid", guid); var size = packet.ReadInt32("Size"); var data = packet.ReadBytes(size); var updateFlagPacket = new Packet(data, packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName); if (updateFlags.HasFlag(GroupUpdateFlag548.Status)) // 0x1 updateFlagPacket.ReadInt16E<GroupMemberStatusFlag>("Status"); if (updateFlags.HasFlag(GroupUpdateFlag548.Unk2)) // 0x2 { for (var i = 0; i < 2; i++) updateFlagPacket.ReadByte("Unk2", i); } if (updateFlags.HasFlag(GroupUpdateFlag548.CurrentHealth)) // 0x4 updateFlagPacket.ReadUInt32("Current Health"); if (updateFlags.HasFlag(GroupUpdateFlag548.MaxHealth)) // 0x8 updateFlagPacket.ReadUInt32("Max Health"); if (updateFlags.HasFlag(GroupUpdateFlag548.PowerType)) // 0x10 updateFlagPacket.ReadByteE<PowerType>("Power type"); if (updateFlags.HasFlag(GroupUpdateFlag548.CurrentPower)) // 0x20 updateFlagPacket.ReadUInt16("Current Power"); if (updateFlags.HasFlag(GroupUpdateFlag548.Zone)) // 0x40 updateFlagPacket.ReadUInt16<ZoneId>("Zone Id"); if (updateFlags.HasFlag(GroupUpdateFlag548.MaxPower))// 0x80 updateFlagPacket.ReadUInt16("Max Power"); if (updateFlags.HasFlag(GroupUpdateFlag548.Level))// 0x100 updateFlagPacket.ReadUInt16("Level"); if (updateFlags.HasFlag(GroupUpdateFlag548.Unk200)) // 0x200 updateFlagPacket.ReadUInt16("Unk200"); if (updateFlags.HasFlag(GroupUpdateFlag548.Unk400)) // 0x400 updateFlagPacket.ReadUInt16("Unk400"); if (updateFlags.HasFlag(GroupUpdateFlag548.Position)) // 0x800 { updateFlagPacket.ReadInt16("Position X"); updateFlagPacket.ReadInt16("Position Y"); updateFlagPacket.ReadInt16("Position Z"); } if (updateFlags.HasFlag(GroupUpdateFlag548.Auras)) // 0x1000 { updateFlagPacket.ReadByte("unkByte"); var mask = updateFlagPacket.ReadUInt64("Aura Mask"); var count = updateFlagPacket.ReadInt32("AuraCount"); for (var i = 0; i < count; ++i) { if (mask == 0) // bad packet break; if ((mask & (1ul << i)) == 0) continue; updateFlagPacket.ReadUInt32<SpellId>("Spell Id", i); var flags = updateFlagPacket.ReadByteE<AuraFlagMoP>("Aura Flags", i); var unk = updateFlagPacket.ReadUInt32("unk", i); if (flags.HasFlag(AuraFlagMoP.Scalable)) { var cnt = updateFlagPacket.ReadByte("Scalings"); for (int j = 0; j < cnt; j++) updateFlagPacket.ReadSingle("Scale", i, j); } } } if (updateFlags.HasFlag(GroupUpdateFlag548.PetGuid)) // 0x2000 updateFlagPacket.ReadGuid("Pet GUID"); if (updateFlags.HasFlag(GroupUpdateFlag548.PetName)) // 0x4000 updateFlagPacket.ReadCString("Pet Name"); if (updateFlags.HasFlag(GroupUpdateFlag548.PetModelId)) // 0x8000 updateFlagPacket.ReadInt16("Pet Modelid"); if (updateFlags.HasFlag(GroupUpdateFlag548.PetCurrentHealth)) // 0x10000 updateFlagPacket.ReadInt32("Pet Current Health"); if (updateFlags.HasFlag(GroupUpdateFlag548.PetMaxHealth)) // 0x20000 updateFlagPacket.ReadInt32("Pet Max Health"); if (updateFlags.HasFlag(GroupUpdateFlag548.PetPowerType)) // 0x40000 updateFlagPacket.ReadByteE<PowerType>("Pet Power type"); if (updateFlags.HasFlag(GroupUpdateFlag548.PetCurrentPower)) // 0x80000 updateFlagPacket.ReadInt16("Pet Current Power"); if (updateFlags.HasFlag(GroupUpdateFlag548.PetMaxPower)) // 0x100000 updateFlagPacket.ReadInt16("Pet Max Power"); if (updateFlags.HasFlag(GroupUpdateFlag548.Unk200000)) // 0x200000 updateFlagPacket.ReadInt16("Unk200000"); if (updateFlags.HasFlag(GroupUpdateFlag548.PetAuras)) // 0x400000 { updateFlagPacket.ReadByte("unkByte"); var mask = updateFlagPacket.ReadUInt64("Aura Mask"); var count = updateFlagPacket.ReadInt32("AuraCount"); for (var i = 0; i < count; ++i) { if ((mask & (1ul << i)) == 0) continue; updateFlagPacket.ReadUInt32<SpellId>("Spell Id", i); var flags = updateFlagPacket.ReadByteE<AuraFlagMoP>("Aura Flags", i); updateFlagPacket.ReadUInt32("unk", i); if (flags.HasFlag(AuraFlagMoP.Scalable)) { var cnt = updateFlagPacket.ReadByte("Scalings", i); for (int j = 0; j < cnt; j++) updateFlagPacket.ReadSingle("Scale", i, j); } } } if (updateFlags.HasFlag(GroupUpdateFlag548.VehicleSeat)) // 0x800000 updateFlagPacket.ReadInt32("Vehicle Seat"); if (updateFlags.HasFlag(GroupUpdateFlag548.Phase)) // 0x1000000 { updateFlagPacket.ReadInt32("Unk Int32"); var count = updateFlagPacket.ReadBits("Phase Count", 23); for (var i = 0; i < count; ++i) updateFlagPacket.ReadUInt16("Phase Id"); } if (updateFlags.HasFlag(GroupUpdateFlag548.Unk2000000)) // 0x2000000 updateFlagPacket.ReadInt16("Unk2000000"); if (updateFlags.HasFlag(GroupUpdateFlag548.Unk4000000)) // 0x4000000 updateFlagPacket.ReadInt32("Unk4000000"); updateFlagPacket.ClosePacket(false); }
public static void HandleSpellFailure(Packet packet) { packet.ReadPackedGuid128("CasterUnit"); packet.ReadPackedGuid128("CastID"); packet.ReadInt32<SpellId>("SpellID"); packet.ReadUInt32("SpellXSpellVisualID"); packet.ReadInt16E<SpellCastFailureReason>("Reason"); }
public static void HandlePartyMemberStats422(Packet packet) { if (packet.Opcode == Opcodes.GetOpcode(Opcode.SMSG_PARTY_MEMBER_STATS_FULL, Direction.ServerToClient)) packet.ReadBool("Add arena opponent"); packet.ReadPackedGuid("GUID"); var updateFlags = packet.ReadInt32E<GroupUpdateFlag422>("Update Flags"); if (updateFlags.HasFlag(GroupUpdateFlag422.Status)) packet.ReadInt16E<GroupMemberStatusFlag>("Status"); if (updateFlags.HasFlag(GroupUpdateFlag422.CurrentHealth)) { if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)) packet.ReadInt32("Current Health"); else packet.ReadUInt16("Current Health"); } if (updateFlags.HasFlag(GroupUpdateFlag422.MaxHealth)) { if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)) packet.ReadInt32("Max Health"); else packet.ReadUInt16("Max Health"); } if (updateFlags.HasFlag(GroupUpdateFlag422.PowerType)) packet.ReadByteE<PowerType>("Power type"); if (updateFlags.HasFlag(GroupUpdateFlag422.CurrentPower)) packet.ReadInt16("Current Power"); if (updateFlags.HasFlag(GroupUpdateFlag422.MaxPower)) packet.ReadInt16("Max Power"); if (updateFlags.HasFlag(GroupUpdateFlag422.Level)) packet.ReadInt16("Level"); if (updateFlags.HasFlag(GroupUpdateFlag422.Zone)) packet.ReadInt16<ZoneId>("Zone Id"); if (updateFlags.HasFlag(GroupUpdateFlag422.Unk100)) packet.ReadInt16("Unk"); if (updateFlags.HasFlag(GroupUpdateFlag422.Position)) { packet.ReadInt16("X"); packet.ReadInt16("Y"); packet.ReadInt16("Z"); } if (updateFlags.HasFlag(GroupUpdateFlag422.Auras)) { packet.ReadByte("Unk byte"); var mask = packet.ReadUInt64("Aura mask"); var cnt = packet.ReadUInt32("Aura count"); for (var i = 0; i < cnt; ++i) { if (mask == 0) // bad packet break; if ((mask & (1ul << i)) == 0) continue; packet.ReadUInt32<SpellId>("Spell Id", i); var aflags = packet.ReadUInt16E<AuraFlag>("Aura Flags", i); if (aflags.HasFlag(AuraFlag.Scalable)) for (var j = 0; j < 3; ++j) packet.ReadInt32("Effect BasePoints", i, j); } } if (updateFlags.HasFlag(GroupUpdateFlag422.PetGuid)) packet.ReadUInt64("Pet GUID"); if (updateFlags.HasFlag(GroupUpdateFlag422.PetName)) packet.ReadCString("Pet Name"); if (updateFlags.HasFlag(GroupUpdateFlag422.PetModelId)) packet.ReadUInt16("Pet Model Id"); if (updateFlags.HasFlag(GroupUpdateFlag422.PetCurrentHealth)) packet.ReadUInt32("Pet Current Health"); if (updateFlags.HasFlag(GroupUpdateFlag422.PetMaxHealth)) packet.ReadUInt32("Pet Max Health"); if (updateFlags.HasFlag(GroupUpdateFlag422.PetPowerType)) packet.ReadByteE<PowerType>("Pet Power type"); if (updateFlags.HasFlag(GroupUpdateFlag422.PetCurrentPower)) packet.ReadInt16("Pet Current Power"); if (updateFlags.HasFlag(GroupUpdateFlag422.PetMaxPower)) packet.ReadInt16("Pet Max Power"); if (updateFlags.HasFlag(GroupUpdateFlag422.PetAuras)) { packet.ReadByte("Unk byte"); var mask = packet.ReadUInt64("Pet Aura mask"); var cnt = packet.ReadUInt32("Pet Aura count"); for (var i = 0; i < cnt; ++i) { if ((mask & (1ul << i)) == 0) continue; packet.ReadUInt32<SpellId>("Spell Id", i); var aflags = packet.ReadUInt16E<AuraFlag>("Aura Flags", i); if (aflags.HasFlag(AuraFlag.Scalable)) for (var j = 0; j < 3; ++j) packet.ReadInt32("Effect BasePoints", i, j); } } if (updateFlags.HasFlag(GroupUpdateFlag422.VehicleSeat)) packet.ReadInt32("Vehicle Seat?"); if (updateFlags.HasFlag(GroupUpdateFlag422.Phase)) { packet.ReadInt32("Unk Int32"); var count = packet.ReadInt32("Phase Count"); for (var i = 0; i < count; ++i) packet.ReadInt16("Phase Id"); } }
public static void HandlePartyMemberState(Packet packet) { packet.ReadBit("ForEnemy"); for (var i = 0; i < 2; i++) packet.ReadByte("PartyType", i); packet.ReadInt16E<GroupMemberStatusFlag>("Flags"); packet.ReadByte("PowerType"); packet.ReadInt16("OverrideDisplayPower"); packet.ReadInt32("CurrentHealth"); packet.ReadInt32("MaxHealth"); packet.ReadInt16("MaxPower"); packet.ReadInt16("MaxPower"); packet.ReadInt16("Level"); packet.ReadInt16("Spec"); packet.ReadInt16("AreaID"); packet.ReadInt16("WmoGroupID"); packet.ReadInt32("WmoDoodadPlacementID"); packet.ReadInt16("PositionX"); packet.ReadInt16("PositionY"); packet.ReadInt16("PositionZ"); packet.ReadInt32("VehicleSeatRecID"); var auraCount = packet.ReadInt32("AuraCount"); packet.ReadInt32("PhaseShiftFlags"); var int4 = packet.ReadInt32("PhaseCount"); packet.ReadPackedGuid128("PersonalGUID"); for (int i = 0; i < int4; i++) { packet.ReadInt16("PhaseFlags", i); packet.ReadInt16("Id", i); } for (int i = 0; i < auraCount; i++) { packet.ReadInt32<SpellId>("Aura", i); packet.ReadByte("Flags", i); packet.ReadInt32("ActiveFlags", i); var byte3 = packet.ReadInt32("PointsCount", i); for (int j = 0; j < byte3; j++) packet.ReadSingle("Points", i, j); } packet.ResetBitReader(); var hasPet = packet.ReadBit("HasPet"); if (hasPet) // Pet { packet.ReadPackedGuid128("PetGuid"); packet.ReadInt16("PetDisplayID"); packet.ReadInt32("PetMaxHealth"); packet.ReadInt32("PetHealth"); var petAuraCount = packet.ReadInt32("PetAuraCount"); for (int i = 0; i < petAuraCount; i++) { packet.ReadInt32<SpellId>("PetAura", i); packet.ReadByte("PetFlags", i); packet.ReadInt32("PetActiveFlags", i); var byte3 = packet.ReadInt32("PetPointsCount", i); for (int j = 0; j < byte3; j++) packet.ReadSingle("PetPoints", i, j); } packet.ResetBitReader(); var len = packet.ReadBits(8); packet.ReadWoWString("PetName", len); } packet.ReadPackedGuid128("MemberGuid"); }
public static void HandlePartyMemberState(Packet packet) { packet.ReadBit("ForEnemy"); packet.ReadPackedGuid128("MemberGuid"); for (var i = 0; i < 2; i++) packet.ReadByte("Unk704", i); packet.ReadInt16E<GroupMemberStatusFlag>("Status"); packet.ReadByte("PowerType"); packet.ReadInt16("Unk322"); packet.ReadInt32("CurrentHealth"); packet.ReadInt32("MaxHealth"); packet.ReadInt16("CurrentPower"); packet.ReadInt16("MaxPower"); packet.ReadInt16("Level"); packet.ReadInt16("Unk200000"); packet.ReadInt16("ZoneId"); packet.ReadInt16("Unk2000000"); packet.ReadInt32("Unk4000000"); packet.ReadInt16("PositionX"); packet.ReadInt16("PositionY"); packet.ReadInt16("PositionZ"); packet.ReadInt32("VehicleSeat"); var auraCount = packet.ReadInt32("AuraCount"); packet.ReadInt32("PhaseShiftFlags"); var int4 = packet.ReadInt32("PhaseCount"); packet.ReadPackedGuid128("PersonalGUID"); for (int i = 0; i < int4; i++) { packet.ReadInt16("PhaseFlags", i); packet.ReadInt16("Id", i); } for (int i = 0; i < auraCount; i++) { packet.ReadInt32("SpellId", i); packet.ReadByte("Scalings", i); packet.ReadInt32("EffectMask", i); var byte3 = packet.ReadInt32("EffectCount", i); for (int j = 0; j < byte3; j++) packet.ReadSingle("Scale", i, j); } packet.ResetBitReader(); var hasPet = packet.ReadBit("HasPet"); if (hasPet) // Pet { packet.ReadPackedGuid128("PetGUID"); packet.ReadInt16("PetModelId"); packet.ReadInt32("PetCurrentHealth"); packet.ReadInt32("PetMaxHealth"); var petAuraCount = packet.ReadInt32("AuraCount"); for (int i = 0; i < petAuraCount; i++) { packet.ReadInt32("SpellId", i); packet.ReadByte("Scalings", i); packet.ReadInt32("EffectMask", i); var byte3 = packet.ReadInt32("EffectCount", i); for (int j = 0; j < byte3; j++) packet.ReadSingle("Scale", i, j); } packet.ResetBitReader(); var len = packet.ReadBits(8); packet.ReadWoWString("PetName", len); } }
public static void HandleAuthSession(Packet packet) { packet.ReadUInt64("DosResponse"); packet.ReadInt16E<ClientVersionBuild>("Build"); packet.ReadByte("BuildType"); packet.ReadUInt32("RegionID"); packet.ReadUInt32("BattlegroupID"); packet.ReadUInt32("RealmID"); packet.ReadBytes("LocalChallenge", 16); packet.ReadBytes("Digest", 24); packet.ReadBit("UseIPv6"); var realmJoinTicketSize = packet.ReadInt32(); packet.ReadBytes("RealmJoinTicket", realmJoinTicketSize); }
private static Aura ReadAuraUpdateBlock(Packet packet, int i) { var aura = new Aura { Slot = packet.ReadByte("Slot", i) }; var id = packet.ReadInt32<SpellId>("Spell ID", i); if (id <= 0) return null; aura.SpellId = (uint)id; if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_0_14333)) aura.AuraFlags = packet.ReadInt16E<AuraFlag>("Flags", i); else aura.AuraFlags = packet.ReadByteE<AuraFlag>("Flags", i); aura.Level = packet.ReadByte("Level", i); aura.Charges = packet.ReadByte("Charges", i); aura.CasterGuid = !aura.AuraFlags.HasAnyFlag(AuraFlag.NotCaster) ? packet.ReadPackedGuid("Caster GUID", i) : new WowGuid64(); if (aura.AuraFlags.HasAnyFlag(AuraFlag.Duration)) { aura.MaxDuration = packet.ReadInt32("Max Duration", i); aura.Duration = packet.ReadInt32("Duration", i); } else { aura.MaxDuration = 0; aura.Duration = 0; } if (aura.AuraFlags.HasAnyFlag(AuraFlag.Scalable)) { // This aura is scalable with level/talents // Here we show each effect value after scaling if (aura.AuraFlags.HasAnyFlag(AuraFlag.EffectIndex0)) packet.ReadInt32("Effect 0 Value", i); if (aura.AuraFlags.HasAnyFlag(AuraFlag.EffectIndex1)) packet.ReadInt32("Effect 1 Value", i); if (aura.AuraFlags.HasAnyFlag(AuraFlag.EffectIndex2)) packet.ReadInt32("Effect 2 Value", i); } packet.AddSniffData(StoreNameType.Spell, (int)aura.SpellId, "AURA_UPDATE"); return aura; }
public static void HandleAuthSession432(Packet packet) { var sha = new byte[20]; packet.ReadInt32("Int32"); sha[12] = packet.ReadByte(); packet.ReadInt32("Int32"); packet.ReadInt32("Int32"); sha[0] = packet.ReadByte(); sha[2] = packet.ReadByte(); sha[18] = packet.ReadByte(); sha[7] = packet.ReadByte(); sha[9] = packet.ReadByte(); sha[19] = packet.ReadByte(); sha[17] = packet.ReadByte(); sha[6] = packet.ReadByte(); sha[11] = packet.ReadByte(); packet.ReadInt16E<ClientVersionBuild>("Client Build"); sha[15] = packet.ReadByte(); packet.ReadInt64("Int64"); packet.ReadByte("Unk Byte"); packet.ReadByte("Unk Byte"); sha[3] = packet.ReadByte(); sha[10] = packet.ReadByte(); packet.ReadUInt32("Client Seed"); sha[16] = packet.ReadByte(); sha[4] = packet.ReadByte(); packet.ReadInt32("Int32"); sha[14] = packet.ReadByte(); sha[8] = packet.ReadByte(); sha[5] = packet.ReadByte(); sha[1] = packet.ReadByte(); sha[13] = packet.ReadByte(); var pkt = new Packet(packet.ReadBytes(packet.ReadInt32()), packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName); AddonHandler.ReadClientAddonsList(pkt); pkt.ClosePacket(false); var highBits = packet.ReadByte() << 5; var lowBits = packet.ReadByte() >> 3; var size = lowBits | highBits; packet.AddValue("Size", size); packet.AddValue("Account name", Encoding.UTF8.GetString(packet.ReadBytes(size))); packet.AddValue("Proof SHA-1 Hash", Utilities.ByteArrayToHexString(sha)); }
public static void HandleAuthSession505(Packet packet) { var sha = new byte[20]; packet.ReadUInt32("UInt32 2");//18 sha[2] = packet.ReadByte();//24 sha[15] = packet.ReadByte();//37 sha[12] = packet.ReadByte();//34 sha[11] = packet.ReadByte();//33 sha[10] = packet.ReadByte();//32 sha[9] = packet.ReadByte();//31 packet.ReadByte("Unk Byte");//20 packet.ReadUInt32("Client seed");//14 sha[16] = packet.ReadByte();//38 sha[5] = packet.ReadByte();//27 packet.ReadInt16E<ClientVersionBuild>("Client Build");//34 packet.ReadUInt32("UInt32 4");//16 sha[18] = packet.ReadByte();//40 sha[0] = packet.ReadByte();//22 sha[13] = packet.ReadByte();//35 sha[3] = packet.ReadByte();//25 sha[14] = packet.ReadByte();//36 packet.ReadByte("Unk Byte");//21 sha[8] = packet.ReadByte();//30 sha[7] = packet.ReadByte();//29 packet.ReadUInt32("UInt32 3");//15 sha[4] = packet.ReadByte();//26 packet.ReadInt64("Int64");//12,13 sha[17] = packet.ReadByte();//39 sha[19] = packet.ReadByte();//41 packet.ReadUInt32("UInt32 1");//4 sha[6] = packet.ReadByte();//28 sha[1] = packet.ReadByte();//23 var addons = new Packet(packet.ReadBytes(packet.ReadInt32()), packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName); AddonHandler.ReadClientAddonsList(addons); addons.ClosePacket(false); packet.ReadBit("Unk bit"); var size = (int)packet.ReadBits(12); packet.AddValue("Account name", Encoding.UTF8.GetString(packet.ReadBytes(size))); packet.AddValue("Proof SHA-1 Hash", Utilities.ByteArrayToHexString(sha)); }
public static void HandleAuthSession430(Packet packet) { packet.ReadInt32("Int32"); packet.ReadByte("Digest (1)"); packet.ReadInt64("Int64"); packet.ReadInt32("Int32"); packet.ReadByte("Digest (2)"); packet.ReadInt32("Int32"); packet.ReadByte("Digest (3)"); packet.ReadInt32("Int32"); for (var i = 0; i < 7; i++) packet.ReadByte("Digest (4)", i); packet.ReadInt16E<ClientVersionBuild>("Client Build"); for (var i = 0; i < 8; i++) packet.ReadByte("Digest (5)", i); packet.ReadByte("Unk Byte"); packet.ReadByte("Unk Byte"); packet.ReadUInt32("Client Seed"); for (var i = 0; i < 2; i++) packet.ReadByte("Digest (6)", i); var pkt = new Packet(packet.ReadBytes(packet.ReadInt32()), packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName); AddonHandler.ReadClientAddonsList(pkt); pkt.ClosePacket(false); packet.ReadByte("Mask"); // TODO: Seems to affect how the size is read var size = (packet.ReadByte() >> 4); packet.AddValue("Size", size); packet.AddValue("Account name", Encoding.UTF8.GetString(packet.ReadBytes(size))); }
public static void HandleAuthSession422(Packet packet) { packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadInt32("Int32"); packet.ReadInt32("Int32"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadInt16E<ClientVersionBuild>("Client Build"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadInt32("Int32"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadByte("Byte"); packet.ReadInt32("Int32"); packet.ReadByte("Byte"); packet.ReadInt32("Int32"); packet.ReadByte("Byte"); packet.ReadInt32("Int32"); packet.ReadByte("Byte"); packet.ReadInt32("Int32"); packet.ReadInt32("Int32"); packet.ReadCString("Account name"); packet.ReadInt32("Int32"); AddonHandler.ReadClientAddonsList(packet); }
public static void HandlePartyMemberStats(Packet packet) { packet.ReadBit("ForEnemy"); packet.ReadBit("FullUpdate"); var bit761 = packet.ReadBit("HasUnk761"); var bit790 = packet.ReadBit("HasStatus"); var bit763 = packet.ReadBit("HasPowerType"); var bit322 = packet.ReadBit("HasUnk322"); var bit28 = packet.ReadBit("HasCurrentHealth"); var bit316 = packet.ReadBit("HasMaxHealth"); var bit748 = packet.ReadBit("HasCurrentPower"); var bit766 = packet.ReadBit("HasMaxPower"); var bit752 = packet.ReadBit("HasLevel"); var bit326 = packet.ReadBit("HasUnk326"); var bit770 = packet.ReadBit("HasZoneId"); var bit756 = packet.ReadBit("HasUnk756"); var bit776 = packet.ReadBit("HasUnk776"); var bit786 = packet.ReadBit("HasPosition"); var bit20 = packet.ReadBit("HasVehicleSeat"); var bit308 = packet.ReadBit("HasAuras"); var bit736 = packet.ReadBit("HasPet"); var bit72 = packet.ReadBit("HasPhase"); packet.ReadPackedGuid128("MemberGuid"); if (bit761) { // sub_5FB6A9 for (int i = 0; i < 2; i++) packet.ReadByte("Unk761", i); } if (bit790) packet.ReadInt16E<GroupMemberStatusFlag>("Status"); if (bit763) packet.ReadByte("PowerType"); if (bit322) packet.ReadInt16("Unk322"); if (bit28) packet.ReadInt32("CurrentHealth"); if (bit316) packet.ReadInt32("MaxHealth"); if (bit748) packet.ReadInt16("CurrentPower"); if (bit766) packet.ReadInt16("MaxPower"); if (bit752) packet.ReadInt16("Level"); if (bit326) packet.ReadInt16("Unk200000"); if (bit770) packet.ReadInt16("ZoneId"); if (bit756) packet.ReadInt16("Unk2000000"); if (bit776) packet.ReadInt32("Unk4000000"); if (bit786) { // sub_626D9A packet.ReadInt16("PositionX"); packet.ReadInt16("PositionY"); packet.ReadInt16("PositionZ"); } if (bit20) packet.ReadInt32("VehicleSeat"); if (bit308) { // sub_618493 var count = packet.ReadInt32("AuraCount"); for (int i = 0; i < count; i++) { packet.ReadInt32("SpellId", i); packet.ReadByte("Scalings", i); packet.ReadInt32("EffectMask", i); var byte3 = packet.ReadInt32("EffectCount", i); for (int j = 0; j < byte3; j++) packet.ReadSingle("Scale", i, j); } } if (bit736) // Pet { // sub_618CF4 packet.ResetBitReader(); var bit16 = packet.ReadBit("HasPetGUID"); var bit153 = packet.ReadBit("HasPetName"); var bit156 = packet.ReadBit("HasPetModelId"); var bit164 = packet.ReadBit("HasPetCurrentHealth"); var bit172 = packet.ReadBit("HasPetMaxHealth"); var bit404 = packet.ReadBit("HasPetAuras"); if (bit16) packet.ReadPackedGuid128("PetGUID"); if (bit153) { // sub_5EA889 packet.ResetBitReader(); var len = packet.ReadBits(8); packet.ReadWoWString("PetName", len); } if (bit156) packet.ReadInt16("PetModelId"); if (bit164) packet.ReadInt32("PetCurrentHealth"); if (bit172) packet.ReadInt32("PetMaxHealth"); if (bit404) { var count = packet.ReadInt32("AuraCount"); for (int i = 0; i < count; i++) { packet.ReadInt32("SpellId", i); packet.ReadByte("Scalings", i); packet.ReadInt32("EffectMask", i); var byte3 = packet.ReadInt32("EffectCount", i); for (int j = 0; j < byte3; j++) packet.ReadSingle("Scale", i, j); } } } if (bit72) // Phase { // sub_61E155 packet.ReadInt32("PhaseShiftFlags"); var int4 = packet.ReadInt32("PhaseCount"); packet.ReadPackedGuid128("PersonalGUID"); for (int i = 0; i < int4; i++) { packet.ReadInt16("PhaseFlags", i); packet.ReadInt16("Id", i); } } }
public static void HandleAuthSession(Packet packet) { var sha = new byte[20]; packet.ReadUInt32("Grunt ServerId"); packet.ReadInt16E<ClientVersionBuild>("Client Build"); packet.ReadUInt32("Region"); packet.ReadUInt32("Battlegroup"); packet.ReadUInt32("RealmIndex"); packet.ReadByte("Login Server Type"); packet.ReadByte("Unk"); packet.ReadUInt32("Client Seed"); packet.ReadUInt64("DosResponse"); for (uint i = 0; i < 20; ++i) sha[i] = packet.ReadByte(); var accountNameLength = packet.ReadBits("Account Name Length", 11); packet.ResetBitReader(); packet.ReadWoWString("Account Name", accountNameLength); packet.ReadBit("UseIPv6"); var addonSize = packet.ReadInt32("Addons Size"); if (addonSize > 0) { var addons = new Packet(packet.ReadBytes(addonSize), packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName); CoreParsers.AddonHandler.ReadClientAddonsList(addons); addons.ClosePacket(false); } packet.AddValue("Proof SHA-1 Hash", Utilities.ByteArrayToHexString(sha)); }
public static void HandleGMMessageChat(Packet packet) { var type = packet.ReadByteE<ChatMessageType>("Type"); packet.ReadInt32E<Language>("Language"); packet.ReadGuid("GUID 1"); packet.ReadInt32("Constant time"); packet.ReadInt32("GM Name Length"); packet.ReadCString("GM Name"); packet.ReadGuid("GUID 2"); packet.ReadInt32("Message Length"); packet.ReadCString("Message"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V5_1_0_16309)) packet.ReadInt16E<ChatTag>("Chat Tag"); else packet.ReadByteE<ChatTag>("Chat Tag"); if (type == ChatMessageType.Achievement || type == ChatMessageType.GuildAchievement) packet.ReadInt32<AchievementId>("Achievement Id"); }
public static void HandleAuthSession624(Packet packet) { packet.ReadInt16E<ClientVersionBuild>("Build"); packet.ReadByte("BuildType"); packet.ReadUInt32("RegionID"); packet.ReadUInt32("BattlegroupID"); packet.ReadUInt32("RealmID"); packet.ReadBytes("LocalChallenge", 16); packet.ReadBytes("Digest", 24); packet.ReadUInt64("DosResponse"); var addonSize = packet.ReadInt32(); if (addonSize > 0) { var addons = new Packet(packet.ReadBytes(addonSize), packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName); CoreParsers.AddonHandler.ReadClientAddonsList(addons); addons.ClosePacket(false); } var realmJoinTicketSize = packet.ReadInt32(); packet.ReadBytes("RealmJoinTicket", realmJoinTicketSize); packet.ReadBit("UseIPv6"); }
public static void HandleServerChatMessage(Packet packet) { var text = new CreatureText { Type = packet.ReadByteE<ChatMessageType>("Type"), Language = packet.ReadInt32E<Language>("Language"), SenderGUID = packet.ReadGuid("GUID") }; packet.ReadInt32("Constant time"); switch (text.Type) { case ChatMessageType.Channel: { packet.ReadCString("Channel Name"); goto case ChatMessageType.Say; } case ChatMessageType.Say: case ChatMessageType.Yell: case ChatMessageType.Party: case ChatMessageType.PartyLeader: case ChatMessageType.Raid: case ChatMessageType.RaidLeader: case ChatMessageType.RaidWarning: case ChatMessageType.Guild: case ChatMessageType.Officer: case ChatMessageType.Emote: case ChatMessageType.TextEmote: case ChatMessageType.Whisper: case ChatMessageType.WhisperInform: case ChatMessageType.System: case ChatMessageType.Battleground: case ChatMessageType.BattlegroundLeader: case ChatMessageType.Achievement: case ChatMessageType.GuildAchievement: case ChatMessageType.Restricted: case ChatMessageType.Dnd: case ChatMessageType.Afk: case ChatMessageType.Ignored: { packet.ReadGuid("Sender GUID"); break; } case ChatMessageType.BattlegroundNeutral: case ChatMessageType.BattlegroundAlliance: case ChatMessageType.BattlegroundHorde: { var target = packet.ReadGuid("Sender GUID"); switch (target.GetHighType()) { case HighGuidType.Creature: case HighGuidType.Vehicle: case HighGuidType.GameObject: case HighGuidType.Transport: case HighGuidType.Pet: packet.ReadInt32("Sender Name Length"); packet.ReadCString("Sender Name"); break; } break; } case ChatMessageType.MonsterSay: case ChatMessageType.MonsterYell: case ChatMessageType.MonsterParty: case ChatMessageType.MonsterEmote: case ChatMessageType.MonsterWhisper: case ChatMessageType.RaidBossEmote: case ChatMessageType.RaidBossWhisper: case ChatMessageType.BattleNet: { packet.ReadInt32("Name Length"); text.SenderName = packet.ReadCString("Name"); text.ReceiverGUID = packet.ReadGuid("Receiver GUID"); switch (text.ReceiverGUID.GetHighType()) { case HighGuidType.Creature: case HighGuidType.Vehicle: case HighGuidType.GameObject: case HighGuidType.Transport: packet.ReadInt32("Receiver Name Length"); text.ReceiverName = packet.ReadCString("Receiver Name"); break; } break; } } if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_1_0_13914) && text.Language == Language.Addon) packet.ReadCString("Addon Message Prefix"); packet.ReadInt32("Text Length"); text.Text = packet.ReadCString("Text"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V5_1_0_16309)) packet.ReadInt16E<ChatTag>("Chat Tag"); else packet.ReadByteE<ChatTag>("Chat Tag"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_0_14333)) { if (text.Type == ChatMessageType.RaidBossEmote || text.Type == ChatMessageType.RaidBossWhisper) { packet.ReadSingle("Unk single"); packet.ReadByte("Unk byte"); } } if (text.Type == ChatMessageType.Achievement || text.Type == ChatMessageType.GuildAchievement) packet.ReadInt32<AchievementId>("Achievement Id"); uint entry = 0; if (text.SenderGUID.GetObjectType() == ObjectType.Unit) entry = text.SenderGUID.GetEntry(); else if (text.ReceiverGUID != null && text.ReceiverGUID.GetObjectType() == ObjectType.Unit) entry = text.ReceiverGUID.GetEntry(); if (entry != 0) Storage.CreatureTexts.Add(entry, text, packet.TimeSpan); }
private static MovementInfo ReadMovementInfoGen(Packet packet, WowGuid guid, object index) { var info = new MovementInfo { Flags = packet.ReadInt32E<MovementFlag>("Movement Flags", index) }; if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_2_9056)) info.FlagsExtra = packet.ReadInt16E<MovementFlagExtra>("Extra Movement Flags", index); else info.FlagsExtra = packet.ReadByteE<MovementFlagExtra>("Extra Movement Flags", index); if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545)) if (packet.ReadGuid("GUID 2", index) != guid) throw new InvalidDataException("Guids are not equal."); packet.ReadInt32("Time", index); info.Position = packet.ReadVector3("Position", index); info.Orientation = packet.ReadSingle("Orientation", index); if (info.Flags.HasAnyFlag(MovementFlag.OnTransport)) { if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_1_0_9767)) info.TransportGuid = packet.ReadPackedGuid("Transport GUID", index); else info.TransportGuid = packet.ReadGuid("Transport GUID", index); info.TransportOffset = packet.ReadVector4("Transport Position", index); packet.ReadInt32("Transport Time", index); if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)) packet.ReadByte("Transport Seat", index); if (info.FlagsExtra.HasAnyFlag(MovementFlagExtra.InterpolateMove)) packet.ReadInt32("Transport Time", index); } if (info.Flags.HasAnyFlag(MovementFlag.Swimming | MovementFlag.Flying) || info.FlagsExtra.HasAnyFlag(MovementFlagExtra.AlwaysAllowPitching)) packet.ReadSingle("Swim Pitch", index); if (ClientVersion.AddedInVersion(ClientType.Cataclysm)) { if (info.FlagsExtra.HasAnyFlag(MovementFlagExtra.InterpolateTurning)) { packet.ReadInt32("Fall Time", index); packet.ReadSingle("Fall Velocity", index); if (info.Flags.HasAnyFlag(MovementFlag.Falling)) { packet.ReadSingle("Fall Sin Angle", index); packet.ReadSingle("Fall Cos Angle", index); packet.ReadSingle("Fall Speed", index); } } } else { packet.ReadInt32("Fall Time", index); if (info.Flags.HasAnyFlag(MovementFlag.Falling)) { packet.ReadSingle("Fall Velocity", index); packet.ReadSingle("Fall Sin Angle", index); packet.ReadSingle("Fall Cos Angle", index); packet.ReadSingle("Fall Speed", index); } } // HACK: "generic" movement flags are wrong for 4.2.2 if (info.Flags.HasAnyFlag(MovementFlag.SplineElevation) && ClientVersion.Build != ClientVersionBuild.V4_2_2_14545) packet.ReadSingle("Spline Elevation", index); return info; }
public static void HandlePartyMemberStats(Packet packet) { if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing) && packet.Opcode == Opcodes.GetOpcode(Opcode.SMSG_PARTY_MEMBER_STATS_FULL, Direction.ServerToClient)) packet.ReadBool("Add arena opponent"); packet.ReadPackedGuid("GUID"); var updateFlags = packet.ReadUInt32E<GroupUpdateFlag>("Update Flags"); if (updateFlags.HasFlag(GroupUpdateFlag.Status)) packet.ReadInt16E<GroupMemberStatusFlag>("Status"); if (updateFlags.HasFlag(GroupUpdateFlag.CurrentHealth)) { if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)) packet.ReadInt32("Current Health"); else packet.ReadUInt16("Current Health"); } if (updateFlags.HasFlag(GroupUpdateFlag.MaxHealth)) { if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)) packet.ReadInt32("Max Health"); else packet.ReadUInt16("Max Health"); } if (updateFlags.HasFlag(GroupUpdateFlag.PowerType)) packet.ReadByteE<PowerType>("Power type"); if (updateFlags.HasFlag(GroupUpdateFlag.CurrentPower)) packet.ReadInt16("Current Power"); if (updateFlags.HasFlag(GroupUpdateFlag.MaxPower)) packet.ReadInt16("Max Power"); if (updateFlags.HasFlag(GroupUpdateFlag.Level)) packet.ReadInt16("Level"); if (updateFlags.HasFlag(GroupUpdateFlag.Zone)) packet.ReadInt16<ZoneId>("Zone Id"); if (updateFlags.HasFlag(GroupUpdateFlag.Position)) { packet.ReadInt16("Position X"); packet.ReadInt16("Position Y"); } if (updateFlags.HasFlag(GroupUpdateFlag.Auras)) { var auraMask = packet.ReadUInt64("Aura Mask"); var maxAura = ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing) ? 64 : 56; for (var i = 0; i < maxAura; ++i) { if ((auraMask & (1ul << i)) == 0) continue; if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)) packet.ReadUInt32<SpellId>("Spell Id", i); else packet.ReadUInt16<SpellId>("Spell Id", i); packet.ReadByteE<AuraFlag>("Aura Flags", i); } } if (updateFlags.HasFlag(GroupUpdateFlag.PetGuid)) packet.ReadGuid("Pet GUID"); if (updateFlags.HasFlag(GroupUpdateFlag.PetName)) packet.ReadCString("Pet Name"); if (updateFlags.HasFlag(GroupUpdateFlag.PetModelId)) packet.ReadInt16("Pet Modelid"); if (updateFlags.HasFlag(GroupUpdateFlag.PetCurrentHealth)) { if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)) packet.ReadInt32("Pet Current Health"); else packet.ReadUInt16("Pet Current Health"); } if (updateFlags.HasFlag(GroupUpdateFlag.PetMaxHealth)) { if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)) packet.ReadInt32("Pet Max Health"); else packet.ReadUInt16("Pet Max Health"); } if (updateFlags.HasFlag(GroupUpdateFlag.PetPowerType)) packet.ReadByteE<PowerType>("Pet Power type"); if (updateFlags.HasFlag(GroupUpdateFlag.PetCurrentPower)) packet.ReadInt16("Pet Current Power"); if (updateFlags.HasFlag(GroupUpdateFlag.PetMaxPower)) packet.ReadInt16("Pet Max Power"); if (updateFlags.HasFlag(GroupUpdateFlag.PetAuras)) { var auraMask = packet.ReadUInt64("Pet Auramask"); var maxAura = ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing) ? 64 : 56; for (var i = 0; i < maxAura; ++i) { if ((auraMask & (1ul << i)) == 0) continue; if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)) packet.ReadUInt32<SpellId>("Spell Id", i); else packet.ReadUInt16<SpellId>("Spell Id", i); packet.ReadByteE<AuraFlag>("Aura Flags", i); } } if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing) && // no idea when this was added exactly, doesn't exist in 2.4.1 updateFlags.HasFlag(GroupUpdateFlag.VehicleSeat)) packet.ReadInt32("Vehicle Seat"); }
public static void HandleSpellFailure(Packet packet) { packet.ReadPackedGuid128("CasterUnit"); packet.ReadByte("CastID"); packet.ReadUInt32<SpellId>("SpellID"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V6_2_0_20173)) packet.ReadInt32("SpellXSpellVisualID"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V6_1_0_19678)) packet.ReadInt16E<SpellCastFailureReason>("Reason"); else packet.ReadByteE<SpellCastFailureReason>("Reason"); }
public static void HandlePartyMemberStats(Packet packet) { packet.ReadBit("ForEnemy"); packet.ReadBit("FullUpdate"); var bit761 = packet.ReadBit("HasPartyType"); var bit790 = packet.ReadBit("HasStatus"); var bit763 = packet.ReadBit("HasPowerType"); var bit322 = packet.ReadBit("HasSpec"); var bit28 = packet.ReadBit("HasHealth"); var bit316 = packet.ReadBit("HasMaxHealth"); var bit748 = packet.ReadBit("HasPower"); var bit766 = packet.ReadBit("HasMaxPower"); var bit752 = packet.ReadBit("HasLevel"); var bit326 = packet.ReadBit("HasSpec"); var bit770 = packet.ReadBit("HasAreaId"); var bit756 = packet.ReadBit("HasWmoGroupID"); var bit776 = packet.ReadBit("HasWmoDoodadPlacementID"); var bit786 = packet.ReadBit("HasPosition"); var bit20 = packet.ReadBit("HasVehicleSeatRecID"); var bit308 = packet.ReadBit("HasAuras"); var bit736 = packet.ReadBit("HasPet"); var bit72 = packet.ReadBit("HasPhase"); packet.ReadPackedGuid128("MemberGuid"); if (bit761) { // sub_5FB6A9 for (int i = 0; i < 2; i++) packet.ReadByte("PartyType", i); } if (bit790) packet.ReadInt16E<GroupMemberStatusFlag>("Flags"); if (bit763) packet.ReadByte("DisplayPower"); if (bit322) packet.ReadInt16("OverrideDisplayPower"); if (bit28) packet.ReadInt32("Health"); if (bit316) packet.ReadInt32("MaxHealth"); if (bit748) packet.ReadInt16("Power"); if (bit766) packet.ReadInt16("MaxPower"); if (bit752) packet.ReadInt16("Level"); if (bit326) packet.ReadInt16("Spec"); if (bit770) packet.ReadInt16("AreaID"); if (bit756) packet.ReadInt16("WmoGroupID"); if (bit776) packet.ReadInt32("WmoDoodadPlacementID"); if (bit786) { // sub_626D9A packet.ReadInt16("PositionX"); packet.ReadInt16("PositionY"); packet.ReadInt16("PositionZ"); } if (bit20) packet.ReadInt32("VehicleSeatRecID"); if (bit308) { // sub_618493 var count = packet.ReadInt32("AuraCount"); for (int i = 0; i < count; i++) { packet.ReadInt32<SpellId>("Aura", i); packet.ReadByte("Flags", i); packet.ReadInt32("ActiveFlags", i); var byte3 = packet.ReadInt32("PointsCount", i); for (int j = 0; j < byte3; j++) packet.ReadSingle("Points", i, j); } } if (bit736) // Pet { // sub_618CF4 packet.ResetBitReader(); var bit16 = packet.ReadBit("HasPetGUID"); var bit153 = packet.ReadBit("HasPetName"); var bit156 = packet.ReadBit("HasPetModelId"); var bit164 = packet.ReadBit("HasPetCurrentHealth"); var bit172 = packet.ReadBit("HasPetMaxHealth"); var bit404 = packet.ReadBit("HasPetAuras"); if (bit16) packet.ReadPackedGuid128("PetGUID"); if (bit153) { // sub_5EA889 packet.ResetBitReader(); var len = packet.ReadBits(8); packet.ReadWoWString("PetName", len); } if (bit156) packet.ReadInt16("PetDisplayID"); if (bit164) packet.ReadInt32("PetHealth"); if (bit172) packet.ReadInt32("PetMaxHealth"); if (bit404) { var count = packet.ReadInt32("PetAuraCount"); for (int i = 0; i < count; i++) { packet.ReadInt32<SpellId>("PetAura", i); packet.ReadByte("PetFlags", i); packet.ReadInt32("PetActiveFlags", i); var byte3 = packet.ReadInt32("PetPointsCount", i); for (int j = 0; j < byte3; j++) packet.ReadSingle("PetPoints", i, j); } } } if (bit72) // Phase { // sub_61E155 packet.ReadInt32("PhaseShiftFlags"); var int4 = packet.ReadInt32("PhaseCount"); packet.ReadPackedGuid128("PersonalGUID"); for (int i = 0; i < int4; i++) { packet.ReadInt16("PhaseFlags", i); packet.ReadInt16("Id", i); } } }