From 47f3e53850eae9c714ffad0c1197191a782e72e8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 30 Jun 2017 15:10:14 +0300 Subject: Fix packets for 20170329. --- src/net/eathena/loginrecv.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/net/eathena/loginrecv.cpp') diff --git a/src/net/eathena/loginrecv.cpp b/src/net/eathena/loginrecv.cpp index 38ee44e28..b9abf20aa 100644 --- a/src/net/eathena/loginrecv.cpp +++ b/src/net/eathena/loginrecv.cpp @@ -225,7 +225,20 @@ void LoginRecv::processLoginData(Net::MessageIn &msg) loginHandler->clearWorlds(); - const int worldCount = (msg.getLength() - 47) / 32; + int offset = 0; + int serverLen = 0; + if (msg.getVersion() >= 20170315) + { + offset = 47 + 17; + serverLen = 32 + 128; + } + else + { + offset = 47; + serverLen = 32; + } + + const int worldCount = (msg.getLength() - offset) / serverLen; Ea::LoginRecv::mToken.session_ID1 = msg.readInt32("session id1"); Ea::LoginRecv::mToken.account_ID = msg.readBeingId("accound id"); @@ -262,7 +275,7 @@ void LoginRecv::processLoginData(Net::MessageIn &msg) if (msg.getVersion() >= 20170315) { for (int f = 0; f < 32; f ++) - msg.readUInt8("unused2"); + msg.readInt32("unused2"); } logger->log("Network: Server: %s (%s:%d)", world->name.c_str(), -- cgit v1.2.3-70-g09d2