diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-12 16:56:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-12 16:56:14 +0300 |
commit | 2b5db5baf923a0c822e7ee048f218fd264e91f19 (patch) | |
tree | 1d9590f40e9ba0ee32e5441d6c2d69f82f58ba3f /src/net/ea | |
parent | 7ff1b993bfc1e65a2e2d44bbcfc6444421aa69a2 (diff) | |
download | manaverse-2b5db5baf923a0c822e7ee048f218fd264e91f19.tar.gz manaverse-2b5db5baf923a0c822e7ee048f218fd264e91f19.tar.bz2 manaverse-2b5db5baf923a0c822e7ee048f218fd264e91f19.tar.xz manaverse-2b5db5baf923a0c822e7ee048f218fd264e91f19.zip |
Add missing packet field comments.
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/adminhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/loginhandler.cpp | 7 | ||||
-rw-r--r-- | src/net/ea/partyhandler.cpp | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp index 4dd8083f3..cf6869422 100644 --- a/src/net/ea/adminhandler.cpp +++ b/src/net/ea/adminhandler.cpp @@ -93,7 +93,7 @@ void AdminHandler::createItems(const int id, const int color, void AdminHandler::processKickAck(Net::MessageIn &msg) { - if (msg.readInt32() == 0) + if (msg.readInt32("flag") == 0) NotifyManager::notify(NotifyTypes::KICK_FAIL); else NotifyManager::notify(NotifyTypes::KICK_SUCCEED); diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index 8b2ec1ed1..34d5a0d02 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -234,6 +234,7 @@ void LoginHandler::processLoginError(Net::MessageIn &msg) { const uint8_t code = msg.readUInt8("error"); logger->log("Login::error code: %u", static_cast<unsigned int>(code)); + std::string date = msg.readString(20, "date"); switch (code) { @@ -266,10 +267,8 @@ void LoginHandler::processLoginError(Net::MessageIn &msg) case 6: // TRANSLATORS: error message errorMessage = strprintf(_("You have been temporarily " - "banned from the game until " - "%s.\nPlease contact the GM " - "team via the forums."), - msg.readString(20).c_str()); + "banned from the game until %s.\nPlease contact the GM " + "team via the forums."), date.c_str()); break; case 7: // TRANSLATORS: error message diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 806864324..20bb93a5c 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -77,7 +77,7 @@ void PartyHandler::clear() const void PartyHandler::processPartyCreate(Net::MessageIn &msg) { - if (msg.readUInt8()) + if (msg.readUInt8("flag")) NotifyManager::notify(NotifyTypes::PARTY_CREATE_FAILED); else NotifyManager::notify(NotifyTypes::PARTY_CREATED); @@ -85,8 +85,8 @@ void PartyHandler::processPartyCreate(Net::MessageIn &msg) void PartyHandler::processPartyInvited(Net::MessageIn &msg) { - const int id = msg.readInt32(); - const std::string partyName = msg.readString(24); + const int id = msg.readInt32("account id"); + const std::string partyName = msg.readString(24, "party name"); std::string nick; if (actorManager) |