summaryrefslogtreecommitdiff
path: root/src/net/eathena/skillhandler.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/eathena/skillhandler.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadmanaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/net/eathena/skillhandler.cpp')
-rw-r--r--src/net/eathena/skillhandler.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp
index 9fbaab265..fb56fae4b 100644
--- a/src/net/eathena/skillhandler.cpp
+++ b/src/net/eathena/skillhandler.cpp
@@ -42,8 +42,8 @@ void SkillHandler::useBeing(const int id, const int level,
const BeingId beingId) const
{
createOutPacket(CMSG_SKILL_USE_BEING);
- outMsg.writeInt16(static_cast<int16_t>(level), "skill level");
- outMsg.writeInt16(static_cast<int16_t>(id), "skill id");
+ outMsg.writeInt16(CAST_S16(level), "skill level");
+ outMsg.writeInt16(CAST_S16(id), "skill id");
outMsg.writeInt32(toInt(beingId, int), "target id");
}
@@ -51,10 +51,10 @@ void SkillHandler::usePos(const int id, const int level,
const int x, const int y) const
{
createOutPacket(CMSG_SKILL_USE_POSITION);
- outMsg.writeInt16(static_cast<int16_t>(level), "skill level");
- outMsg.writeInt16(static_cast<int16_t>(id), "skill id");
- outMsg.writeInt16(static_cast<int16_t>(x), "x");
- outMsg.writeInt16(static_cast<int16_t>(y), "y");
+ outMsg.writeInt16(CAST_S16(level), "skill level");
+ outMsg.writeInt16(CAST_S16(id), "skill id");
+ outMsg.writeInt16(CAST_S16(x), "x");
+ outMsg.writeInt16(CAST_S16(y), "y");
}
void SkillHandler::usePos(const int id, const int level,
@@ -62,17 +62,17 @@ void SkillHandler::usePos(const int id, const int level,
const std::string &text) const
{
createOutPacket(CMSG_SKILL_USE_POSITION_MORE);
- outMsg.writeInt16(static_cast<int16_t>(level), "level");
- outMsg.writeInt16(static_cast<int16_t>(id), "id");
- outMsg.writeInt16(static_cast<int16_t>(x), "x");
- outMsg.writeInt16(static_cast<int16_t>(y), "y");
+ outMsg.writeInt16(CAST_S16(level), "level");
+ outMsg.writeInt16(CAST_S16(id), "id");
+ outMsg.writeInt16(CAST_S16(x), "x");
+ outMsg.writeInt16(CAST_S16(y), "y");
outMsg.writeString(text, 80, "text");
}
void SkillHandler::useMap(const int id, const std::string &map) const
{
createOutPacket(CMSG_SKILL_USE_MAP);
- outMsg.writeInt16(static_cast<int16_t>(id), "skill id");
+ outMsg.writeInt16(CAST_S16(id), "skill id");
outMsg.writeString(map, 16, "map name");
}