summaryrefslogtreecommitdiff
path: root/src/net/eathena/loginrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-16 19:41:24 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-16 19:41:24 +0300
commit23a9bf91fc75a208b62e8c8a3ce8e5e5bb42ef36 (patch)
treea30e292c314e97df52619ff5fc2373ea694bcd0e /src/net/eathena/loginrecv.cpp
parenta4a23b1e0188f47d21a568447d93a1ac4562324d (diff)
downloadmanaverse-23a9bf91fc75a208b62e8c8a3ce8e5e5bb42ef36.tar.gz
manaverse-23a9bf91fc75a208b62e8c8a3ce8e5e5bb42ef36.tar.bz2
manaverse-23a9bf91fc75a208b62e8c8a3ce8e5e5bb42ef36.tar.xz
manaverse-23a9bf91fc75a208b62e8c8a3ce8e5e5bb42ef36.zip
Load evol packet offset from first packet from server.
Diffstat (limited to 'src/net/eathena/loginrecv.cpp')
-rw-r--r--src/net/eathena/loginrecv.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/net/eathena/loginrecv.cpp b/src/net/eathena/loginrecv.cpp
index b9abf20aa..555d1a2c1 100644
--- a/src/net/eathena/loginrecv.cpp
+++ b/src/net/eathena/loginrecv.cpp
@@ -45,6 +45,7 @@
#include "debug.h"
extern int packetVersion;
+extern int evolPacketOffset;
namespace EAthena
{
@@ -153,7 +154,7 @@ void LoginRecv::processUpdateHost2(Net::MessageIn &msg)
void LoginRecv::processServerVersion(Net::MessageIn &msg)
{
- msg.readInt16("len");
+ const int len = msg.readInt16("len");
msg.readInt32("unused");
serverVersion = msg.readInt32("server version");
if (serverVersion > 0)
@@ -167,6 +168,10 @@ void LoginRecv::processServerVersion(Net::MessageIn &msg)
logger->log("autofix Hercules packet version to: %d",
packetVersion);
}
+ if (serverVersion >= 16 && len >= 18)
+ {
+ evolPacketOffset = msg.readInt16("evol packet offset");
+ }
}
else
{