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/eathena | |
parent | 7ff1b993bfc1e65a2e2d44bbcfc6444421aa69a2 (diff) | |
download | manaplus-2b5db5baf923a0c822e7ee048f218fd264e91f19.tar.gz manaplus-2b5db5baf923a0c822e7ee048f218fd264e91f19.tar.bz2 manaplus-2b5db5baf923a0c822e7ee048f218fd264e91f19.tar.xz manaplus-2b5db5baf923a0c822e7ee048f218fd264e91f19.zip |
Add missing packet field comments.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/adminhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/familyhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/guildhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/mailhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/messagein.h | 6 | ||||
-rw-r--r-- | src/net/eathena/messageout.h | 6 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp index 686048554..e83605edd 100644 --- a/src/net/eathena/adminhandler.cpp +++ b/src/net/eathena/adminhandler.cpp @@ -201,7 +201,7 @@ void AdminHandler::requestStats(const std::string &name) { mStatsName = name; createOutPacket(CMSG_ADMIN_REQUEST_STATS); - outMsg.writeString(name, 24); + outMsg.writeString(name, 24, "name"); } void AdminHandler::processAccountStats(Net::MessageIn &msg) diff --git a/src/net/eathena/familyhandler.cpp b/src/net/eathena/familyhandler.cpp index e3df97f4f..8c1526556 100644 --- a/src/net/eathena/familyhandler.cpp +++ b/src/net/eathena/familyhandler.cpp @@ -79,7 +79,7 @@ void FamilyHandler::askForChild(const Being *const being) return; createOutPacket(CMSG_FAMILY_ASK_FOR_CHILD); - outMsg.writeInt32(being->getId()); + outMsg.writeInt32(being->getId(), "account id"); } void FamilyHandler::processAskForChild(Net::MessageIn &msg) diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index aa939acb5..7be63489e 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -159,7 +159,7 @@ void GeneralHandler::handleMessage(Net::MessageIn &msg) void GeneralHandler::processConnectionProblem(Net::MessageIn &msg) { - const uint8_t code = msg.readUInt8(); + const uint8_t code = msg.readUInt8("flag"); logger->log("Connection problem: %u", static_cast<unsigned int>(code)); switch (code) diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp index 552165ba6..270a69541 100644 --- a/src/net/eathena/guildhandler.cpp +++ b/src/net/eathena/guildhandler.cpp @@ -298,7 +298,7 @@ void GuildHandler::chat(const int guildId A_UNUSED, createOutPacket(CMSG_GUILD_MESSAGE); outMsg.writeInt16(static_cast<uint16_t>(str.size() + 4 + 1), "len"); outMsg.writeString(str, static_cast<int>(str.length()), "message"); - outMsg.writeInt8(0); + outMsg.writeInt8(0, "zero byte"); } void GuildHandler::memberList(const int guildId A_UNUSED) const diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index 29f7d8fd7..b61291486 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -128,10 +128,10 @@ void MailHandler::send(const std::string &name, const int sz = static_cast<int>(message.size()); createOutPacket(CMSG_MAIL_SEND); - outMsg.writeInt16(static_cast<int16_t>(69 + sz)); + outMsg.writeInt16(static_cast<int16_t>(69 + sz), "len"); outMsg.writeString(name, 24, "name"); outMsg.writeString(title, 40, "title"); - outMsg.writeInt8(static_cast<int8_t>(sz)); + outMsg.writeInt8(static_cast<int8_t>(sz), "message size"); outMsg.writeString(message, sz, "message"); } diff --git a/src/net/eathena/messagein.h b/src/net/eathena/messagein.h index fec2b5e4f..e4d9cf09c 100644 --- a/src/net/eathena/messagein.h +++ b/src/net/eathena/messagein.h @@ -48,11 +48,11 @@ class MessageIn final : public Net::MessageIn void postInit(); /**< Reads a short. */ - int16_t readInt16(const char *const str = nullptr); + int16_t readInt16(const char *const str); /**< Reads a long. */ - int32_t readInt32(const char *const str = nullptr); + int32_t readInt32(const char *const str); - int64_t readInt64(const char *const str = nullptr); + int64_t readInt64(const char *const str); uint16_t readId(); }; diff --git a/src/net/eathena/messageout.h b/src/net/eathena/messageout.h index 810a1916d..ee1078db6 100644 --- a/src/net/eathena/messageout.h +++ b/src/net/eathena/messageout.h @@ -50,11 +50,11 @@ class MessageOut final : public Net::MessageOut /**< Writes a short. */ void writeInt16(const int16_t value, - const char *const str = nullptr); + const char *const str); /**< Writes a long. */ void writeInt32(const int32_t value, - const char *const str = nullptr); + const char *const str); /** * Encodes coordinates and direction in 3 bytes. @@ -62,7 +62,7 @@ class MessageOut final : public Net::MessageOut void writeCoordinates(const uint16_t x, const uint16_t y, unsigned char direction, - const char *const str = nullptr); + const char *const str); void resetPos() { mPos = 0; } diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 65c213dda..3ef653de4 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -460,7 +460,7 @@ void PlayerHandler::setViewEquipment(const bool allow) const { createOutPacket(CMSG_PLAYER_SET_EQUIPMENT_VISIBLE); outMsg.writeInt32(0, "unused"); - outMsg.writeInt32(allow ? 1 : 0); + outMsg.writeInt32(allow ? 1 : 0, "allow"); } void PlayerHandler::processPlayerHeal(Net::MessageIn &msg) |