public static void HandleAuctionListItems(Packet packet) { packet.ReadInt32("Offset"); packet.ReadPackedGuid128("Auctioneer"); packet.ReadByte("MinLevel"); packet.ReadByte("MaxLevel"); packet.ReadInt32("InvType"); packet.ReadInt32("ItemClass"); packet.ReadInt32("ItemSubclass"); packet.ReadInt32("Quality"); var sort = packet.ReadByte("SortCount"); packet.ResetBitReader(); var len = packet.ReadBits(8); packet.ReadWoWString("Name", len); packet.ReadBit("OnlyUsable"); packet.ReadBit("ExactMatch"); var size = packet.ReadInt32("DataSize"); var data = packet.ReadBytes(size); var sorts = new Packet(data, packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName); for (var i = 0; i < sort; ++i) { sorts.ReadByte("UnkByte1", i); sorts.ReadByte("UnkByte2", i); } }
public static void HandleAuthResponse434(Packet packet) { var isQueued = packet.ReadBit(); var hasAccountInfo = packet.ReadBit(); if (isQueued) { var unkByte = packet.ReadByte(); packet.WriteLine("Unk Byte: " + unkByte); var position = packet.ReadInt32(); packet.WriteLine("Queue Position: " + position); } if (hasAccountInfo) { packet.ReadInt32("Billing Time Remaining"); packet.ReadEnum<ClientType>("Account Expansion", TypeCode.Byte); packet.ReadInt32("Unknown UInt32"); packet.ReadEnum<ClientType>("Player Expansion", TypeCode.Byte); packet.ReadInt32("Billing Time Rested"); packet.ReadEnum<BillingFlag>("Billing Flags", TypeCode.Byte); } var code = (ResponseCode)packet.ReadByte(); packet.WriteLine("Auth Code: " + code); }
public static void HandleAutoStoreBagItem(Packet packet) { packet.ReadSByte("SrcBag"); packet.ReadSByte("DstBag"); packet.ReadByte("SrcSlot"); packet.ReadByte("unk"); }
public static void HandleArenaTeamRoster(Packet packet) { packet.ReadUInt32("Team Id"); var unk = packet.ReadByte("Unk Byte"); var count = packet.ReadUInt32("Member count"); packet.ReadUInt32("Type"); for (var i = 0; i < count; i++) { packet.ReadGuid(" GUID", i); packet.ReadBoolean("Online", i); packet.ReadCString("Name", i); packet.ReadUInt32("Captain", i); packet.ReadByte("Level", i); packet.ReadByte("Class", i); packet.ReadUInt32("Week Games", i); packet.ReadUInt32("Week Win", i); packet.ReadUInt32("Seasonal Games", i); packet.ReadUInt32("Seasonal Wins", i); packet.ReadUInt32("Personal Rating", i); if (unk > 0) { packet.ReadSingle("Unk float 1", i); packet.ReadSingle("Unk float 2", i); } } }
public static void HandleCoded(Packet packet) { packet.AsHex(); var select = packet.ReadInt32("select"); switch(select) { case 2: case 3: case 4: packet.ReadPackedGuid("Guid"); packet.ReadByte("unk"); break; case 1: case 9: case 10: break; case 7: packet.ReadByte("unk1"); packet.ReadByte("unk2"); break; case 0: case 5: case 6: case 8: packet.ReadByte("unk"); break; } }
public static void HandleServerAddonInfo547(Packet packet) { var AddonsCount = packet.ReadBits("Addons Count", 23); uint[,] AddonsInfo = new uint[AddonsCount, 4]; for (var i = 0; i < AddonsCount; ++i) { AddonsInfo[i, 0] = packet.ReadBit("Use CRC", i); AddonsInfo[i, 2] = packet.ReadBit("Has URL", i); AddonsInfo[i, 1] = packet.ReadBit("Has Public Key", i); if (AddonsInfo[i, 2] == 1) { AddonsInfo[i, 3] = packet.ReadBits(8); } else { AddonsInfo[i, 3] = 0; } } var BannedAddonsCount = packet.ReadBits("Banned Addons Count",18); for (var i = 0; i < AddonsCount; ++i) { if (AddonsInfo[i, 1] == 1) { packet.ReadBytes(256); // the bytes order isn't 1,2,3,4.. they are mangled } if (AddonsInfo[i, 0] == 1) { packet.ReadUInt32("CRC Summ", i); packet.ReadByte("Unk Byte1", i); } packet.ReadByte("Addon State", i); if (AddonsInfo[i, 2] == 1 && AddonsInfo[i, 3] > 0) { packet.ReadWoWString("URL path", AddonsInfo[i, 3], i); } } for (var i = 0; i < BannedAddonsCount; ++i) { var NameMD5 = new byte[16]; var VersionMD5 = new byte[16]; for (uint j = 0; j < 16; j += 4) { Array.Copy(packet.ReadBytes(4), 0, NameMD5, j, 4); Array.Copy(packet.ReadBytes(4), 0, VersionMD5, j, 4); } packet.ReadUInt32("ID", i); packet.ReadUInt32("Timestamp", i); packet.ReadUInt32("Banned", i); } }
public static void HandleAutoStoreBagItem(Packet packet) { packet.ReadByte("Slot"); // 16 packet.ReadByte("unk36"); // 36 packet.ReadSByte("Bag"); // 17 var bits14 = (int)packet.ReadBits(2); var hasSlot = new bool[bits14]; var hasBag = new bool[bits14]; for (var i = 0; i < bits14; i++) { hasBag[i] = !packet.ReadBit(); // 96 hasSlot[i] = !packet.ReadBit(); // 97 } for (var i = 0; i < bits14; i++) { if (hasSlot[i]) packet.ReadByte("Slot", i); if (hasBag[i]) packet.ReadSByte("Bag", i); } }
public static void HandleArenaTeamRoster(Packet packet) { packet.ReadUInt32("Team Id"); var unk = packet.ReadByte("Unk Byte"); var count = packet.ReadUInt32("Member count"); packet.ReadUInt32("Type"); for (var i = 0; i < count; i++) { packet.ReadGuid("[" + i + "] GUID"); packet.ReadBoolean("[" + i + "] Online"); packet.ReadCString("[" + i + "] Name"); packet.ReadUInt32("[" + i + "] Captain"); packet.ReadByte("[" + i + "] Level"); packet.ReadByte("[" + i + "] Class"); packet.ReadUInt32("[" + i + "] Week Games"); packet.ReadUInt32("[" + i + "] Week Win"); packet.ReadUInt32("[" + i + "] Seasonal Games"); packet.ReadUInt32("[" + i + "] Seasonal Wins"); packet.ReadUInt32("[" + i + "] Personal Rating"); if (unk > 0) { packet.ReadSingle("[" + i + "] Unk float 1"); packet.ReadSingle("[" + i + "] Unk float 2"); } } }
public static void HandleCalendarSendEvent(Packet packet) { packet.ReadByte("EventType"); packet.ReadPackedGuid128("OwnerGUID"); packet.ReadInt64("EventID"); packet.ReadByte("GetEventType"); packet.ReadInt32("TextureID"); packet.ReadUInt32("Flags"); packet.ReadUInt32("Date"); packet.ReadUInt32("LockDate"); packet.ReadPackedGuid128("EventGuildID"); var inviteCount = packet.ReadInt32("InviteCount"); packet.ResetBitReader(); var lenEventName = packet.ReadBits(8); var lenDescription = packet.ReadBits(11); packet.ResetBitReader(); for (int i = 0; i < inviteCount; i++) V6_0_2_19033.Parsers.CalendarHandler.ReadCalendarEventInviteInfo(packet, "Invites", i); packet.ReadWoWString("EventName", lenEventName); packet.ReadWoWString("Description", lenDescription); }
public static void HandleGroupAssignment(Packet packet) { var guid = new byte[8]; packet.ReadByte("Byte12"); packet.ReadByte("Byte10"); guid[0] = packet.ReadBit(); guid[5] = packet.ReadBit(); guid[6] = packet.ReadBit(); guid[7] = packet.ReadBit(); guid[3] = packet.ReadBit(); guid[1] = packet.ReadBit(); guid[2] = packet.ReadBit(); var bit11 = packet.ReadBit(); guid[4] = packet.ReadBit(); packet.ReadXORByte(guid, 4); packet.ReadXORByte(guid, 3); packet.ReadXORByte(guid, 1); packet.ReadXORByte(guid, 5); packet.ReadXORByte(guid, 2); packet.ReadXORByte(guid, 6); packet.ReadXORByte(guid, 7); packet.ReadXORByte(guid, 0); packet.WriteGuid("Guid", guid); }
public static void HandleAuraCastLog(Packet packet) { packet.ReadPackedGuid("Target GUID"); packet.ReadPackedGuid("Caster GUID"); packet.ReadEntryWithName<Int32>(StoreNameType.Spell, "Spell ID"); packet.ReadUInt32("Count"); var aura = packet.ReadEnum<AuraType>("Aura Type", TypeCode.UInt32); switch (aura) { case AuraType.PeriodicDamage: case AuraType.PeriodicDamagePercent: { packet.ReadUInt32("Damage"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_2_9056)) packet.ReadUInt32("Over damage"); packet.ReadUInt32("Spell Proto"); packet.ReadUInt32("Absorb"); packet.ReadUInt32("Resist"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_1_2_9901)) packet.ReadByte("Critical"); break; } case AuraType.PeriodicHeal: case AuraType.ObsModHealth: { packet.ReadUInt32("Damage"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_2_9056)) packet.ReadUInt32("Over damage"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3_11685)) // no idea when this was added exactly packet.ReadUInt32("Absorb"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_1_2_9901)) packet.ReadByte("Critical"); break; } case AuraType.ObsModPower: case AuraType.PeriodicEnergize: { packet.ReadEnum<PowerType>("Power type", TypeCode.Int32); packet.ReadUInt32("Amount"); break; } case AuraType.PeriodicManaLeech: { packet.ReadEnum<PowerType>("Power type", TypeCode.Int32); packet.ReadUInt32("Amount"); packet.ReadSingle("Gain multiplier"); break; } } }
public static void HandleUseItem(Packet packet) { packet.ReadByte("PackSlot"); packet.ReadByte("Slot"); packet.ReadPackedGuid128("CastItem"); SpellHandler.ReadSpellCastRequest(packet, "Cast"); }
public static void HandleMailListResult(Packet packet) { packet.ReadUInt32("Total Mails"); var count = packet.ReadByte("Shown Mails"); for (var i = 0; i < count; ++i) { packet.ReadUInt16("Message Size", i); packet.ReadUInt32("Mail Id", i); var mailType = packet.ReadEnum<MailType>("Message Type", TypeCode.Byte, i); switch (mailType) // Read GUID if MailType.Normal, int32 (entry) if not { case MailType.Normal: packet.ReadGuid("Player GUID", i); break; case MailType.Creature: packet.Writer.WriteLine("[" + i + "] Entry: " + StoreGetters.GetExistingDatabaseString(StoreNameType.Unit, packet.ReadInt32())); break; case MailType.GameObject: packet.Writer.WriteLine("[" + i + "] Entry: " + StoreGetters.GetExistingDatabaseString(StoreNameType.GameObject, packet.ReadInt32())); break; case MailType.Item: packet.Writer.WriteLine("[" + i + "] Entry: " + StoreGetters.GetExistingDatabaseString(StoreNameType.Item, packet.ReadInt32())); break; default: packet.ReadInt32("Entry", i); break; } packet.ReadUInt32("COD", i); packet.ReadUInt32("Unk uint32", i); packet.ReadUInt32("Stationery", i); packet.ReadUInt32("Money", i); packet.ReadUInt32("Flags", i); packet.ReadSingle("Time?", i); packet.ReadUInt32("Template Id", i); packet.ReadCString("Subject", i); packet.ReadCString("Body", i); var items = packet.ReadByte("Item Count", i); for (var j = 0; j < items; ++j) { packet.ReadByte("Item Index", i, j); packet.ReadUInt32("Item GuidLow", i, j); packet.ReadEntryWithName<UInt32>(StoreNameType.Item, "Item Id", i, j); for (var k = 0; k < 7; ++k) { packet.ReadUInt32("Item Enchantment Id", i, j, k); packet.ReadUInt32("Item Enchantment Duration", i, j, k); packet.ReadUInt32("Item Enchantment Charges", i, j, k); } packet.ReadInt32("Item Random Property Id", i, j); packet.ReadUInt32("Item Suffix Factor", i, j); packet.ReadUInt32("Item Count", i, j); packet.ReadUInt32("Item SpellCharges", i, j); packet.ReadUInt32("Item Max Durability", i, j); packet.ReadUInt32("Item Durability", i, j); packet.ReadByte("Unk byte", i, j); } } }
public static void HandlePetAction(Packet packet) { packet.ReadPackedGuid128("PetGUID"); var action = (uint)packet.ReadUInt16() + (packet.ReadByte() << 16); packet.AddValue("Action", action); packet.ReadByte("Slot"); packet.ReadPackedGuid128("TargetGUID"); packet.ReadVector3("ActionPosition"); }
public static void HandleAuraPointsDepleted(Packet packet) { var guid = packet.StartBitStream(2, 4, 0, 3, 6, 7, 5, 1); packet.ParseBitStream(guid, 1, 3, 5); packet.ReadByte("unk24"); // 24 packet.ParseBitStream(guid, 0, 2, 7, 6, 4); packet.ReadByte("unk25"); // 25 packet.WriteGuid("Guid", guid); }
public static void HandleInstanceLockWarningQuery(Packet packet) { packet.ReadInt32("Time"); packet.ReadInt32("Encounters Completed Mask"); packet.ReadByte("Extending"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545)) // guessing packet.ReadByte("Unk2"); // events it throws: 1 : INSTANCE_LOCK_WARNING 0 : INSTANCE_LOCK_STOP / INSTANCE_LOCK_START }
public static void HandleServerWardenData(Packet packet) { var opcode = packet.ReadEnum<WardenServerOpcode>("Warden Server Opcode", TypeCode.Byte); packet.SetPosition(0); switch (opcode) { case WardenServerOpcode.ModuleInfo: { packet.ReadByte(); packet.ReadBytes("Module MD5", 16); packet.ReadBytes("Module RC4", 16); packet.ReadUInt32("Module Length"); break; } case WardenServerOpcode.ModuleChunk: { packet.ReadByte(); var length = packet.ReadUInt16("Chunk Length"); packet.ReadBytes("Module Chunk", length); break; } case WardenServerOpcode.CheatChecks: { packet.ReadByte(); byte length; while ((length = packet.ReadByte()) != 0) { packet.ReadBytes("String", length); } // var rest = (int)(packet.GetLength() - packet.GetPosition()); break; } case WardenServerOpcode.Data: { while (packet.CanRead()) { packet.ReadByte(); var length = packet.ReadUInt16("Data Length"); packet.ReadInt32("Data Checksum"); packet.ReadBytes("Data", length); } break; } case WardenServerOpcode.Seed: { packet.ReadByte(); packet.ReadBytes("Seed", 16); break; } } }
public static void HandleServerAddonsList(Packet packet) { var bits20 = (int)packet.ReadBits(23); var bit3 = new bool[bits20]; var usePublicKey = new bool[bits20]; var bits0 = new uint[bits20]; var bit1 = new bool[bits20]; for (var i = 0; i < bits20; i++) { bit3[i] = packet.ReadBit(); usePublicKey[i] = packet.ReadBit(); if (bit3[i]) bits0[i] = packet.ReadBits(8); bit1[i] = packet.ReadBit(); } var bits10 = (int)packet.ReadBits(18); for (var i = 0; i < bits20; i++) { if (bit3[i]) packet.ReadWoWString("Addon URL File", bits0[i], i); if (usePublicKey[i]) { var pubKey = packet.ReadBytes(256); packet.WriteLine("[{0}] Name MD5: {1}", i, Utilities.ByteArrayToHexString(pubKey)); } if (bit1[i]) { packet.ReadByte("Byte24", i); packet.ReadInt32("Int24", i); } packet.ReadByte("Addon State", i); } for (var i = 0; i < bits10; i++) { packet.ReadInt32("Int14", i); packet.ReadInt32("IntED", i); for (var j = 0; j < 4; j++) { packet.ReadInt32("IntED", i, j); packet.ReadInt32("Int14", i, j); } packet.ReadInt32("IntED", i); } }
public static void HandleLfgJoinResult(Packet packet) { var guid = new byte[8]; guid[7] = packet.ReadBit(); guid[6] = packet.ReadBit(); guid[3] = packet.ReadBit(); guid[0] = packet.ReadBit(); var count40 = packet.ReadBits("count40", 22); var guids = new byte[count40][]; var unk52 = new uint[count40]; for (var i = 0; i < count40; i++) { guids[i] = new byte[8]; guids[i][3] = packet.ReadBit(); unk52[i] = packet.ReadBits("unk52", 20, i); guids[i][6] = packet.ReadBit(); guids[i][1] = packet.ReadBit(); guids[i][4] = packet.ReadBit(); guids[i][7] = packet.ReadBit(); guids[i][2] = packet.ReadBit(); guids[i][0] = packet.ReadBit(); guids[i][5] = packet.ReadBit(); } guid[5] = packet.ReadBit(); guid[1] = packet.ReadBit(); guid[4] = packet.ReadBit(); guid[2] = packet.ReadBit(); packet.ReadByte("unk56"); // 56 for (var i = 0; i < count40; i++) { packet.ParseBitStream(guids[i], 4); for (var j = 0; j < unk52[i]; j++) { packet.ReadInt32("unk68", i); // 68 packet.ReadInt32("unk64", i); // 64 packet.ReadInt32("unk60", i); // 60 packet.ReadInt32("unk56", i); // 56 } packet.ParseBitStream(guids[i], 1, 0, 5, 7, 3, 6, 2); packet.WriteGuid("Guids", guids[i], i); } packet.ReadByte("unk57"); // 57 packet.ParseBitStream(guid, 2); packet.ReadInt32("unk32"); // 32 packet.ReadInt32("unk24"); // 24 packet.ReadInt32("unk28"); // 28 packet.ParseBitStream(guid, 6, 4, 1, 0, 5, 7, 3); packet.WriteGuid("Guid", guid); }
public static void HandleBuyItemInSlot(Packet packet) { packet.ReadGuid("Vendor GUID"); packet.ReadEntryWithName<UInt32>(StoreNameType.Item, "Entry"); packet.ReadUInt32("Slot"); packet.ReadUInt32("Count"); packet.ReadGuid("Bag GUID"); packet.ReadByte("Bag Slot"); packet.ReadByte("Count"); }
public static void HandleBuyItemInSlot(Packet packet) { packet.ReadGuid("Vendor GUID"); packet.ReadUInt32("Item ID"); packet.ReadUInt32("Slot"); packet.ReadUInt32("Count"); packet.ReadGuid("Bag GUID"); packet.ReadByte("Bag Slot"); packet.ReadByte("Count"); }
public static void HandleArenaTeamEvent(Packet packet) { packet.ReadByte("Event"); // FIXME: Use enum var count = packet.ReadByte("Count"); for (var i = 0; i < count; ++i) packet.ReadCString("Param", i); if (packet.CanRead()) packet.ReadGuid("GUID"); }
public static void HandleUseEquipmentSet(Packet packet) { ItemHandler.ReadInvUpdate(packet, "InvUpdate"); for (int i = 0; i < NumSlots; i++) { packet.ReadPackedGuid128("Item"); packet.ReadByte("ContainerSlot"); packet.ReadByte("Slot"); } }
public static void HandleGameObjectQueryResponse(Packet packet) { var entry = packet.ReadEntry("Entry"); if (entry.Value) // entry is masked return; GameObjectTemplate gameObject = new GameObjectTemplate { Entry = (uint)entry.Key }; int unk1 = packet.ReadInt32("Unk1 UInt32"); if (unk1 == 0) { packet.ReadByte("Unk1 Byte"); return; } gameObject.Type = packet.ReadInt32E<GameObjectType>("Type"); gameObject.DisplayID = packet.ReadUInt32("Display ID"); var name = new string[4]; for (int i = 0; i < 4; i++) name[i] = packet.ReadCString("Name", i); gameObject.Name = name[0]; gameObject.IconName = packet.ReadCString("Icon Name"); gameObject.CastCaption = packet.ReadCString("Cast Caption"); gameObject.UnkString = packet.ReadCString("Unk String"); gameObject.Data = new int?[32]; for (int i = 0; i < gameObject.Data.Length; i++) gameObject.Data[i] = packet.ReadInt32("Data", i); gameObject.Size = packet.ReadSingle("Size"); gameObject.QuestItems = new uint?[packet.ReadByte("QuestItems Length")]; for (int i = 0; i < gameObject.QuestItems.Length; i++) gameObject.QuestItems[i] = (uint)packet.ReadInt32<ItemId>("Quest Item", i); packet.ReadUInt32E<ClientType>("Expansion"); packet.ReadByte("Unk1 Byte"); Storage.GameObjectTemplates.Add(gameObject, packet.TimeSpan); ObjectName objectName = new ObjectName { ObjectType = ObjectType.GameObject, ID = entry.Key, Name = gameObject.Name }; Storage.ObjectNames.Add(objectName, packet.TimeSpan); }
public static void HandleServerAddonsList(Packet packet) { var bits20 = packet.ReadBits(23); var usePublicKey = new bool[bits20]; var bit3 = new bool[bits20]; var bit1 = new bool[bits20]; var bits0 = new uint[bits20]; for (var i = 0; i < bits20; i++) { usePublicKey[i] = packet.ReadBit(); bit3[i] = packet.ReadBit(); bit1[i] = packet.ReadBit(); if (bit3[i]) bits0[i] = packet.ReadBits(8); } var bits10 = (int)packet.ReadBits(18); for (var i = 0; i < bits20; i++) { if (usePublicKey[i]) { packet.ReadBytes("Name MD5", 256); } if (bit1[i]) { packet.ReadByte("Byte24", i); packet.ReadInt32("Int24", i); } if (bit3[i]) packet.ReadWoWString("Addon URL File", bits0[i], i); packet.ReadByte("Addon State", i); } for (var i = 0; i < bits10; i++) { packet.ReadInt32("Int14", i); for (var j = 0; j < 4; j++) { packet.ReadInt32("IntED", i, j); packet.ReadInt32("Int14", i, j); } packet.ReadInt32("IntED", i); packet.ReadInt32("IntED", i); } }
public static void HandleEquipmentSetUse(Packet packet) { for (var i = 0; i < NumSlots; i++) { packet.ReadPackedGuid("Item GUID ", i); packet.ReadByte("Source Bag", i); packet.ReadByte("Source Slot", i); } }
public static void HandleAutoItem(Packet packet) { var bits2 = packet.ReadBits("InvItemCount", 2); for (int i = 0; i < bits2; i++) { packet.ReadByte("ContainerSlot", i); packet.ReadByte("Slot", i); } packet.ReadByte("Slot"); packet.ReadByte("PackSlot"); }
public static void HandleMapObjEvents(Packet packet) { packet.ReadInt32("UniqueID"); packet.ReadInt32("DataSize"); var count = packet.ReadByte("Unk1"); for (var i = 0; i < count; i++) { var byte20 = packet.ReadByte("Unk2", i); packet.ReadInt32(byte20 == 1 ? "Unk3" : "Unk4", i); } }
public static void HandleGroupList(Packet packet) { var grouptype = packet.ReadEnum<GroupTypeFlag>("Group Type", TypeCode.Byte); packet.ReadByte("Sub Group"); packet.ReadEnum<GroupUpdateFlag>("Flags", TypeCode.Byte); packet.ReadByte("Player's Role"); if (grouptype.HasAnyFlag(GroupTypeFlag.LookingForDungeon)) { packet.ReadEnum<InstanceStatus>("Group Type Status", TypeCode.Byte); packet.ReadLfgEntry("LFG Entry"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545)) packet.ReadBoolean("Unk bool"); } packet.ReadGuid("Group GUID"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_0_10958)) packet.ReadInt32("Counter"); var numFields = packet.ReadInt32("Member Count"); for (var i = 0; i < numFields; i++) { packet.ReadCString("[" + i + "] Name"); packet.ReadGuid("[" + i + "] GUID"); packet.ReadEnum<GroupMemberStatusFlag>("[" + i + "] Status", TypeCode.Byte); packet.ReadByte("[" + i + "] Sub Group"); packet.ReadEnum<GroupUpdateFlag>("[" + i + "] Update Flags", TypeCode.Byte); if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_0_10958)) packet.ReadEnum<LfgRoleFlag>("[" + i + "] Role", TypeCode.Byte); } packet.ReadGuid("Leader GUID"); if (numFields <= 0) return; packet.ReadEnum<LootMethod>("Loot Method", TypeCode.Byte); packet.ReadGuid("Looter GUID"); packet.ReadEnum<ItemQuality>("Loot Threshold", TypeCode.Byte); if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_2_0_10192)) packet.ReadEnum<MapDifficulty>("Dungeon Difficulty", TypeCode.Byte); packet.ReadEnum<MapDifficulty>("Raid Difficulty", TypeCode.Byte); if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_0_10958) && ClientVersion.RemovedInVersion(ClientVersionBuild.V4_2_2_14545)) // Removed somewhere between wotlk and cataclysm packet.ReadByte("Unk Byte"); // Has something to do with difficulty too }
public static void HandleLoadCUFProfiles(Packet packet) { var count = packet.ReadBits("count", 19); var strlen = new uint[count]; for (int i = 0; i < count; ++i) { packet.ReadBit("Talent spec 1", i); // 165 packet.ReadBit("3 player group", i); // 159 packet.ReadBit("Unk 157", i); // 157 packet.ReadBit("10 player group", i); // 161 packet.ReadBit("40 player group", i); // 164 packet.ReadBit("Border", i); // 141 packet.ReadBit("Class colors", i); // 142 packet.ReadBit("Keep groups together", i); // 134 packet.ReadBit("Display power bars", i); // 140 strlen[i] = packet.ReadBits("String length", 7, i); // 0 packet.ReadBit("Pets", i); // 135 packet.ReadBit("Aggro highlight", i); // 138 packet.ReadBit("Unk 145", i); // 145 packet.ReadBit("PvP", i); // 167 packet.ReadBit("Unk 156", i); // 156 packet.ReadBit("Main tank and assist", i); // 136 packet.ReadBit("Debuffs", i); // 144 packet.ReadBit("Horizontal groups", i); // 143 packet.ReadBit("Talent spec 2", i); // 166 packet.ReadBit("Incoming heals", i); // 137 packet.ReadBit("Dispellable debuffs", i); // 139 packet.ReadBit("25 player group", i); // 163 packet.ReadBit("PvE", i); // 168 packet.ReadBit("5 player group", i); // 160 packet.ReadBit("15 player group", i); // 162 packet.ReadBit("2 player group", i); // 158 } for (int i = 0; i < count; ++i) { packet.ReadInt16("Unk 152", i); // 152 packet.ReadInt16("Unk 154", i); // 154 packet.ReadByte("Health text", i); // 0 - none, 1 - remaining, 2 - lost, 3 - percentage 133 packet.ReadWoWString("Name", (int)strlen[i], i); // 172 packet.ReadByte("Unk 147", i); // 147 packet.ReadByte("Unk 146", i); // 146 packet.ReadInt16("Frame height", i); // 128 packet.ReadByte("Unk 148", i); // 148 packet.ReadByte("Sort by", i); // 0 - role, 1 - group, 2 - alphabetical 132 packet.ReadInt16("Frame width", i); // 130 packet.ReadInt16("Unk 150", i); // 150 } }