summaryrefslogtreecommitdiff
path: root/src/net/ea/loginhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-23 22:02:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-23 22:02:46 +0300
commit117bd5507d5e644107d7a53c9b12d7a2587b69a5 (patch)
treebd3f186fcc6cea40c078050a046b28e6dfe085eb /src/net/ea/loginhandler.cpp
parent4d02075c3daaefca2dcad72546e1e45b4219b5ad (diff)
downloadmv-117bd5507d5e644107d7a53c9b12d7a2587b69a5.tar.gz
mv-117bd5507d5e644107d7a53c9b12d7a2587b69a5.tar.bz2
mv-117bd5507d5e644107d7a53c9b12d7a2587b69a5.tar.xz
mv-117bd5507d5e644107d7a53c9b12d7a2587b69a5.zip
Add packet fields comments in loginhandler.
Diffstat (limited to 'src/net/ea/loginhandler.cpp')
-rw-r--r--src/net/ea/loginhandler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index 57eea9101..11fe197c2 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -177,7 +177,7 @@ void LoginHandler::processCharPasswordResponse(Net::MessageIn &msg)
void LoginHandler::processUpdateHost(Net::MessageIn &msg)
{
const int len = msg.readInt16("len") - 4;
- mUpdateHost = msg.readString(len);
+ mUpdateHost = msg.readString(len, "update host");
if (!checkPath(mUpdateHost))
{
@@ -192,7 +192,7 @@ void LoginHandler::processUpdateHost(Net::MessageIn &msg)
void LoginHandler::processLoginData(Net::MessageIn &msg)
{
- msg.skip(2, "len");
+ msg.readInt16("len");
loginHandler->clearWorlds();
@@ -203,7 +203,7 @@ void LoginHandler::processLoginData(Net::MessageIn &msg)
mToken.session_ID2 = msg.readInt32("session id2");
msg.readInt32("old ip");
loginData.lastLogin = msg.readString(24, "last login");
- msg.skip(2, "unused");
+ msg.readInt16("unused");
// reserve bits for future usage
mToken.sex = Being::intToGender(static_cast<uint8_t>(
@@ -219,8 +219,8 @@ void LoginHandler::processLoginData(Net::MessageIn &msg)
world->online_users = msg.readInt16("online number");
config.setValue("updatehost", mUpdateHost);
world->updateHost = mUpdateHost;
- msg.skip(2, "maintenance");
- msg.skip(2, "new");
+ msg.readInt16("maintenance");
+ msg.readInt16("new");
logger->log("Network: Server: %s (%s:%d)", world->name.c_str(),
ipToString(world->address), world->port);