diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
commit | 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch) | |
tree | 798117abd4dc7e610997d59d530a96ddc1509f53 /src/net/tmwa/skillhandler.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/net/tmwa/skillhandler.cpp')
-rw-r--r-- | src/net/tmwa/skillhandler.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/net/tmwa/skillhandler.cpp b/src/net/tmwa/skillhandler.cpp index abd2fd67e..87dc0e189 100644 --- a/src/net/tmwa/skillhandler.cpp +++ b/src/net/tmwa/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>(id), "skill id"); - outMsg.writeInt16(static_cast<int16_t>(level), "level"); + outMsg.writeInt16(CAST_S16(id), "skill id"); + outMsg.writeInt16(CAST_S16(level), "level"); outMsg.writeBeingId(beingId, "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), "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"); 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"); } |