diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-20 02:30:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-20 02:30:09 +0300 |
commit | 959581e5d9da2c0ff79a94c1773343b0c1750ea6 (patch) | |
tree | f6f4b09fd75a8171945d13d06cc541fae03eae83 /src | |
parent | 00d53eedc3c6f0dd30005f3106536a58eaad6483 (diff) | |
download | manaplus-959581e5d9da2c0ff79a94c1773343b0c1750ea6.tar.gz manaplus-959581e5d9da2c0ff79a94c1773343b0c1750ea6.tar.bz2 manaplus-959581e5d9da2c0ff79a94c1773343b0c1750ea6.tar.xz manaplus-959581e5d9da2c0ff79a94c1773343b0c1750ea6.zip |
Send net code version also to login server in tmwa net code.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/tmwa/loginhandler.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index 96a33d55a..8eaba8805 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -144,7 +144,17 @@ void LoginHandler::sendLoginRegister(const std::string &restrict username, if (email.empty()) { createOutPacket(CMSG_LOGIN_REGISTER); - outMsg.writeInt32(0, "client version"); + if (serverVersion > 0) + { + outMsg.writeInt32(CLIENT_PROTOCOL_VERSION, + "client protocol version"); + } + else + { + outMsg.writeInt32(CLIENT_TMW_PROTOCOL_VERSION, + "client protocol version"); + } + outMsg.writeString(username, 24, "login"); outMsg.writeStringNoLog(password, 24, "password"); |