From d1a2d702f3c6c4ba5daf65eaa6beb7d9754c4d7b Mon Sep 17 00:00:00 2001 From: funjoker Date: Tue, 4 Jun 2024 04:40:30 +0200 Subject: [PATCH] Add multiple 4.4.0 handlers --- .../Parsers/BattlegroundHandler.cs | 17 ++++++++++ .../Parsers/MiscellaneousHandler.cs | 10 ++++++ .../Parsers/SessionHandler.cs | 31 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 WowPacketParserModule.V4_4_0_54481/Parsers/BattlegroundHandler.cs diff --git a/WowPacketParserModule.V4_4_0_54481/Parsers/BattlegroundHandler.cs b/WowPacketParserModule.V4_4_0_54481/Parsers/BattlegroundHandler.cs new file mode 100644 index 0000000000..e3282db79c --- /dev/null +++ b/WowPacketParserModule.V4_4_0_54481/Parsers/BattlegroundHandler.cs @@ -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) + { + } + } +} diff --git a/WowPacketParserModule.V4_4_0_54481/Parsers/MiscellaneousHandler.cs b/WowPacketParserModule.V4_4_0_54481/Parsers/MiscellaneousHandler.cs index 713d5d40e2..48da169c01 100644 --- a/WowPacketParserModule.V4_4_0_54481/Parsers/MiscellaneousHandler.cs +++ b/WowPacketParserModule.V4_4_0_54481/Parsers/MiscellaneousHandler.cs @@ -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"); + 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)] diff --git a/WowPacketParserModule.V4_4_0_54481/Parsers/SessionHandler.cs b/WowPacketParserModule.V4_4_0_54481/Parsers/SessionHandler.cs index a045fe51ec..cd746adc34 100644 --- a/WowPacketParserModule.V4_4_0_54481/Parsers/SessionHandler.cs +++ b/WowPacketParserModule.V4_4_0_54481/Parsers/SessionHandler.cs @@ -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) {