From f05188948bf1dfe5da7e4ccead089e1d0e55c441 Mon Sep 17 00:00:00 2001 From: Gladie Date: Mon, 14 Oct 2024 21:52:19 +0200 Subject: [PATCH] Registration of Packet 0xBE (#1304) --- src/common/sphereproto.h | 1 + src/network/CPacketManager.cpp | 1 + src/network/receive.cpp | 11 +++++++++++ src/network/receive.h | 14 ++++++++++++++ 4 files changed, 27 insertions(+) diff --git a/src/common/sphereproto.h b/src/common/sphereproto.h index ab1a3aaed..b9bbb908e 100644 --- a/src/common/sphereproto.h +++ b/src/common/sphereproto.h @@ -139,6 +139,7 @@ enum XCMD_TYPE // XCMD_* messages are unique in both directions. XCMD_MailMsg = 0xbb, XCMD_Season = 0xbc, XCMD_ClientVersion = 0xbd, + XCMD_AssistVersion = 0xbe, XCMD_ExtData = 0xbf, // 0xC0 XCMD_EffectEx = 0xc0, diff --git a/src/network/CPacketManager.cpp b/src/network/CPacketManager.cpp index 77a7f2ca3..35986c224 100644 --- a/src/network/CPacketManager.cpp +++ b/src/network/CPacketManager.cpp @@ -82,6 +82,7 @@ void PacketManager::registerStandardPackets(void) registerPacket(XCMD_CharProfile, new PacketProfileReq()); // profile read/write request registerPacket(XCMD_MailMsg, new PacketMailMessage()); // registerPacket(XCMD_ClientVersion, new PacketClientVersion()); // client version + registerPacket(XCMD_AssistVersion, new PacketAssistVersion()); // assist version registerPacket(XCMD_ExtData, new PacketExtendedCommand()); // registerPacket(XCMD_PromptUNICODE, new PacketPromptResponseUnicode()); // prompt response (unicode) registerPacket(XCMD_ViewRange, new PacketViewRange()); // diff --git a/src/network/receive.cpp b/src/network/receive.cpp index f78aef4f0..50e36e308 100644 --- a/src/network/receive.cpp +++ b/src/network/receive.cpp @@ -2497,6 +2497,17 @@ bool PacketClientVersion::onReceive(CNetState* net) return true; } +/*************************************************************************** +* +* +* Packet 0xBD : PacketAssistVersion assist version +* +* +***************************************************************************/ +PacketAssistVersion::PacketAssistVersion() : Packet(0) +{ +} +PacketAssistVersion::~PacketAssistVersion() = default; /*************************************************************************** * diff --git a/src/network/receive.h b/src/network/receive.h index 4f7c65400..f464c8a6e 100644 --- a/src/network/receive.h +++ b/src/network/receive.h @@ -722,6 +722,20 @@ class PacketClientVersion : public Packet virtual bool onReceive(CNetState* net); }; +/*************************************************************************** + * + * + * Packet 0xBE : PacketAssistVersion assist version + * + * + ***************************************************************************/ +class PacketAssistVersion : public Packet +{ +public: + PacketAssistVersion(); + virtual ~PacketAssistVersion(); +}; + /*************************************************************************** * *