diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-30 15:10:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-30 15:10:14 +0300 |
commit | 47f3e53850eae9c714ffad0c1197191a782e72e8 (patch) | |
tree | dae6f1bd0419c6875a6c2b44c62b127e7daaebf8 | |
parent | c51f5a671e5fc6b78e57df46daf0fdba319dadf7 (diff) | |
download | manaplus-47f3e53850eae9c714ffad0c1197191a782e72e8.tar.gz manaplus-47f3e53850eae9c714ffad0c1197191a782e72e8.tar.bz2 manaplus-47f3e53850eae9c714ffad0c1197191a782e72e8.tar.xz manaplus-47f3e53850eae9c714ffad0c1197191a782e72e8.zip |
Fix packets for 20170329.
-rw-r--r-- | src/net/eathena/charserverrecv.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/guildrecv.cpp | 1 | ||||
-rw-r--r-- | src/net/eathena/loginrecv.cpp | 17 |
3 files changed, 21 insertions, 2 deletions
diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp index 44c90a227..13a374533 100644 --- a/src/net/eathena/charserverrecv.cpp +++ b/src/net/eathena/charserverrecv.cpp @@ -276,6 +276,11 @@ void CharServerRecv::processCharMapInfo(Net::MessageIn &restrict msg) server.hostname = ipToString(msg.readInt32("map ip address")); } server.port = msg.readInt16("map ip port"); + if (msg.getVersion() >= 20170329) + { + for (int f = 0; f < 32; f ++) + msg.readInt32("unused"); + } // Prevent the selected local player from being deleted localPlayer = charServerHandler->mSelectedCharacter->dummy; diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp index 741fcd6d8..7f17f57db 100644 --- a/src/net/eathena/guildrecv.cpp +++ b/src/net/eathena/guildrecv.cpp @@ -226,6 +226,7 @@ void GuildRecv::processGuildMemberList(Net::MessageIn &msg) } else { + msg.readInt32("last login"); // for now unused continue; } 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(), |