diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-07 00:36:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-07 00:36:23 +0300 |
commit | c6dbf10ed70e6f94d28ad555545b7522ea7348b8 (patch) | |
tree | d6da2e8497fbf8a85329217f2823b0f029c6163e | |
parent | e899e18fa2bca908251f7f87561561a822c7fe7d (diff) | |
download | plus-c6dbf10ed70e6f94d28ad555545b7522ea7348b8.tar.gz plus-c6dbf10ed70e6f94d28ad555545b7522ea7348b8.tar.bz2 plus-c6dbf10ed70e6f94d28ad555545b7522ea7348b8.tar.xz plus-c6dbf10ed70e6f94d28ad555545b7522ea7348b8.zip |
eathena: add support for sending client version to map server.
-rw-r--r-- | src/net/eathena/gamehandler.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/loginhandler.h | 2 | ||||
-rw-r--r-- | src/net/loginhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/loginhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/loginhandler.h | 2 |
5 files changed, 13 insertions, 1 deletions
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp index 8baae162f..d19cec06b 100644 --- a/src/net/eathena/gamehandler.cpp +++ b/src/net/eathena/gamehandler.cpp @@ -26,6 +26,8 @@ #include "being/localplayer.h" +#include "net/serverfeatures.h" + #include "net/eathena/loginhandler.h" #include "net/eathena/messageout.h" #include "net/eathena/network.h" @@ -129,6 +131,8 @@ void GameHandler::connect() outMsg.writeInt32(token.session_ID1, "session key1"); outMsg.writeInt32(0, "tick"); outMsg.writeInt8(Being::genderToInt(token.sex), "sex"); + if (serverFeatures->haveMapServerVersion()) + loginHandler->sendVersion(); /* if (localPlayer) { diff --git a/src/net/eathena/loginhandler.h b/src/net/eathena/loginhandler.h index 8e30e908a..4f8b3110c 100644 --- a/src/net/eathena/loginhandler.h +++ b/src/net/eathena/loginhandler.h @@ -60,7 +60,7 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler const std::string &restrict newPassword) const override final; - void sendVersion() const; + void sendVersion() const override final; ServerInfo *getCharServer() const override final A_WARN_UNUSED; diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h index 89c55a334..4f4cebc40 100644 --- a/src/net/loginhandler.h +++ b/src/net/loginhandler.h @@ -95,6 +95,8 @@ class LoginHandler notfinal virtual void loginOrRegister(LoginData *const data) const = 0; + virtual void sendVersion() const = 0; + virtual ~LoginHandler() { } diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index c4fe39e64..42ea0101b 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -273,4 +273,8 @@ int LoginHandler::supportedOptionalActions() const : Net::RegistrationOptions::SetGenderOnRegister; } +void LoginHandler::sendVersion() const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/loginhandler.h b/src/net/tmwa/loginhandler.h index e147bdc46..03f2c22b4 100644 --- a/src/net/tmwa/loginhandler.h +++ b/src/net/tmwa/loginhandler.h @@ -61,6 +61,8 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler ServerInfo *getCharServer() const override final A_WARN_UNUSED; + void sendVersion() const override final; + static void processServerVersion(Net::MessageIn &msg); static void requestUpdateHosts(); |