public static void HandleGuildBankActivate(Packet packet) { packet.ReadPackedGuid128("Banker"); packet.ResetBitReader(); packet.ReadBit("FullUpdate"); }
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 HandleGuildQueryResponse(Packet packet) { packet.ReadPackedGuid128("Guild Guid"); var hasData = packet.ReadBit(); if (hasData) { packet.ReadPackedGuid128("GuildGUID"); packet.ReadInt32("VirtualRealmAddress"); var rankCount = packet.ReadInt32("RankCount"); packet.ReadInt32("EmblemColor"); packet.ReadInt32("EmblemStyle"); packet.ReadInt32("BorderColor"); packet.ReadInt32("BorderStyle"); packet.ReadInt32("BackgroundColor"); packet.ResetBitReader(); var nameLen = packet.ReadBits(7); for (var i = 0; i < rankCount; i++) { packet.ReadInt32("RankID", i); packet.ReadInt32("RankOrder", i); packet.ResetBitReader(); var rankNameLen = packet.ReadBits(7); packet.ReadWoWString("Rank Name", rankNameLen, i); } packet.ReadWoWString("Guild Name", nameLen); } }
public static void HandleAreaTriggerReShape(Packet packet) { packet.ReadPackedGuid128("TriggerGUID"); packet.ResetBitReader(); var hasAreaTriggerSpline = packet.ReadBit("HasAreaTriggerSpline"); var hasAreaTriggerUnkType = packet.ReadBit("HasAreaTriggerUnkType"); if (hasAreaTriggerSpline) ReadAreaTriggerSpline(packet); if (hasAreaTriggerUnkType) { packet.ResetBitReader(); var unk1 = packet.ReadBit("AreaTriggerUnk1"); var hasCenter = packet.ReadBit("HasCenter"); packet.ReadBit("Unk bit 703 1"); packet.ReadBit("Unk bit 703 2"); packet.ReadUInt32("Unk UInt 1"); packet.ReadInt32("Unk Int 1"); packet.ReadUInt32("Unk UInt 2"); packet.ReadSingle("Radius"); packet.ReadSingle("BlendFromRadius"); packet.ReadSingle("InitialAngel"); packet.ReadSingle("ZOffset"); if (unk1) packet.ReadPackedGuid128("AreaTriggerUnkGUID"); if (hasCenter) packet.ReadVector3("Center"); } }
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 HandleGuildRoster(Packet packet) { packet.ReadUInt32("NumAccounts"); packet.ReadPackedTime("CreateDate"); packet.ReadUInt32("GuildFlags"); var int20 = packet.ReadUInt32("MemberDataCount"); packet.ResetBitReader(); var bits2037 = packet.ReadBits(10); var bits9 = packet.ReadBits(11); for (var i = 0; i < int20; ++i) { packet.ReadPackedGuid128("Guid", i); packet.ReadUInt32("RankID", i); packet.ReadUInt32<AreaId>("AreaID", i); packet.ReadUInt32("PersonalAchievementPoints", i); packet.ReadUInt32("GuildReputation", i); packet.ReadSingle("LastSave", i); for (var j = 0; j < 2; ++j) { packet.ReadUInt32("DbID", i, j); packet.ReadUInt32("Rank", i, j); packet.ReadUInt32("Step", i, j); } packet.ReadUInt32("VirtualRealmAddress", i); packet.ReadByteE<GuildMemberFlag>("Status", i); packet.ReadByte("Level", i); packet.ReadByteE<Class>("ClassID", i); packet.ReadByteE<Gender>("Gender", i); packet.ResetBitReader(); var bits36 = packet.ReadBits(6); var bits92 = packet.ReadBits(8); var bits221 = packet.ReadBits(8); packet.ReadBit("Authenticated", i); packet.ReadBit("SorEligible", i); packet.ReadWoWString("Name", bits36, i); packet.ReadWoWString("Note", bits92, i); packet.ReadWoWString("OfficerNote", bits221, i); } packet.ReadWoWString("WelcomeText", bits2037); packet.ReadWoWString("InfoText", bits9); }
public static void HandleGuildClientSetNote(Packet packet) { var playerGUID = new byte[8]; playerGUID[1] = packet.ReadBit(); var noteLength = packet.ReadBits("note length", 8); var ispublic = packet.ReadBit("IsPublic"); playerGUID[4] = packet.ReadBit(); playerGUID[2] = packet.ReadBit(); playerGUID[3] = packet.ReadBit(); playerGUID[5] = packet.ReadBit(); playerGUID[0] = packet.ReadBit(); playerGUID[6] = packet.ReadBit(); playerGUID[7] = packet.ReadBit(); packet.ReadXORByte(playerGUID, 5); packet.ReadXORByte(playerGUID, 1); packet.ReadXORByte(playerGUID, 6); packet.ReadXORByte(playerGUID, 0); packet.ReadWoWString("note", noteLength); packet.ReadXORByte(playerGUID, 7); packet.ReadXORByte(playerGUID, 4); packet.ReadXORByte(playerGUID, 3); packet.ReadXORByte(playerGUID, 2); packet.ResetBitReader(); packet.WriteGuid("Player GUID", playerGUID); }
public static void HandleAutoStoreLootItem510(Packet packet) { var counter = packet.ReadBits("Count", 23); var guid = new byte[counter][]; for (var i = 0; i < counter; ++i) { guid[i] = new byte[8]; packet.StartBitStream(guid[i], 2, 1, 5, 7, 4, 3, 0, 6); } packet.ResetBitReader(); for (var i = 0; i < counter; ++i) { packet.ReadXORByte(guid[i], 0); packet.ReadXORByte(guid[i], 3); packet.ReadByte("Slot", i); packet.ReadXORByte(guid[i], 7); packet.ReadXORByte(guid[i], 2); packet.ReadXORByte(guid[i], 4); packet.ReadXORByte(guid[i], 1); packet.ReadXORByte(guid[i], 6); packet.ReadXORByte(guid[i], 5); packet.WriteGuid("Looter GUID", guid[i], i); } }
public static void HandleContactList(Packet packet) { packet.ReadInt32E<ContactListFlag>("List Flags"); var bits6 = packet.ReadBits("ContactInfoCount", 8); for (var i = 0; i < bits6; i++) { packet.ReadPackedGuid128("Guid", i); packet.ReadPackedGuid128("WowAccount", i); packet.ReadInt32("VirtualRealmAddr", i); packet.ReadInt32("NativeRealmAddr", i); packet.ReadInt32("TypeFlags", i); packet.ReadByte("Status", i); packet.ReadInt32("AreaID", i); packet.ReadInt32("Level", i); packet.ReadInt32("ClassID", i); packet.ResetBitReader(); var bits44 = packet.ReadBits(10); packet.ReadWoWString("Notes", bits44, i); } }
public static void HandleCalendarEventInviteAlert(Packet packet) { // TODO: find unks packet.ReadUInt64("EventID"); packet.ReadPackedTime("Date"); packet.ReadInt32E<CalendarFlag>("Flags"); packet.ReadByteE<CalendarEventType>("EventType"); packet.ReadInt32("TextureID"); packet.ReadPackedGuid128("EventGuildID"); packet.ReadUInt64("InviteID"); packet.ReadByteE<CalendarEventStatus>("Status"); packet.ReadByteE<CalendarModerationRank>("ModeratorStatus"); packet.ReadPackedGuid128("OwnerGUID | InvitedByGUID"); packet.ReadPackedGuid128("OwnerGUID | InvitedByGUID"); var eventNameLength = packet.ReadBits("EventNameLength", 8); packet.ResetBitReader(); packet.ReadWoWString("EventName", eventNameLength); }
public static void HandleLootResponse(Packet packet) { packet.ReadPackedGuid128("Owner"); packet.ReadPackedGuid128("LootObj"); packet.ReadByteE<LootError>("FailureReason"); packet.ReadByteE<LootType>("AcquireReason"); packet.ReadByteE<LootMethod>("LootMethod"); packet.ReadByteE<ItemQuality>("Threshold"); packet.ReadUInt32("Coins"); var itemCount = packet.ReadUInt32("ItemCount"); var currencyCount = packet.ReadUInt32("CurrencyCount"); packet.ResetBitReader(); packet.ReadBit("Acquired"); packet.ReadBit("AELooting"); packet.ReadBit("PersonalLooting"); for (var i = 0; i < itemCount; ++i) ReadLootItem(packet, i, "LootItem"); for (var i = 0; i < currencyCount; ++i) V6_0_2_19033.Parsers.LootHandler.ReadCurrenciesData(packet, i, "Currencies"); }
public static void HandleGroupInvite(Packet packet) { var guid = new byte[8]; packet.ReadInt32("Unk Int32"); // Non-zero in cross realm parties (1383) packet.ReadInt32("Unk Int32"); // Always 0 packet.ReadByte("unk"); guid[2] = packet.ReadBit(); var strLen = packet.ReadBits(9); guid[0] = packet.ReadBit(); guid[3] = packet.ReadBit(); guid[4] = packet.ReadBit(); guid[6] = packet.ReadBit(); guid[7] = packet.ReadBit(); guid[5] = packet.ReadBit(); guid[1] = packet.ReadBit(); var nameLen = packet.ReadBits(9); packet.ResetBitReader(); packet.ReadXORByte(guid, 5); packet.ReadWoWString("Realm Name", strLen); // Non-empty in cross realm parties packet.ReadWoWString("Name", nameLen); packet.ReadXORByte(guid, 4); packet.ReadXORByte(guid, 0); packet.ReadXORByte(guid, 3); packet.ReadXORByte(guid, 6); packet.ReadXORByte(guid, 1); packet.ReadXORByte(guid, 2); packet.ReadXORByte(guid, 7); packet.WriteGuid("Guid", guid); // Non-zero in cross realm parties }
public static void HandleGMTicketCaseStatus(Packet packet) { if (ClientVersion.RemovedInVersion(ClientVersionBuild.V6_2_2_20444)) { packet.ReadTime("OldestTicketTime"); packet.ReadTime("UpdateTime"); } var int24 = packet.ReadInt32("CasesCount"); for (int i = 0; i < int24; i++) { packet.ReadInt32("CaseID", i); packet.ReadInt32("CaseOpened", i); packet.ReadInt32("CaseStatus", i); packet.ReadInt16("CfgRealmID", i); packet.ReadInt64("CharacterID", i); packet.ReadInt32("WaitTimeOverrideMinutes", i); packet.ResetBitReader(); var bits12 = packet.ReadBits(11); var bits262 = packet.ReadBits(10); packet.ReadWoWString("Url", bits12, i); packet.ReadWoWString("WaitTimeOverrideMessage", bits262, i); } }
public static void HandleItemPushResult(Packet packet) { packet.ReadPackedGuid128("PlayerGUID"); packet.ReadByte("Slot"); packet.ReadInt32("SlotInBag"); packet.ReadUInt32("QuestLogItemID"); packet.ReadUInt32("Quantity"); packet.ReadUInt32("QuantityInInventory"); packet.ReadInt32("DungeonEncounterID"); packet.ReadUInt32("BattlePetBreedID"); packet.ReadUInt32("BattlePetBreedQuality"); packet.ReadUInt32("BattlePetSpeciesID"); packet.ReadUInt32("BattlePetLevel"); packet.ReadPackedGuid128("ItemGUID"); packet.ResetBitReader(); packet.ReadBit("Pushed"); packet.ReadBit("Created"); packet.ReadBits("DisplayText", 3); packet.ReadBit("IsBonusRoll"); packet.ReadBit("IsEncounterLoot"); V6_0_2_19033.Parsers.ItemHandler.ReadItemInstance(packet, "ItemInstance"); }
public static void HandleMailQueryNextTimeResult60x(Packet packet) { packet.ReadSingle("NextMailTime"); var int5 = packet.ReadInt32("NextCount"); for (int i = 0; i < int5; i++) { packet.ReadPackedGuid128("SenderGUID", i); // PlayerGuidLookupHint packet.ResetBitReader(); var bit4 = packet.ReadBit("HasVirtualRealmAddress", i); var bit12 = packet.ReadBit("HasNativeRealmAddress", i); if (bit4) packet.ReadInt32("VirtualRealmAddress", i); if (bit12) packet.ReadInt32("NativeRealmAddress", i); packet.ReadSingle("TimeLeft", i); packet.ReadInt32("AltSenderID", i); packet.ReadByte("AltSenderType", i); packet.ReadInt32("StationeryID", i); } }
public static void HandleBattlePetModifyName(Packet packet) { var guid = new byte[8]; guid[5] = packet.ReadBit(); // 93 guid[7] = packet.ReadBit(); // 95 guid[3] = packet.ReadBit(); // 91 guid[0] = packet.ReadBit(); // 88 guid[6] = packet.ReadBit(); // 94 var len = packet.ReadBits("Len", 7); guid[2] = packet.ReadBit(); // 90 guid[1] = packet.ReadBit(); // 89 var hasDeclinedNames = packet.ReadBit("hasDeclNames"); // 421 guid[4] = packet.ReadBit(); // 92 var declinedNamesLen = new uint[5]; if (hasDeclinedNames) for ( var i = 5; i > 0; i--) declinedNamesLen[i-1] = packet.ReadBits(7); packet.ResetBitReader(); packet.ParseBitStream(guid, 3, 0, 6, 1, 5, 2, 4, 7); packet.WriteGuid("Guid", guid); packet.ReadWoWString("Nick", len); if (hasDeclinedNames) for (var i = 5; i > 0; i--) packet.ReadWoWString("declNames", declinedNamesLen[i - 1], i); }
public static void ReadClientBattlePet(Packet packet, params object[] idx) { packet.ReadPackedGuid128("BattlePetGUID", idx); packet.ReadInt32("SpeciesID", idx); packet.ReadInt32("DisplayID", idx); packet.ReadInt32("CollarID", idx); packet.ReadInt16("BreedID", idx); packet.ReadInt16("Level", idx); packet.ReadInt16("Xp", idx); packet.ReadInt16("BattlePetDBFlags", idx); packet.ReadInt32("Power", idx); packet.ReadInt32("Health", idx); packet.ReadInt32("MaxHealth", idx); packet.ReadInt32("Speed", idx); packet.ReadByte("BreedQuality", idx); packet.ResetBitReader(); var customNameLength = packet.ReadBits(7); var hasOwnerInfo = packet.ReadBit("HasOwnerInfo", idx); packet.ReadBit("NoRename", idx); packet.ReadWoWString("CustomName", customNameLength, idx); if (hasOwnerInfo) V6_0_2_19033.Parsers.BattlePetHandler.ReadClientBattlePetOwnerInfo(packet, "OwnerInfo", idx); }
public static void HandleSetupCurrency(Packet packet) { var count = packet.ReadInt32("SetupCurrencyRecord"); // ClientSetupCurrencyRecord for (var i = 0; i < count; ++i) { packet.ReadUInt32("Type", i); packet.ReadUInt32("Quantity", i); packet.ResetBitReader(); var hasWeeklyQuantity = packet.ReadBit(); var hasMaxWeeklyQuantity = packet.ReadBit(); var hasTrackedQuantity = packet.ReadBit(); var hasMaxQuantity = packet.ReadBit(); packet.ReadBits("Flags", 5, i); if (hasWeeklyQuantity) packet.ReadUInt32("WeeklyQuantity", i); if (hasMaxWeeklyQuantity) packet.ReadUInt32("MaxWeeklyQuantity", i); if (hasTrackedQuantity) packet.ReadUInt32("TrackedQuantity", i); if (hasMaxQuantity) packet.ReadUInt32("MaxQuantity", i); } }
public static void HandleAreaTriggerDenied(Packet packet) { packet.ReadInt32("AreaTriggerID"); packet.ReadBit("Entered"); packet.ResetBitReader(); }
public static void HandleBattlePetDeletePet(Packet packet) { var guid = packet.StartBitStream(3, 5, 6, 2, 4, 0, 7, 1); packet.ResetBitReader(); packet.ParseBitStream(guid, 4, 1, 5, 0, 7, 2, 3, 6); packet.WriteGuid("Guid", guid); }
public static void HandleSpellHealLog(Packet packet) { packet.ReadPackedGuid128("TargetGUID"); packet.ReadPackedGuid128("CasterGUID"); packet.ReadInt32<SpellId>("SpellID"); packet.ReadInt32("Health"); packet.ReadInt32("OverHeal"); packet.ReadInt32("Absorbed"); packet.ResetBitReader(); packet.ReadBit("Crit"); var hasCritRollMade = packet.ReadBit("HasCritRollMade"); var hasCritRollNeeded = packet.ReadBit("HasCritRollNeeded"); var hasLogData = packet.ReadBit("HasLogData"); var hasSandboxScaling = packet.ReadBit("HasLogData"); if (hasCritRollMade) packet.ReadSingle("CritRollMade"); if (hasCritRollNeeded) packet.ReadSingle("CritRollNeeded"); if (hasLogData) SpellHandler.ReadSpellCastLogData(packet); if (hasSandboxScaling) ReadSandboxScalingData(packet, "SandboxScalingData"); }
public static void HandleEquipmentSetList(Packet packet) { var count = packet.ReadInt32("Count"); for (var i = 0; i < count; i++) { packet.ReadInt32("Type", i); packet.ReadUInt64("Guid", i); packet.ReadUInt32("SetID", i); uint ignoreMask = packet.ReadUInt32("IgnoreMask"); for (var j = 0; j < NumSlots; j++) { bool ignore = (ignoreMask & (1 << j)) != 0; packet.ReadPackedGuid128("Pieces" + (ignore ? " (Ignored)" : ""), i, j); packet.ReadInt32("Appearances", i); } for (var j = 0; j < 2; j++) packet.ReadInt32("Enchants", i); packet.ResetBitReader(); var setNameLen = packet.ReadBits(8); var setIconLen = packet.ReadBits(9); packet.ReadWoWString("SetName", setNameLen, i); packet.ReadWoWString("SetIcon", setIconLen, i); } }
public static void HandleItemEnchantTimeUpdate(Packet packet) { var itemGuid = new byte[8]; var playerGuid = new byte[8]; packet.StartBitStream(itemGuid, 2, 4); playerGuid[4] = packet.ReadBit(); itemGuid[5] = packet.ReadBit(); packet.StartBitStream(playerGuid, 3, 5); packet.StartBitStream(itemGuid, 7, 0, 6); packet.StartBitStream(playerGuid, 6, 2, 0, 1); itemGuid[1] = packet.ReadBit(); playerGuid[7] = packet.ReadBit(); itemGuid[3] = packet.ReadBit(); packet.ResetBitReader(); packet.ReadXORBytes(playerGuid, 1, 7); packet.ReadXORBytes(itemGuid, 4, 7); packet.ReadXORByte(playerGuid, 5); packet.ReadXORBytes(itemGuid, 1, 2); packet.ReadXORBytes(playerGuid, 4, 2, 0); packet.ReadXORBytes(itemGuid, 0, 5); packet.ReadUInt32("Duration"); packet.ReadUInt32("Slot"); packet.ReadXORByte(playerGuid, 3); packet.ReadXORBytes(itemGuid, 3, 6); packet.ReadXORByte(playerGuid, 6); packet.WriteGuid("Player GUID", playerGuid); packet.WriteGuid("Item GUID", itemGuid); }
public static void HandleClientChatMessageChannel434(Packet packet) { packet.ReadInt32E<Language>("Language"); var channelNameLen = packet.ReadBits(9); var msgLen = packet.ReadBits(8); packet.ResetBitReader(); packet.ReadWoWString("Channel Name", channelNameLen); packet.ReadWoWString("Message", msgLen); }
public static void HandleBattlePetUpdates(Packet packet) { var petsCount = packet.ReadInt32("PetsCount"); packet.ReadBit("AddedPet"); packet.ResetBitReader(); for (var i = 0; i < petsCount; ++i) ReadClientBattlePet(packet, i); }
public static void HandleCalendarEventInviteNotesAlert(Packet packet) { packet.ReadUInt64("EventID"); var notesLength = packet.ReadBits(8); packet.ResetBitReader(); packet.ReadWoWString("Notes", notesLength); }
public static void HandleAuthResponse(Packet packet) { var count = 0u; var count1 = 0u; var isQueued = packet.ReadBit("Is In Queue"); if (isQueued) packet.ReadBit("unk0"); var hasAccountData = packet.ReadBit("Has Account Data"); if (hasAccountData) { packet.ReadBit("Unk 1"); packet.ReadBit("Unk 2"); count1 = packet.ReadBits("Race Activation Count", 23); packet.ReadBit("Unk 3"); packet.ReadBits("Unkbits", 21); count = packet.ReadBits("Class Activation Count", 23); packet.ReadBits("Unkbits", 22); packet.ReadBit("Unk 4"); } packet.ResetBitReader(); if (hasAccountData) { packet.ReadByte("unk"); for (var i = 0; i < count; ++i) { packet.ReadEnum<ClientType>("Class Expansion", TypeCode.Byte, i); packet.ReadEnum<Class>("Class", TypeCode.Byte, i); } packet.ReadInt16("UnkInt16 1"); packet.ReadInt16("UnkInt16 2"); for (var i = 0; i < count1; ++i) { packet.ReadEnum<ClientType>("Race Expansion", TypeCode.Byte, i); packet.ReadEnum<Race>("Race", TypeCode.Byte, i); } packet.ReadUInt32("Unk 8"); packet.ReadUInt32("Unk 9"); packet.ReadUInt32("Unk 10"); packet.ReadEnum<ClientType>("Account Expansion", TypeCode.Byte); packet.ReadEnum<ClientType>("Player Expansion", TypeCode.Byte); } packet.ReadEnum<ResponseCode>("Auth Code", TypeCode.Byte); if (isQueued) packet.ReadUInt32("Unk 11"); }
public static void HandleMoveSetCollisionHeightAck(Packet packet) { ReadMovementAck(packet, "MovementAck"); packet.ReadSingle("Height"); packet.ReadInt32("MountDisplayID"); packet.ResetBitReader(); packet.ReadBits("Reason", 2); }
public static void HandleAuctionListBidderItems(Packet packet) { packet.ReadPackedGuid128("Auctioneer"); packet.ReadUInt32("Offset"); var count = packet.ReadBits("AuctionItemIDsCount", 7); packet.ResetBitReader(); for (var i = 0; i < count; ++i) packet.ReadUInt32("AuctionItemID", i); }
public static void HandleCalendarEventInviteNotes(Packet packet) { packet.ReadPackedGuid128("InviteGUID"); packet.ReadUInt64("EventID"); var notesLength = packet.ReadBits(8); packet.ReadBit("ClearPending"); packet.ResetBitReader(); packet.ReadWoWString("Notes", notesLength); }