summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-20 02:30:09 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-20 02:30:09 +0300
commit959581e5d9da2c0ff79a94c1773343b0c1750ea6 (patch)
treef6f4b09fd75a8171945d13d06cc541fae03eae83 /src/net/tmwa
parent00d53eedc3c6f0dd30005f3106536a58eaad6483 (diff)
downloadplus-959581e5d9da2c0ff79a94c1773343b0c1750ea6.tar.gz
plus-959581e5d9da2c0ff79a94c1773343b0c1750ea6.tar.bz2
plus-959581e5d9da2c0ff79a94c1773343b0c1750ea6.tar.xz
plus-959581e5d9da2c0ff79a94c1773343b0c1750ea6.zip
Send net code version also to login server in tmwa net code.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/loginhandler.cpp12
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");