diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-09 22:15:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-09 22:15:19 +0300 |
commit | a2af952c687ff666208a316d8b7b4e394df19d2f (patch) | |
tree | ef20e0d49ac16397d3aa7b47db8657e89e175dc7 /src/net/eathena/loginrecv.cpp | |
parent | 847ad4c18e4355cac45102f5ad8f8bbf4e43f84f (diff) | |
download | mv-a2af952c687ff666208a316d8b7b4e394df19d2f.tar.gz mv-a2af952c687ff666208a316d8b7b4e394df19d2f.tar.bz2 mv-a2af952c687ff666208a316d8b7b4e394df19d2f.tar.xz mv-a2af952c687ff666208a316d8b7b4e394df19d2f.zip |
Read server packet version from server (hercules).
Diffstat (limited to 'src/net/eathena/loginrecv.cpp')
-rw-r--r-- | src/net/eathena/loginrecv.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/net/eathena/loginrecv.cpp b/src/net/eathena/loginrecv.cpp index 472ce76be..cd0a09060 100644 --- a/src/net/eathena/loginrecv.cpp +++ b/src/net/eathena/loginrecv.cpp @@ -35,6 +35,8 @@ #include "debug.h" +extern int packetVersion; + namespace EAthena { @@ -145,9 +147,23 @@ void LoginRecv::processServerVersion(Net::MessageIn &msg) msg.readInt32("unused"); serverVersion = msg.readInt32("server version"); if (serverVersion > 0) + { logger->log("Evol2 server version: %d", serverVersion); + if (serverVersion >= 8) + { + packetVersion = msg.readInt32("packet version"); + logger->log("Hercules packet version: %d", packetVersion); + } + else + { + packetVersion = 20150000; + logger->log("Possible hercules packet version: %d", packetVersion); + } + } else + { logger->log("Hercules without version"); + } client->setState(STATE_LOGIN); } |