From fc199c3ae60d4c4cf76236c7f4891113daa3cbc4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 10 Apr 2013 20:54:27 +0300 Subject: improve skillhandler class. --- src/net/eathena/skillhandler.cpp | 8 +++++--- src/net/eathena/skillhandler.h | 10 ++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp index a36ba7435..75aae7608 100644 --- a/src/net/eathena/skillhandler.cpp +++ b/src/net/eathena/skillhandler.cpp @@ -69,7 +69,8 @@ void SkillHandler::handleMessage(Net::MessageIn &msg) } } -void SkillHandler::useBeing(int id, int level, int beingId) +void SkillHandler::useBeing(const int id, const int level, + const int beingId) const { MessageOut outMsg(CMSG_SKILL_USE_BEING); outMsg.writeInt16(static_cast(id)); @@ -77,7 +78,8 @@ void SkillHandler::useBeing(int id, int level, int beingId) outMsg.writeInt32(beingId); } -void SkillHandler::usePos(int id, int level, int x, int y) +void SkillHandler::usePos(const int id, const int level, + const int x, const int y) const { MessageOut outMsg(CMSG_SKILL_USE_POSITION); outMsg.writeInt16(static_cast(level)); @@ -86,7 +88,7 @@ void SkillHandler::usePos(int id, int level, int x, int y) outMsg.writeInt16(static_cast(y)); } -void SkillHandler::useMap(int id, const std::string &map) +void SkillHandler::useMap(const int id, const std::string &map) const { MessageOut outMsg(CMSG_SKILL_USE_MAP); outMsg.writeInt16(static_cast(id)); diff --git a/src/net/eathena/skillhandler.h b/src/net/eathena/skillhandler.h index be2025da7..a44718d3f 100644 --- a/src/net/eathena/skillhandler.h +++ b/src/net/eathena/skillhandler.h @@ -40,13 +40,15 @@ class SkillHandler final : public MessageHandler, public Ea::SkillHandler A_DELETE_COPY(SkillHandler) - void handleMessage(Net::MessageIn &msg); + void handleMessage(Net::MessageIn &msg) override; - void useBeing(int id, int level, int beingId); + void useBeing(const int id, const int level, + const int beingId) const override; - void usePos(int id, int level, int x, int y); + void usePos(const int id, const int level, + const int x, const int y) const override; - void useMap(int id, const std::string &map); + void useMap(const int id, const std::string &map) const override; }; } // namespace EAthena -- cgit v1.2.3-70-g09d2