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/ea/skillhandler.cpp | 11 +++-------- src/net/ea/skillhandler.h | 10 +++------- 2 files changed, 6 insertions(+), 15 deletions(-) (limited to 'src/net/ea') diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/skillhandler.cpp index ed2b1973d..1e517a729 100644 --- a/src/net/ea/skillhandler.cpp +++ b/src/net/ea/skillhandler.cpp @@ -71,12 +71,7 @@ SkillHandler::SkillHandler() { } -void SkillHandler::use(int id A_UNUSED) -{ - // TODO -} - -void SkillHandler::processPlayerSkills(Net::MessageIn &msg) +void SkillHandler::processPlayerSkills(Net::MessageIn &msg) const { msg.readInt16(); // length const int skillCount = (msg.getLength() - 4) / 37; @@ -106,7 +101,7 @@ void SkillHandler::processPlayerSkills(Net::MessageIn &msg) skillDialog->playUpdateEffect(updateSkill); } -void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg) +void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg) const { const int skillId = msg.readInt16(); const int level = msg.readInt16(); @@ -124,7 +119,7 @@ void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg) } } -void SkillHandler::processSkillFailed(Net::MessageIn &msg) +void SkillHandler::processSkillFailed(Net::MessageIn &msg) const { // Action failed (ex. sit because you have not reached the // right level) diff --git a/src/net/ea/skillhandler.h b/src/net/ea/skillhandler.h index c07cb7c46..f0be31d58 100644 --- a/src/net/ea/skillhandler.h +++ b/src/net/ea/skillhandler.h @@ -37,15 +37,11 @@ class SkillHandler : public Net::SkillHandler A_DELETE_COPY(SkillHandler) - void handleMessage(Net::MessageIn &msg); + void processPlayerSkills(Net::MessageIn &msg) const; - void use(int id); + void processPlayerSkillUp(Net::MessageIn &msg) const; - void processPlayerSkills(Net::MessageIn &msg); - - void processPlayerSkillUp(Net::MessageIn &msg); - - void processSkillFailed(Net::MessageIn &msg); + void processSkillFailed(Net::MessageIn &msg) const; }; } // namespace Ea -- cgit v1.2.3-70-g09d2