From 6991434831679362687727ed152b3b06b6e671b9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 12 Feb 2019 01:53:13 +0300 Subject: Add packet CMSG_CLIENT_VERSION 0x044a --- src/net/eathena/maphandler.cpp | 8 ++++++++ src/net/eathena/maphandler.h | 2 ++ src/net/eathena/packetsout.inc | 7 +++++++ 3 files changed, 17 insertions(+) (limited to 'src/net/eathena') diff --git a/src/net/eathena/maphandler.cpp b/src/net/eathena/maphandler.cpp index 7054949f2..075a94a38 100644 --- a/src/net/eathena/maphandler.cpp +++ b/src/net/eathena/maphandler.cpp @@ -66,4 +66,12 @@ void MapHandler::camera(int action, outMsg.writeFloat(latitude, "latitude"); } +void MapHandler::clientVersion(const int version) const +{ + if (packetVersion < 20090406) + return; + createOutPacket(CMSG_CLIENT_VERSION); + outMsg.writeInt32(version, "version"); +} + } // namespace EAthena diff --git a/src/net/eathena/maphandler.h b/src/net/eathena/maphandler.h index 52f50add4..2895087e4 100644 --- a/src/net/eathena/maphandler.h +++ b/src/net/eathena/maphandler.h @@ -43,6 +43,8 @@ class MapHandler final : public Net::MapHandler float range, float rotation, float latitude) const override final; + + void clientVersion(const int version) const override final; }; } // namespace EAthena diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index e18283736..6b45709ef 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -354,6 +354,7 @@ packet(CMSG_SKILL_USE_BEING_STOP, 0x0000, 0, nullptr); packet(CMSG_NPC_BARTER_CLOSE, 0x0000, 0, nullptr); packet(CMSG_CAMERA_INFO, 0x0000, 0, nullptr); packet(CMSG_NPC_BARTER_BUY, 0x0000, 0, nullptr); +packet(CMSG_CLIENT_VERSION, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -586,6 +587,12 @@ if (packetVersion >= 20081210) packet(CMSG_SKILL_SELECT_MENU, 0x0443, 8, clif->pSkillSelectMenu); } +// 20090406 +if (packetVersion >= 20090406) +{ + packet(CMSG_CLIENT_VERSION, 0x044a, 6, clif->pClientVersion); +} + // 20090520 if (packetVersion >= 20090520) { -- cgit v1.2.3-70-g09d2