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/tmwa | |
parent | 7ff1b993bfc1e65a2e2d44bbcfc6444421aa69a2 (diff) | |
download | plus-2b5db5baf923a0c822e7ee048f218fd264e91f19.tar.gz plus-2b5db5baf923a0c822e7ee048f218fd264e91f19.tar.bz2 plus-2b5db5baf923a0c822e7ee048f218fd264e91f19.tar.xz plus-2b5db5baf923a0c822e7ee048f218fd264e91f19.zip |
Add missing packet field comments.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 11 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/loginhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/messagein.h | 6 | ||||
-rw-r--r-- | src/net/tmwa/messageout.h | 6 |
6 files changed, 18 insertions, 11 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index c85f4d78d..3c77e70a1 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -221,7 +221,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) break; case SMSG_SKILL_CAST_CANCEL: - msg.readInt32(); // id + processSkillCastCancel(msg); break; case SMSG_SKILL_NO_DAMAGE: @@ -1011,7 +1011,7 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg) else spawnId = 0; mSpawnId = 0; - int16_t speed = msg.readInt16(); + int16_t speed = msg.readInt16("speed"); const uint16_t stunMode = msg.readInt16("opt1"); uint32_t statusEffects = msg.readInt16("opt2"); statusEffects |= (static_cast<uint32_t>(msg.readInt16("option"))) << 16; @@ -1221,7 +1221,7 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg) else spawnId = 0; mSpawnId = 0; - int16_t speed = msg.readInt16(); + int16_t speed = msg.readInt16("speed"); const uint16_t stunMode = msg.readInt16("opt1"); uint32_t statusEffects = msg.readInt16("opt2"); statusEffects |= (static_cast<uint32_t>(msg.readInt16("option"))) << 16; @@ -1688,4 +1688,9 @@ void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) BLOCK_END("BeingHandler::processBeingSelfEffect") } +void BeingHandler::processSkillCastCancel(Net::MessageIn &msg A_UNUSED) +{ + msg.readInt32("skill id"); +} + } // namespace TmwAthena diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h index 0caaa9979..1ecc23d43 100644 --- a/src/net/tmwa/beinghandler.h +++ b/src/net/tmwa/beinghandler.h @@ -94,6 +94,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler const uint8_t type); static void processBeingSelfEffect(Net::MessageIn &msg); + + static void processSkillCastCancel(Net::MessageIn &msg); }; } // namespace TmwAthena diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 219cedc3d..0a81b764c 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -161,7 +161,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/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index ee0381475..2dbe22da8 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -184,7 +184,7 @@ ServerInfo *LoginHandler::getCharServer() const void LoginHandler::requestUpdateHosts() { createOutPacket(CMSG_SEND_CLIENT_INFO); - outMsg.writeInt8(CLIENT_PROTOCOL_VERSION); + outMsg.writeInt8(CLIENT_PROTOCOL_VERSION, "protocol version"); outMsg.writeInt8(0, "unused"); } diff --git a/src/net/tmwa/messagein.h b/src/net/tmwa/messagein.h index 12e2b58cf..9326bfee2 100644 --- a/src/net/tmwa/messagein.h +++ b/src/net/tmwa/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/tmwa/messageout.h b/src/net/tmwa/messageout.h index 0825488d6..f24b845ee 100644 --- a/src/net/tmwa/messageout.h +++ b/src/net/tmwa/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; } |