From b7addc0a9a519cf9dcc3e804d9918ce4934a3e83 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 19 Sep 2014 17:33:16 +0300 Subject: Add comments for all output packets header. --- src/net/tmwa/playerhandler.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/net/tmwa/playerhandler.cpp') diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index baf8e43a4..08be2f53a 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -140,7 +140,7 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) void PlayerHandler::attack(const int id, const bool keep) const { - MessageOut outMsg(CMSG_PLAYER_CHANGE_ACT); + createOutPacket(CMSG_PLAYER_CHANGE_ACT); outMsg.writeInt32(id); if (keep) outMsg.writeInt8(7); @@ -150,12 +150,12 @@ void PlayerHandler::attack(const int id, const bool keep) const void PlayerHandler::stopAttack() const { - MessageOut outMsg(CMSG_PLAYER_STOP_ATTACK); + createOutPacket(CMSG_PLAYER_STOP_ATTACK); } void PlayerHandler::emote(const uint8_t emoteId) const { - MessageOut outMsg(CMSG_PLAYER_EMOTE); + createOutPacket(CMSG_PLAYER_EMOTE); outMsg.writeInt8(emoteId); } @@ -163,7 +163,7 @@ void PlayerHandler::increaseAttribute(const int attr) const { if (attr >= STR && attr <= LUK) { - MessageOut outMsg(CMSG_STAT_UPDATE_REQUEST); + createOutPacket(CMSG_STAT_UPDATE_REQUEST); outMsg.writeInt16(static_cast(attr)); outMsg.writeInt8(1); } @@ -174,7 +174,7 @@ void PlayerHandler::increaseSkill(const uint16_t skillId) const if (PlayerInfo::getAttribute(Attributes::SKILL_POINTS) <= 0) return; - MessageOut outMsg(CMSG_SKILL_LEVELUP_REQUEST); + createOutPacket(CMSG_SKILL_LEVELUP_REQUEST); outMsg.writeInt16(skillId); } @@ -183,7 +183,7 @@ void PlayerHandler::pickUp(const FloorItem *const floorItem) const if (!floorItem) return; - MessageOut outMsg(CMSG_ITEM_PICKUP); + createOutPacket(CMSG_ITEM_PICKUP); outMsg.writeInt32(floorItem->getId()); TmwAthena::InventoryHandler *const handler = static_cast(inventoryHandler); @@ -193,7 +193,7 @@ void PlayerHandler::pickUp(const FloorItem *const floorItem) const void PlayerHandler::setDirection(const unsigned char direction) const { - MessageOut outMsg(CMSG_PLAYER_CHANGE_DIR); + createOutPacket(CMSG_PLAYER_CHANGE_DIR); outMsg.writeInt16(0); outMsg.writeInt8(direction); } @@ -201,7 +201,7 @@ void PlayerHandler::setDirection(const unsigned char direction) const void PlayerHandler::setDestination(const int x, const int y, const int direction) const { - MessageOut outMsg(CMSG_PLAYER_CHANGE_DEST); + createOutPacket(CMSG_PLAYER_CHANGE_DEST); outMsg.writeCoordinates(static_cast(x), static_cast(y), static_cast(direction)); @@ -227,20 +227,20 @@ void PlayerHandler::changeAction(const BeingAction::Action &action) const return; } - MessageOut outMsg(CMSG_PLAYER_CHANGE_ACT); + createOutPacket(CMSG_PLAYER_CHANGE_ACT); outMsg.writeInt32(0); outMsg.writeInt8(type); } void PlayerHandler::respawn() const { - MessageOut outMsg(CMSG_PLAYER_RESTART); + createOutPacket(CMSG_PLAYER_RESTART); outMsg.writeInt8(0); } void PlayerHandler::requestOnlineList() const { - MessageOut outMsg(CMSG_ONLINE_LIST); + createOutPacket(CMSG_ONLINE_LIST); } void PlayerHandler::removeOption() const @@ -327,7 +327,7 @@ void PlayerHandler::processOnlineList(Net::MessageIn &msg) void PlayerHandler::updateStatus(const uint8_t status) const { - MessageOut outMsg(CMSG_SET_STATUS); + createOutPacket(CMSG_SET_STATUS); outMsg.writeInt8(status); outMsg.writeInt8(0); } -- cgit v1.2.3-60-g2f50