diff options
Diffstat (limited to 'src/net/eathena/homunculushandler.cpp')
-rw-r--r-- | src/net/eathena/homunculushandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp index 26b7ed618..9837eccb5 100644 --- a/src/net/eathena/homunculushandler.cpp +++ b/src/net/eathena/homunculushandler.cpp @@ -61,8 +61,8 @@ void HomunculusHandler::move(const int x, const int y) const return; createOutPacket(CMSG_HOMMERC_MOVE_TO); outMsg.writeBeingId(id, "homunculus id"); - outMsg.writeCoordinates(static_cast<uint16_t>(x), - static_cast<uint16_t>(y), + outMsg.writeCoordinates(CAST_U16(x), + CAST_U16(y), 0U, "position"); } @@ -75,7 +75,7 @@ void HomunculusHandler::attack(const BeingId targetId, createOutPacket(CMSG_HOMMERC_ATTACK); outMsg.writeBeingId(id, "homunculus id"); outMsg.writeBeingId(targetId, "target id"); - outMsg.writeInt8(static_cast<int8_t>(keep == Keep_true ? 1 : 0), "keep"); + outMsg.writeInt8(CAST_S8(keep == Keep_true ? 1 : 0), "keep"); } void HomunculusHandler::feed() const @@ -104,8 +104,8 @@ void HomunculusHandler::talk(const std::string &restrict text) const const size_t sz = msg.size(); createOutPacket(CMSG_HOMMERC_TALK); - outMsg.writeInt16(static_cast<int16_t>(sz + 4 + 1), "len"); - outMsg.writeString(msg, static_cast<int>(sz), "message"); + outMsg.writeInt16(CAST_S16(sz + 4 + 1), "len"); + outMsg.writeString(msg, CAST_S32(sz), "message"); outMsg.writeInt8(0, "zero byte"); } |