summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-07 13:40:22 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-07 13:40:22 +0300
commit402f8a5fe2b2b6cab271657e7d51c0f723f38ea8 (patch)
tree2e942fe78318afa6fe3421c7424d9a953f52bac0 /src/net
parente31165ab48316e06202b6f6b0c631a287cfeb957 (diff)
downloadmanaplus-402f8a5fe2b2b6cab271657e7d51c0f723f38ea8.tar.gz
manaplus-402f8a5fe2b2b6cab271657e7d51c0f723f38ea8.tar.bz2
manaplus-402f8a5fe2b2b6cab271657e7d51c0f723f38ea8.tar.xz
manaplus-402f8a5fe2b2b6cab271657e7d51c0f723f38ea8.zip
Send to tmw based server client version as 1.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tmwa/charserverhandler.cpp5
-rw-r--r--src/net/tmwa/network.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index c714c6043..545c36611 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -471,7 +471,10 @@ void CharServerHandler::connect()
outMsg.writeInt32(token.session_ID2);
// [Fate] The next word is unused by the old char server, so we squeeze in
// mana client version information
- outMsg.writeInt16(CLIENT_PROTOCOL_VERSION);
+ if (serverVersion > 0)
+ outMsg.writeInt16(CLIENT_PROTOCOL_VERSION);
+ else
+ outMsg.writeInt16(CLIENT_TMW_PROTOCOL_VERSION);
outMsg.writeInt8((token.sex == GENDER_MALE) ? 1 : 0);
// We get 4 useless bytes before the real answer comes in (what are these?)
diff --git a/src/net/tmwa/network.h b/src/net/tmwa/network.h
index 45f3cfac6..4a554f9eb 100644
--- a/src/net/tmwa/network.h
+++ b/src/net/tmwa/network.h
@@ -40,6 +40,7 @@
* the protocol accordingly.
*/
#define CLIENT_PROTOCOL_VERSION 3
+#define CLIENT_TMW_PROTOCOL_VERSION 1
namespace TmwAthena
{