Skip to content

Commit

Permalink
Add multiple 4.4.0 CMSG handler
Browse files Browse the repository at this point in the history
CMSG_OPENING_CINEMATIC
CMSG_OPEN_ITEM
CMSG_OPT_OUT_OF_LOOT
CMSG_PARTY_INVITE
CMSG_PARTY_INVITE_RESPONSE
CMSG_PARTY_UNINVITE
  • Loading branch information
funjoker committed Sep 8, 2024
1 parent b15d544 commit 1829aa2
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
46 changes: 46 additions & 0 deletions WowPacketParserModule.V4_4_0_54481/Parsers/GroupHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,52 @@ public static void HandleClientMinimapPing(Packet packet)
packet.ReadByte("PartyIndex");
}

[Parser(Opcode.CMSG_PARTY_INVITE)]
public static void HandleClientPartyInvite(Packet packet)
{
var hasPartyIndex = packet.ReadBit("HasPartyIndex");
packet.ResetBitReader();
var lenTargetName = packet.ReadBits(9);
var lenTargetRealm = packet.ReadBits(9);
packet.ReadUInt32("ProposedRoles");
packet.ReadPackedGuid128("TargetGuid");

packet.ReadWoWString("TargetName", lenTargetName);
packet.ReadWoWString("TargetRealm", lenTargetRealm);

if (hasPartyIndex)
packet.ReadByte("PartyIndex");
}

[Parser(Opcode.CMSG_PARTY_INVITE_RESPONSE)]
public static void HandlePartyInviteResponse(Packet packet)
{
var hasPartyIndex = packet.ReadBit("HasPartyIndex");
packet.ReadBit("Accept");
var hasRolesDesired = packet.ReadBit("HasRolesDesired");
packet.ResetBitReader();

if (hasPartyIndex)
packet.ReadByte("PartyIndex");

if (hasRolesDesired)
packet.ReadByte("RolesDesired");
}

[Parser(Opcode.CMSG_PARTY_UNINVITE)]
public static void HandlePartyUninvite(Packet packet)
{
var hasPartyIndex = packet.ReadBit("HasPartyIndex");
var len = packet.ReadBits(8);

packet.ReadPackedGuid128("TargetGuid");

if (hasPartyIndex)
packet.ReadByte("PartyIndex");

packet.ReadWoWString("Reason", len);
}

[Parser(Opcode.CMSG_REQUEST_RAID_INFO)]
[Parser(Opcode.SMSG_GROUP_DESTROYED)]
[Parser(Opcode.SMSG_GROUP_UNINVITE)]
Expand Down
7 changes: 7 additions & 0 deletions WowPacketParserModule.V4_4_0_54481/Parsers/ItemHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,13 @@ public static void HandleItemTextQuery(Packet packet)
packet.ReadPackedGuid128("ItemGUID");
}

[Parser(Opcode.CMSG_OPEN_ITEM)]
public static void HandleOpenItem(Packet packet)
{
packet.ReadByte("Slot");
packet.ReadByte("PackSlot");
}

[Parser(Opcode.SMSG_BAG_CLEANUP_FINISHED)]
[Parser(Opcode.SMSG_INVENTORY_FULL_OVERFLOW)]
public static void HandleItemZero(Packet packet)
Expand Down
10 changes: 8 additions & 2 deletions WowPacketParserModule.V4_4_0_54481/Parsers/LootHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ public static void HandleLootStartRoll(Packet packet)
packet.ReadInt32<MapId>("MapID");
packet.ReadUInt32("RollTime");
packet.ReadByte("ValidRolls");

for (var i = 0; i < 3; i++)
packet.ReadUInt32E<LootRollIneligibilityReason>("LootRollIneligibleReason");

packet.ReadByteE<LootMethod>("Method");

packet.ReadInt32("DungeonEncounterID");
ReadLootItem(packet, "LootItem");
}
Expand Down Expand Up @@ -234,6 +234,12 @@ public static void HandleMasterLootItem(Packet packet)
}
}

[Parser(Opcode.CMSG_OPT_OUT_OF_LOOT)]
public static void HandleOptOutOfLoot(Packet packet)
{
packet.ReadBool("PassOnLoot");
}

[Parser(Opcode.SMSG_AE_LOOT_TARGET_ACK)]
[Parser(Opcode.SMSG_LOOT_RELEASE_ALL)]
public static void HandleLootZero(Packet packet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ public static void HandleMountSpecialAnim(Packet packet)
[Parser(Opcode.CMSG_COMPLETE_MOVIE)]
[Parser(Opcode.CMSG_ENABLE_NAGLE)]
[Parser(Opcode.CMSG_NEXT_CINEMATIC_CAMERA)]
[Parser(Opcode.CMSG_OPENING_CINEMATIC)]
public static void HandleZeroLengthPackets(Packet packet)
{
}
Expand Down

0 comments on commit 1829aa2

Please sign in to comment.