diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-06 08:12:03 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-06 08:14:37 -0600 |
commit | ffe62a721cf3c17b815da591af753e1424003a77 (patch) | |
tree | 6b3bd4dcec199ef10e138b7755d1c853db85a7d7 /src/net/ea | |
parent | 004b2853d37a18a67c348c29e4500f3ef68337b5 (diff) | |
download | mana-client-ffe62a721cf3c17b815da591af753e1424003a77.tar.gz mana-client-ffe62a721cf3c17b815da591af753e1424003a77.tar.bz2 mana-client-ffe62a721cf3c17b815da591af753e1424003a77.tar.xz mana-client-ffe62a721cf3c17b815da591af753e1424003a77.zip |
Add TMWServ's SkillHandler
Also namespace both Player- and TradeHandlers
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/playerhandler.cpp | 6 | ||||
-rw-r--r-- | src/net/ea/playerhandler.h | 4 | ||||
-rw-r--r-- | src/net/ea/skillhandler.cpp | 21 | ||||
-rw-r--r-- | src/net/ea/skillhandler.h | 10 | ||||
-rw-r--r-- | src/net/ea/tradehandler.cpp | 6 | ||||
-rw-r--r-- | src/net/ea/tradehandler.h | 4 |
6 files changed, 45 insertions, 6 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 29900730..8c9b6f5e 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -148,7 +148,9 @@ static const char *randomDeathMessage() return gettext(deadMsg[random]); } -PlayerHandler *playerHandler; +Net::PlayerHandler *playerHandler; + +namespace EAthena { PlayerHandler::PlayerHandler() { @@ -522,3 +524,5 @@ void PlayerHandler::ingoreAll(bool ignore) { // TODO } + +} // namespace EAthena diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h index 22f6a132..94ae952f 100644 --- a/src/net/ea/playerhandler.h +++ b/src/net/ea/playerhandler.h @@ -26,6 +26,8 @@ #include "net/net.h" #include "net/playerhandler.h" +namespace EAthena { + class PlayerHandler : public MessageHandler, public Net::PlayerHandler { public: @@ -56,6 +58,6 @@ class PlayerHandler : public MessageHandler, public Net::PlayerHandler void ingoreAll(bool ignore); }; -extern PlayerHandler *playerHandler; +} // namespace EAthena #endif // NET_EA_PLAYERHANDLER_H diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/skillhandler.cpp index 0475c057..0239a2c8 100644 --- a/src/net/ea/skillhandler.cpp +++ b/src/net/ea/skillhandler.cpp @@ -66,7 +66,9 @@ /** should always be zero if failed */ #define SKILL_FAILED 0x00 -SkillHandler *skillHandler; +Net::SkillHandler *skillHandler; + +namespace EAthena { SkillHandler::SkillHandler() { @@ -217,3 +219,20 @@ void SkillHandler::up(int skillId) MessageOut outMsg(CMSG_SKILL_LEVELUP_REQUEST); outMsg.writeInt16(skillId); } + +void SkillHandler::use(int skillId, int level, int beingId) +{ + // TODO +} + +void SkillHandler::use(int skillId, int level, int x, int y) +{ + // TODO +} + +void SkillHandler::use(int skillId, const std::string &map) +{ + // TODO +} + +} // namespace EAthena diff --git a/src/net/ea/skillhandler.h b/src/net/ea/skillhandler.h index b4e464ed..c1965213 100644 --- a/src/net/ea/skillhandler.h +++ b/src/net/ea/skillhandler.h @@ -26,6 +26,8 @@ #include "net/net.h" #include "net/skillhandler.h" +namespace EAthena { + class SkillHandler : public MessageHandler, public Net::SkillHandler { public: @@ -34,8 +36,14 @@ class SkillHandler : public MessageHandler, public Net::SkillHandler void handleMessage(MessageIn &msg); void up(int skillId); + + void use(int skillId, int level, int beingId); + + void use(int skillId, int level, int x, int y); + + void use(int skillId, const std::string &map); }; -extern SkillHandler *skillHandler; +} // namespace EAthena #endif // NET_EA_SKILLHANDLER_H diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp index b7f8e369..1bf7e303 100644 --- a/src/net/ea/tradehandler.cpp +++ b/src/net/ea/tradehandler.cpp @@ -53,7 +53,9 @@ namespace { } listener; } -TradeHandler *tradeHandler; +Net::TradeHandler *tradeHandler; + +namespace EAthena { TradeHandler::TradeHandler() { @@ -271,3 +273,5 @@ void TradeHandler::cancel() { MessageOut outMsg(CMSG_TRADE_CANCEL_REQUEST); } + +} // namespace EAthena diff --git a/src/net/ea/tradehandler.h b/src/net/ea/tradehandler.h index 451939f9..1d94b849 100644 --- a/src/net/ea/tradehandler.h +++ b/src/net/ea/tradehandler.h @@ -26,6 +26,8 @@ #include "net/net.h" #include "net/tradehandler.h" +namespace EAthena { + class TradeHandler : public MessageHandler, public Net::TradeHandler { public: @@ -50,6 +52,6 @@ class TradeHandler : public MessageHandler, public Net::TradeHandler void cancel(); }; -extern TradeHandler *tradeHandler; +} // namespace EAthena #endif // NET_EA_TRADEHANDLER_H |