diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-24 15:44:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-24 15:44:24 +0300 |
commit | a5f9e965323ad4b211405736eda7557cbe6a013a (patch) | |
tree | 21409cd38f547c80637e7ebfa60fe435df7f7d87 | |
parent | 66964dacb5c0d885fa3443a0e204d5838ae1443c (diff) | |
download | manaplus-a5f9e965323ad4b211405736eda7557cbe6a013a.tar.gz manaplus-a5f9e965323ad4b211405736eda7557cbe6a013a.tar.bz2 manaplus-a5f9e965323ad4b211405736eda7557cbe6a013a.tar.xz manaplus-a5f9e965323ad4b211405736eda7557cbe6a013a.zip |
Rename specialhandler to skillhandler.
-rw-r--r-- | src/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/Makefile.am | 14 | ||||
-rw-r--r-- | src/gui/skilldialog.cpp | 6 | ||||
-rw-r--r-- | src/localplayer.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/skillhandler.cpp (renamed from src/net/ea/specialhandler.cpp) | 12 | ||||
-rw-r--r-- | src/net/ea/skillhandler.h (renamed from src/net/ea/specialhandler.h) | 8 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 6 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/skillhandler.cpp (renamed from src/net/eathena/specialhandler.cpp) | 18 | ||||
-rw-r--r-- | src/net/eathena/skillhandler.h (renamed from src/net/eathena/specialhandler.h) | 10 | ||||
-rw-r--r-- | src/net/net.cpp | 8 | ||||
-rw-r--r-- | src/net/net.h | 4 | ||||
-rw-r--r-- | src/net/skillhandler.h (renamed from src/net/specialhandler.h) | 10 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 6 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/skillhandler.cpp (renamed from src/net/tmwa/specialhandler.cpp) | 22 | ||||
-rw-r--r-- | src/net/tmwa/skillhandler.h (renamed from src/net/tmwa/specialhandler.h) | 10 |
17 files changed, 77 insertions, 77 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b32459621..d86d4d3de 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -400,7 +400,7 @@ SET(SRCS net/partyhandler.h net/playerhandler.h net/serverinfo.h - net/specialhandler.h + net/skillhandler.h net/tradehandler.h net/worldinfo.h net/packetcounters.cpp @@ -773,8 +773,8 @@ SET(SRCS_EVOL net/ea/partyhandler.h net/ea/playerhandler.cpp net/ea/playerhandler.h - net/ea/specialhandler.cpp - net/ea/specialhandler.h + net/ea/skillhandler.cpp + net/ea/skillhandler.h net/ea/token.h net/ea/tradehandler.cpp net/ea/tradehandler.h @@ -824,8 +824,8 @@ SET(SRCS_TMWA net/tmwa/protocol.h net/tmwa/questhandler.cpp net/tmwa/questhandler.h - net/tmwa/specialhandler.cpp - net/tmwa/specialhandler.h + net/tmwa/skillhandler.cpp + net/tmwa/skillhandler.h net/tmwa/tradehandler.cpp net/tmwa/tradehandler.h ) @@ -872,8 +872,8 @@ SET(SRCS_EATHENA net/eathena/playerhandler.cpp net/eathena/playerhandler.h net/eathena/protocol.h - net/eathena/specialhandler.cpp - net/eathena/specialhandler.h + net/eathena/skillhandler.cpp + net/eathena/skillhandler.h net/eathena/tradehandler.cpp net/eathena/tradehandler.h ) diff --git a/src/Makefile.am b/src/Makefile.am index 63e3247f6..b6cca8f67 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -401,7 +401,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \ net/partyhandler.h \ net/playerhandler.h \ net/serverinfo.h \ - net/specialhandler.h \ + net/skillhandler.h \ net/tradehandler.h \ net/worldinfo.h \ net/packetcounters.cpp \ @@ -696,8 +696,8 @@ manaplus_SOURCES += \ net/ea/partyhandler.h \ net/ea/playerhandler.cpp \ net/ea/playerhandler.h \ - net/ea/specialhandler.cpp \ - net/ea/specialhandler.h \ + net/ea/skillhandler.cpp \ + net/ea/skillhandler.h \ net/ea/token.h \ net/ea/tradehandler.cpp \ net/ea/tradehandler.h \ @@ -744,8 +744,8 @@ manaplus_SOURCES += \ net/tmwa/protocol.h \ net/tmwa/questhandler.cpp \ net/tmwa/questhandler.h \ - net/tmwa/specialhandler.cpp \ - net/tmwa/specialhandler.h \ + net/tmwa/skillhandler.cpp \ + net/tmwa/skillhandler.h \ net/tmwa/tradehandler.cpp \ net/tmwa/tradehandler.h @@ -792,8 +792,8 @@ manaplus_SOURCES += net/eathena/gui/guildtab.cpp \ net/eathena/playerhandler.cpp \ net/eathena/playerhandler.h \ net/eathena/protocol.h \ - net/eathena/specialhandler.cpp \ - net/eathena/specialhandler.h \ + net/eathena/skillhandler.cpp \ + net/eathena/skillhandler.h \ net/eathena/tradehandler.cpp \ net/eathena/tradehandler.h endif diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp index ee248562a..11b11ba8e 100644 --- a/src/gui/skilldialog.cpp +++ b/src/gui/skilldialog.cpp @@ -41,7 +41,7 @@ #include "net/net.h" #include "net/playerhandler.h" -#include "net/specialhandler.h" +#include "net/skillhandler.h" #include "resources/image.h" #include "resources/resourcemanager.h" @@ -345,7 +345,7 @@ void SkillDialog::action(const gcn::ActionEvent &event) const Being *const being = player_node->getTarget(); if (being) { - Net::getSpecialHandler()->useBeing(info->level, + Net::getSkillHandler()->useBeing(info->level, info->id, being->getId()); } } @@ -627,7 +627,7 @@ void SkillDialog::useItem(const int itemId) const Being *const being = player_node->getTarget(); if (being) { - Net::getSpecialHandler()->useBeing(info->level, + Net::getSkillHandler()->useBeing(info->level, info->id, being->getId()); } } diff --git a/src/localplayer.cpp b/src/localplayer.cpp index f7a95625f..a9213f75e 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -61,7 +61,7 @@ #include "net/net.h" #include "net/partyhandler.h" #include "net/playerhandler.h" -#include "net/specialhandler.h" +#include "net/skillhandler.h" #include "net/tradehandler.h" #include "resources/imageset.h" diff --git a/src/net/ea/specialhandler.cpp b/src/net/ea/skillhandler.cpp index 6f9b346a3..45177f7e6 100644 --- a/src/net/ea/specialhandler.cpp +++ b/src/net/ea/skillhandler.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "net/ea/specialhandler.h" +#include "net/ea/skillhandler.h" #include "logger.h" #include "localplayer.h" @@ -68,16 +68,16 @@ static const unsigned int SKILL_FAILED = 0x00; namespace Ea { -SpecialHandler::SpecialHandler() +SkillHandler::SkillHandler() { } -void SpecialHandler::use(int id A_UNUSED) +void SkillHandler::use(int id A_UNUSED) { // TODO } -void SpecialHandler::processPlayerSkills(Net::MessageIn &msg) +void SkillHandler::processPlayerSkills(Net::MessageIn &msg) { msg.readInt16(); // length const int skillCount = (msg.getLength() - 4) / 37; @@ -102,7 +102,7 @@ void SpecialHandler::processPlayerSkills(Net::MessageIn &msg) } } -void SpecialHandler::processPlayerSkillUp(Net::MessageIn &msg) +void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg) { const int skillId = msg.readInt16(); const int level = msg.readInt16(); @@ -118,7 +118,7 @@ void SpecialHandler::processPlayerSkillUp(Net::MessageIn &msg) } } -void SpecialHandler::processSkillFailed(Net::MessageIn &msg) +void SkillHandler::processSkillFailed(Net::MessageIn &msg) { // Action failed (ex. sit because you have not reached the // right level) diff --git a/src/net/ea/specialhandler.h b/src/net/ea/skillhandler.h index 3c3317251..c07cb7c46 100644 --- a/src/net/ea/specialhandler.h +++ b/src/net/ea/skillhandler.h @@ -25,17 +25,17 @@ #include "net/messagein.h" #include "net/net.h" -#include "net/specialhandler.h" +#include "net/skillhandler.h" namespace Ea { -class SpecialHandler : public Net::SpecialHandler +class SkillHandler : public Net::SkillHandler { public: - SpecialHandler(); + SkillHandler(); - A_DELETE_COPY(SpecialHandler) + A_DELETE_COPY(SkillHandler) void handleMessage(Net::MessageIn &msg); diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index 5ac27b5cc..c656b944d 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -53,7 +53,7 @@ #include "net/eathena/playerhandler.h" #include "net/eathena/protocol.h" #include "net/eathena/tradehandler.h" -#include "net/eathena/specialhandler.h" +#include "net/eathena/skillhandler.h" #include "net/eathena/gui/guildtab.h" #include "net/eathena/gui/partytab.h" @@ -87,7 +87,7 @@ GeneralHandler::GeneralHandler() : mNpcHandler(new NpcHandler), mPartyHandler(new PartyHandler), mPlayerHandler(new PlayerHandler), - mSpecialHandler(new SpecialHandler), + mSkillHandler(new SkillHandler), mTradeHandler(new TradeHandler) { static const uint16_t _messages[] = @@ -183,7 +183,7 @@ void GeneralHandler::load() mNetwork->registerHandler(mLoginHandler.get()); mNetwork->registerHandler(mNpcHandler.get()); mNetwork->registerHandler(mPlayerHandler.get()); - mNetwork->registerHandler(mSpecialHandler.get()); + mNetwork->registerHandler(mSkillHandler.get()); mNetwork->registerHandler(mTradeHandler.get()); mNetwork->registerHandler(mPartyHandler.get()); } diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h index 23b9cf66b..58c0d1e2e 100644 --- a/src/net/eathena/generalhandler.h +++ b/src/net/eathena/generalhandler.h @@ -77,7 +77,7 @@ class GeneralHandler final : public MessageHandler, MessageHandlerPtr mNpcHandler; MessageHandlerPtr mPartyHandler; MessageHandlerPtr mPlayerHandler; - MessageHandlerPtr mSpecialHandler; + MessageHandlerPtr mSkillHandler; MessageHandlerPtr mTradeHandler; }; diff --git a/src/net/eathena/specialhandler.cpp b/src/net/eathena/skillhandler.cpp index e30dc6024..a36ba7435 100644 --- a/src/net/eathena/specialhandler.cpp +++ b/src/net/eathena/skillhandler.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "net/eathena/specialhandler.h" +#include "net/eathena/skillhandler.h" #include "logger.h" @@ -28,14 +28,14 @@ #include "debug.h" -extern Net::SpecialHandler *specialHandler; +extern Net::SkillHandler *skillHandler; namespace EAthena { -SpecialHandler::SpecialHandler() : +SkillHandler::SkillHandler() : MessageHandler(), - Ea::SpecialHandler() + Ea::SkillHandler() { static const uint16_t _messages[] = { @@ -45,10 +45,10 @@ SpecialHandler::SpecialHandler() : 0 }; handledMessages = _messages; - specialHandler = this; + skillHandler = this; } -void SpecialHandler::handleMessage(Net::MessageIn &msg) +void SkillHandler::handleMessage(Net::MessageIn &msg) { switch (msg.getId()) { @@ -69,7 +69,7 @@ void SpecialHandler::handleMessage(Net::MessageIn &msg) } } -void SpecialHandler::useBeing(int id, int level, int beingId) +void SkillHandler::useBeing(int id, int level, int beingId) { MessageOut outMsg(CMSG_SKILL_USE_BEING); outMsg.writeInt16(static_cast<int16_t>(id)); @@ -77,7 +77,7 @@ void SpecialHandler::useBeing(int id, int level, int beingId) outMsg.writeInt32(beingId); } -void SpecialHandler::usePos(int id, int level, int x, int y) +void SkillHandler::usePos(int id, int level, int x, int y) { MessageOut outMsg(CMSG_SKILL_USE_POSITION); outMsg.writeInt16(static_cast<int16_t>(level)); @@ -86,7 +86,7 @@ void SpecialHandler::usePos(int id, int level, int x, int y) outMsg.writeInt16(static_cast<int16_t>(y)); } -void SpecialHandler::useMap(int id, const std::string &map) +void SkillHandler::useMap(int id, const std::string &map) { MessageOut outMsg(CMSG_SKILL_USE_MAP); outMsg.writeInt16(static_cast<int16_t>(id)); diff --git a/src/net/eathena/specialhandler.h b/src/net/eathena/skillhandler.h index 8e77a8439..be2025da7 100644 --- a/src/net/eathena/specialhandler.h +++ b/src/net/eathena/skillhandler.h @@ -24,21 +24,21 @@ #define NET_EATHENA_SKILLHANDLER_H #include "net/net.h" -#include "net/specialhandler.h" +#include "net/skillhandler.h" -#include "net/ea/specialhandler.h" +#include "net/ea/skillhandler.h" #include "net/eathena/messagehandler.h" namespace EAthena { -class SpecialHandler final : public MessageHandler, public Ea::SpecialHandler +class SkillHandler final : public MessageHandler, public Ea::SkillHandler { public: - SpecialHandler(); + SkillHandler(); - A_DELETE_COPY(SpecialHandler) + A_DELETE_COPY(SkillHandler) void handleMessage(Net::MessageIn &msg); diff --git a/src/net/net.cpp b/src/net/net.cpp index af8c9ad1d..e614f9dc6 100644 --- a/src/net/net.cpp +++ b/src/net/net.cpp @@ -37,7 +37,7 @@ #include "net/npchandler.h" #include "net/partyhandler.h" #include "net/playerhandler.h" -#include "net/specialhandler.h" +#include "net/skillhandler.h" #include "net/tradehandler.h" #include "net/tmwa/generalhandler.h" @@ -63,7 +63,7 @@ Net::GuildHandler *guildHandler = nullptr; Net::NpcHandler *npcHandler = nullptr; Net::PartyHandler *partyHandler = nullptr; Net::PlayerHandler *playerHandler = nullptr; -Net::SpecialHandler *specialHandler = nullptr; +Net::SkillHandler *skillHandler = nullptr; Net::TradeHandler *tradeHandler = nullptr; Net::BeingHandler *beingHandler = nullptr; Net::BuySellHandler *buySellHandler = nullptr; @@ -123,9 +123,9 @@ Net::PlayerHandler *Net::getPlayerHandler() return playerHandler; } -Net::SpecialHandler *Net::getSpecialHandler() +Net::SkillHandler *Net::getSkillHandler() { - return specialHandler; + return skillHandler; } Net::TradeHandler *Net::getTradeHandler() diff --git a/src/net/net.h b/src/net/net.h index b92d470f0..0be63a3de 100644 --- a/src/net/net.h +++ b/src/net/net.h @@ -48,7 +48,7 @@ class LoginHandler; class NpcHandler; class PartyHandler; class PlayerHandler; -class SpecialHandler; +class SkillHandler; class TradeHandler; class BuySellHandler; @@ -64,7 +64,7 @@ LoginHandler *getLoginHandler() A_WARN_UNUSED; NpcHandler *getNpcHandler() A_WARN_UNUSED; PartyHandler *getPartyHandler() A_WARN_UNUSED; PlayerHandler *getPlayerHandler() A_WARN_UNUSED; -SpecialHandler *getSpecialHandler() A_WARN_UNUSED; +SkillHandler *getSkillHandler() A_WARN_UNUSED; TradeHandler *getTradeHandler() A_WARN_UNUSED; BuySellHandler *getBuySellHandler() A_WARN_UNUSED; diff --git a/src/net/specialhandler.h b/src/net/skillhandler.h index dea0719e0..fa044ebd6 100644 --- a/src/net/specialhandler.h +++ b/src/net/skillhandler.h @@ -20,17 +20,17 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SPECIALHANDLER_H -#define SPECIALHANDLER_H +#ifndef SKILLHANDLER_H +#define SKILLHANDLER_H #include <iosfwd> namespace Net { -class SpecialHandler +class SkillHandler { public: - virtual ~SpecialHandler () + virtual ~SkillHandler () { } virtual void use(int id) = 0; @@ -43,4 +43,4 @@ class SpecialHandler }; } -#endif // SPECIALHANDLER_H +#endif // SKILLHANDLER_H diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index dc1ae6aba..c366efc9d 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -53,7 +53,7 @@ #include "net/tmwa/playerhandler.h" #include "net/tmwa/protocol.h" #include "net/tmwa/tradehandler.h" -#include "net/tmwa/specialhandler.h" +#include "net/tmwa/skillhandler.h" #include "net/tmwa/questhandler.h" #include "net/tmwa/gui/guildtab.h" @@ -88,7 +88,7 @@ GeneralHandler::GeneralHandler() : mNpcHandler(new NpcHandler), mPartyHandler(new PartyHandler), mPlayerHandler(new PlayerHandler), - mSpecialHandler(new SpecialHandler), + mSkillHandler(new SkillHandler), mTradeHandler(new TradeHandler), mQuestHandler(new QuestHandler) { @@ -187,7 +187,7 @@ void GeneralHandler::load() mNetwork->registerHandler(mLoginHandler.get()); mNetwork->registerHandler(mNpcHandler.get()); mNetwork->registerHandler(mPlayerHandler.get()); - mNetwork->registerHandler(mSpecialHandler.get()); + mNetwork->registerHandler(mSkillHandler.get()); mNetwork->registerHandler(mTradeHandler.get()); mNetwork->registerHandler(mPartyHandler.get()); mNetwork->registerHandler(mQuestHandler.get()); diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h index f404d939e..2fcc625d1 100644 --- a/src/net/tmwa/generalhandler.h +++ b/src/net/tmwa/generalhandler.h @@ -74,7 +74,7 @@ class GeneralHandler final : public MessageHandler, public Net::GeneralHandler, MessageHandlerPtr mNpcHandler; MessageHandlerPtr mPartyHandler; MessageHandlerPtr mPlayerHandler; - MessageHandlerPtr mSpecialHandler; + MessageHandlerPtr mSkillHandler; MessageHandlerPtr mTradeHandler; MessageHandlerPtr mQuestHandler; }; diff --git a/src/net/tmwa/specialhandler.cpp b/src/net/tmwa/skillhandler.cpp index 51f447282..72ab4b6ec 100644 --- a/src/net/tmwa/specialhandler.cpp +++ b/src/net/tmwa/skillhandler.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "net/tmwa/specialhandler.h" +#include "net/tmwa/skillhandler.h" #include "logger.h" @@ -28,14 +28,14 @@ #include "debug.h" -extern Net::SpecialHandler *specialHandler; +extern Net::SkillHandler *skillHandler; namespace TmwAthena { -SpecialHandler::SpecialHandler() : +SkillHandler::SkillHandler() : MessageHandler(), - Ea::SpecialHandler() + Ea::SkillHandler() { static const uint16_t _messages[] = { @@ -45,12 +45,12 @@ SpecialHandler::SpecialHandler() : 0 }; handledMessages = _messages; - specialHandler = this; + skillHandler = this; } -void SpecialHandler::handleMessage(Net::MessageIn &msg) +void SkillHandler::handleMessage(Net::MessageIn &msg) { - BLOCK_START("SpecialHandler::handleMessage") + BLOCK_START("SkillHandler::handleMessage") switch (msg.getId()) { case SMSG_PLAYER_SKILLS: @@ -68,10 +68,10 @@ void SpecialHandler::handleMessage(Net::MessageIn &msg) default: break; } - BLOCK_END("SpecialHandler::handleMessage") + BLOCK_END("SkillHandler::handleMessage") } -void SpecialHandler::useBeing(int id, int level, int beingId) +void SkillHandler::useBeing(int id, int level, int beingId) { MessageOut outMsg(CMSG_SKILL_USE_BEING); outMsg.writeInt16(static_cast<int16_t>(id)); @@ -79,7 +79,7 @@ void SpecialHandler::useBeing(int id, int level, int beingId) outMsg.writeInt32(beingId); } -void SpecialHandler::usePos(int id, int level, int x, int y) +void SkillHandler::usePos(int id, int level, int x, int y) { MessageOut outMsg(CMSG_SKILL_USE_POSITION); outMsg.writeInt16(static_cast<int16_t>(level)); @@ -88,7 +88,7 @@ void SpecialHandler::usePos(int id, int level, int x, int y) outMsg.writeInt16(static_cast<int16_t>(y)); } -void SpecialHandler::useMap(int id, const std::string &map) +void SkillHandler::useMap(int id, const std::string &map) { MessageOut outMsg(CMSG_SKILL_USE_MAP); outMsg.writeInt16(static_cast<int16_t>(id)); diff --git a/src/net/tmwa/specialhandler.h b/src/net/tmwa/skillhandler.h index 5a72e59b7..a7db40a2d 100644 --- a/src/net/tmwa/specialhandler.h +++ b/src/net/tmwa/skillhandler.h @@ -24,21 +24,21 @@ #define NET_TA_SKILLHANDLER_H #include "net/net.h" -#include "net/specialhandler.h" +#include "net/skillhandler.h" -#include "net/ea/specialhandler.h" +#include "net/ea/skillhandler.h" #include "net/tmwa/messagehandler.h" namespace TmwAthena { -class SpecialHandler final : public MessageHandler, public Ea::SpecialHandler +class SkillHandler final : public MessageHandler, public Ea::SkillHandler { public: - SpecialHandler(); + SkillHandler(); - A_DELETE_COPY(SpecialHandler) + A_DELETE_COPY(SkillHandler) void handleMessage(Net::MessageIn &msg); |