Skip to content

Commit

Permalink
Add multiple 4.4.0 handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
funjoker committed Jun 4, 2024
1 parent 5fa9752 commit d1a2d70
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
17 changes: 17 additions & 0 deletions WowPacketParserModule.V4_4_0_54481/Parsers/BattlegroundHandler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using WowPacketParser.Enums;
using WowPacketParser.Misc;
using WowPacketParser.Parsing;
using WowPacketParser.Proto;
using WowPacketParser.Store;
using WowPacketParser.Store.Objects;

namespace WowPacketParserModule.V4_4_0_54481.Parsers
{
public static class BattlegroundHandler
{
[Parser(Opcode.CMSG_REQUEST_RATED_PVP_INFO)]
public static void HandleBattlegroundZero(Packet packet)
{
}
}
}
10 changes: 10 additions & 0 deletions WowPacketParserModule.V4_4_0_54481/Parsers/MiscellaneousHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,16 @@ public static void HandleInitialSetup(Packet packet)
packet.ReadByte("ServerExpansionTier");
}

[HasSniffData]
[Parser(Opcode.CMSG_LOADING_SCREEN_NOTIFY)]
public static void HandleClientEnterWorld(Packet packet)
{
var mapId = packet.ReadInt32<MapId>("MapID");
packet.ReadBit("Showing");

packet.AddSniffData(StoreNameType.Map, mapId, "LOAD_SCREEN");
}

[Parser(Opcode.SMSG_RESUME_COMMS)]
[Parser(Opcode.CMSG_SOCIAL_CONTRACT_REQUEST)]
[Parser(Opcode.CMSG_SERVER_TIME_OFFSET_REQUEST)]
Expand Down
31 changes: 31 additions & 0 deletions WowPacketParserModule.V4_4_0_54481/Parsers/SessionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,37 @@ public static void HandleResumeTokenPacket(Packet packet)
packet.ReadBits("Reason", 2);
}

[Parser(Opcode.SMSG_SUSPEND_COMMS)]
public static void HandleSuspendCommsPackets(Packet packet)
{
packet.ReadInt32("Serial");
}

[Parser(Opcode.CMSG_SUSPEND_COMMS_ACK)]
public static void HandleSuspendCommsAck(Packet packet)
{
packet.ReadInt32("Serial");
packet.ReadInt32("Timestamp");
}

[Parser(Opcode.CMSG_LOG_DISCONNECT)]
public static void HandleLogDisconnect(Packet packet)
{
packet.ReadUInt32("Reason");
// 4 is inability for client to decrypt RSA
// 3 is not receiving "WORLD OF WARCRAFT CONNECTION - SERVER TO CLIENT"
// 11 is sent on receiving opcode 0x140 with some specific data
}

[Parser(Opcode.CMSG_PLAYER_LOGIN)]
public static void HandlePlayerLogin(Packet packet)
{
var guid = packet.ReadPackedGuid128("Guid");
packet.ReadSingle("FarClip");
packet.Holder.PlayerLogin = new() { PlayerGuid = guid };
WowPacketParser.Parsing.Parsers.SessionHandler.LoginGuid = guid;
}

[Parser(Opcode.CMSG_ENTER_ENCRYPTED_MODE_ACK)]
public static void HandleSessionZero(Packet packet)
{
Expand Down

0 comments on commit d1a2d70

Please sign in to comment.