summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/playerhandler.cpp')
-rw-r--r--src/net/eathena/playerhandler.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index c319c6e8d..c07fa4d13 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -69,7 +69,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, "increase");
}
}
@@ -109,9 +109,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
@@ -165,10 +165,10 @@ void PlayerHandler::setShortcut(const int idx,
const int level) const
{
createOutPacket(CMSG_SET_SHORTCUTS);
- outMsg.writeInt16(static_cast<int16_t>(idx), "index");
- outMsg.writeInt8(static_cast<int8_t>(type), "type");
+ outMsg.writeInt16(CAST_S16(idx), "index");
+ outMsg.writeInt8(CAST_S8(type), "type");
outMsg.writeInt32(id, "id");
- outMsg.writeInt16(static_cast<int16_t>(level), "level");
+ outMsg.writeInt16(CAST_S16(level), "level");
}
void PlayerHandler::shortcutShiftRow(const int row) const
@@ -176,7 +176,7 @@ void PlayerHandler::shortcutShiftRow(const int row) const
if (serverVersion != 0 && serverVersion < 11)
return;
createOutPacket(CMSG_SHORTCUTS_ROW_SHIFT);
- outMsg.writeInt8(static_cast<int8_t>(row), "row");
+ outMsg.writeInt8(CAST_S8(row), "row");
}
void PlayerHandler::removeOption() const
@@ -187,7 +187,7 @@ void PlayerHandler::removeOption() const
void PlayerHandler::changeCart(const int type) const
{
createOutPacket(CMSG_CHANGE_CART);
- outMsg.writeInt16(static_cast<int16_t>(type), "type");
+ outMsg.writeInt16(CAST_S16(type), "type");
}
void PlayerHandler::setMemo() const