summaryrefslogtreecommitdiff
path: root/src/net/tmwa/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/net/tmwa/playerhandler.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/net/tmwa/playerhandler.cpp')
-rw-r--r--src/net/tmwa/playerhandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index f0ea94947..8f7de1e64 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -70,7 +70,7 @@ void PlayerHandler::increaseAttribute(const AttributesT attr) const
if (attr >= Attributes::STR && attr <= Attributes::LUK)
{
createOutPacket(CMSG_STAT_UPDATE_REQUEST);
- outMsg.writeInt16(static_cast<int16_t>(attr), "attribute id");
+ outMsg.writeInt16(CAST_S16(attr), "attribute id");
outMsg.writeInt8(1, "increment");
}
}
@@ -108,9 +108,9 @@ void PlayerHandler::setDestination(const int x, const int y,
const int direction) const
{
createOutPacket(CMSG_PLAYER_CHANGE_DEST);
- outMsg.writeCoordinates(static_cast<uint16_t>(x),
- static_cast<uint16_t>(y),
- static_cast<unsigned char>(direction), "destination");
+ outMsg.writeCoordinates(CAST_U16(x),
+ CAST_U16(y),
+ CAST_U8(direction), "destination");
}
void PlayerHandler::changeAction(const BeingActionT &action) const