diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-04-08 21:10:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-04-08 21:10:23 +0300 |
commit | 28fa4b87f677d518ac83f105a44da839d6b63bfa (patch) | |
tree | 351138bc5002325d1f5521c368e845f972322264 /src | |
parent | c6ae5185f29076ec4d31b37d84619a261a8a63c8 (diff) | |
download | mv-28fa4b87f677d518ac83f105a44da839d6b63bfa.tar.gz mv-28fa4b87f677d518ac83f105a44da839d6b63bfa.tar.bz2 mv-28fa4b87f677d518ac83f105a44da839d6b63bfa.tar.xz mv-28fa4b87f677d518ac83f105a44da839d6b63bfa.zip |
Add packer CMSG_MAP_PING2 0x0b1c
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/gamehandler.cpp | 14 | ||||
-rw-r--r-- | src/net/eathena/gamehandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/packetsout.inc | 19 | ||||
-rw-r--r-- | src/net/gamehandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/gamehandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/gamehandler.h | 2 |
6 files changed, 43 insertions, 0 deletions
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp index 1ed6851dd..566233684 100644 --- a/src/net/eathena/gamehandler.cpp +++ b/src/net/eathena/gamehandler.cpp @@ -40,6 +40,9 @@ #include "debug.h" extern int packetVersion; +extern int packetVersionMain; +extern int packetVersionRe; +extern int packetVersionZero; namespace EAthena { @@ -228,4 +231,15 @@ void GameHandler::reqRemainTime() const createOutPacket(CMSG_REQ_REMAIN_TIME); } +void GameHandler::ping2() const +{ + if (packetVersionMain < 20190227 && + packetVersionRe < 20190220 && + packetVersionZero < 20190220) + { + return; + } + createOutPacket(CMSG_MAP_PING2); +} + } // namespace EAthena diff --git a/src/net/eathena/gamehandler.h b/src/net/eathena/gamehandler.h index a67bb0e5c..a5fb79d1b 100644 --- a/src/net/eathena/gamehandler.h +++ b/src/net/eathena/gamehandler.h @@ -55,6 +55,8 @@ class GameHandler final : public Ea::GameHandler bool mustPing() const override final A_WARN_UNUSED { return true; } + + void ping2() const override final; }; } // namespace EAthena diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index 6cc8117ad..ae03a13e2 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -356,6 +356,7 @@ packet(CMSG_CAMERA_INFO, 0x0000, 0, nullptr); packet(CMSG_NPC_BARTER_BUY, 0x0000, 0, nullptr); packet(CMSG_CLIENT_VERSION, 0x0000, 0, nullptr); packet(CMSG_PLAYER_STYLE_CLOSE, 0x0000, 0, nullptr); +packet(CMSG_MAP_PING2, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -1583,4 +1584,22 @@ if (packetVersionRe >= 20190116) packet(CMSG_NPC_BARTER_BUY, 0x0b0f, -1, clif->pNPCBarterPurchase); } +//20190220 re +if (packetVersionRe >= 20190220) +{ + packet(CMSG_MAP_PING2, 0x0b1c, 2, clif->pPing); +} + +//20190220 zero +if (packetVersionZero >= 20190220) +{ + packet(CMSG_MAP_PING2, 0x0b1c, 2, clif->pPing); +} + +//20190227 main +if (packetVersionMain >= 20190227) +{ + packet(CMSG_MAP_PING2, 0x0b1c, 2, clif->pPing); +} + #endif diff --git a/src/net/gamehandler.h b/src/net/gamehandler.h index 22b0bd7d4..bf870be21 100644 --- a/src/net/gamehandler.h +++ b/src/net/gamehandler.h @@ -51,6 +51,8 @@ class GameHandler notfinal virtual void ping(const int tick) const = 0; + virtual void ping2() const = 0; + virtual bool removeDeadBeings() const = 0; virtual void disconnect2() const = 0; diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp index 66a2fdce2..29e400d87 100644 --- a/src/net/tmwa/gamehandler.cpp +++ b/src/net/tmwa/gamehandler.cpp @@ -136,4 +136,8 @@ void GameHandler::reqRemainTime() const { } +void GameHandler::ping2() const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/gamehandler.h b/src/net/tmwa/gamehandler.h index 71fada81e..931f7be38 100644 --- a/src/net/tmwa/gamehandler.h +++ b/src/net/tmwa/gamehandler.h @@ -55,6 +55,8 @@ class GameHandler final : public Ea::GameHandler bool mustPing() const override final A_WARN_UNUSED { return false; } + + void ping2() const override final; }; } // namespace TmwAthena |