From 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 14:30:20 +0300 Subject: Add strong typed int type BeingId. --- src/net/tmwa/playerhandler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/net/tmwa/playerhandler.cpp') diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index c78382f27..95b157c00 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -124,10 +124,11 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) BLOCK_END("PlayerHandler::handleMessage") } -void PlayerHandler::attack(const int id, const Keep keep) const +void PlayerHandler::attack(const BeingId id, + const Keep keep) const { createOutPacket(CMSG_PLAYER_CHANGE_ACT); - outMsg.writeInt32(id, "target id"); + outMsg.writeBeingId(id, "target id"); if (keep == Keep_true) outMsg.writeInt8(7, "action"); else @@ -170,7 +171,7 @@ void PlayerHandler::pickUp(const FloorItem *const floorItem) const return; createOutPacket(CMSG_ITEM_PICKUP); - outMsg.writeInt32(floorItem->getId(), "object id"); + outMsg.writeBeingId(floorItem->getId(), "object id"); TmwAthena::InventoryHandler *const handler = static_cast(inventoryHandler); if (handler) -- cgit v1.2.3-70-g09d2