From 0d18f85ec3a2b3ded337863ff1bb7ae51fd62658 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 23 Oct 2014 14:51:50 +0300 Subject: Add packet fields comments in playerhandler. --- src/net/eathena/playerhandler.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/net/eathena/playerhandler.cpp') diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 92ce69f4f..4f4e21e5b 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -138,11 +138,11 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) void PlayerHandler::attack(const int id, const bool keep) const { createOutPacket(CMSG_PLAYER_CHANGE_ACT); - outMsg.writeInt32(id); + outMsg.writeInt32(id, "target id"); if (keep) - outMsg.writeInt8(7); + outMsg.writeInt8(7, "action"); else - outMsg.writeInt8(0); + outMsg.writeInt8(0, "action"); } void PlayerHandler::stopAttack() const @@ -153,7 +153,7 @@ void PlayerHandler::stopAttack() const void PlayerHandler::emote(const uint8_t emoteId) const { createOutPacket(CMSG_PLAYER_EMOTE); - outMsg.writeInt8(emoteId); + outMsg.writeInt8(emoteId, "emote id"); } void PlayerHandler::increaseAttribute(const int attr) const @@ -161,8 +161,8 @@ void PlayerHandler::increaseAttribute(const int attr) const if (attr >= Attributes::STR && attr <= Attributes::LUK) { createOutPacket(CMSG_STAT_UPDATE_REQUEST); - outMsg.writeInt16(static_cast(attr)); - outMsg.writeInt8(1); + outMsg.writeInt16(static_cast(attr), "attribute id"); + outMsg.writeInt8(1, "increase"); } } @@ -172,7 +172,7 @@ void PlayerHandler::increaseSkill(const uint16_t skillId) const return; createOutPacket(CMSG_SKILL_LEVELUP_REQUEST); - outMsg.writeInt16(skillId); + outMsg.writeInt16(skillId, "skill id"); } void PlayerHandler::pickUp(const FloorItem *const floorItem) const @@ -181,7 +181,7 @@ void PlayerHandler::pickUp(const FloorItem *const floorItem) const return; createOutPacket(CMSG_ITEM_PICKUP); - outMsg.writeInt32(floorItem->getId()); + outMsg.writeInt32(floorItem->getId(), "object id"); EAthena::InventoryHandler *const handler = static_cast(inventoryHandler); if (handler) @@ -202,7 +202,7 @@ void PlayerHandler::setDestination(const int x, const int y, createOutPacket(CMSG_PLAYER_CHANGE_DEST); outMsg.writeCoordinates(static_cast(x), static_cast(y), - static_cast(direction)); + static_cast(direction), "destination"); } void PlayerHandler::changeAction(const BeingAction::Action &action) const @@ -226,14 +226,14 @@ void PlayerHandler::changeAction(const BeingAction::Action &action) const } createOutPacket(CMSG_PLAYER_CHANGE_ACT); - outMsg.writeInt32(0); - outMsg.writeInt8(type); + outMsg.writeInt32(0, "unused"); + outMsg.writeInt8(type, "action"); } void PlayerHandler::respawn() const { createOutPacket(CMSG_PLAYER_RESTART); - outMsg.writeInt8(0); + outMsg.writeInt8(0, "action"); } void PlayerHandler::requestOnlineList() const -- cgit v1.2.3-70-g09d2