From 178f4811e8602ba7dacb1a0513baa546088d517d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 8 Feb 2012 02:13:16 +0300 Subject: Fix compilation errors and more style. --- src/net/ea/gamehandler.cpp | 12 ++++++------ src/net/ea/gamehandler.h | 6 +++--- src/net/manaserv/generalhandler.cpp | 14 +++++++------- src/net/manaserv/generalhandler.h | 4 ++-- src/net/tmwa/generalhandler.cpp | 10 +++++----- src/net/tmwa/generalhandler.h | 4 ++-- 6 files changed, 25 insertions(+), 25 deletions(-) (limited to 'src/net') diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp index b7566e271..6d021d6a9 100644 --- a/src/net/ea/gamehandler.cpp +++ b/src/net/ea/gamehandler.cpp @@ -43,20 +43,20 @@ GameHandler::GameHandler() { mCharID = 0; - listen(Mana::CHANNEL_GAME); + listen(CHANNEL_GAME); } -void GameHandler::processEvent(Mana::Channels channel, - const Mana::Event &event) +void GameHandler::processEvent(Channels channel, + const Event &event) { - if (channel == Mana::CHANNEL_GAME) + if (channel == CHANNEL_GAME) { - if (event.getName() == Mana::EVENT_ENGINESINITALIZED) + if (event.getName() == EVENT_ENGINESINITALIZED) { if (mMap != "") Game::instance()->changeMap(mMap); } - else if (event.getName() == Mana::EVENT_MAPLOADED) + else if (event.getName() == EVENT_MAPLOADED) { mapLoadedEvent(); } diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h index 248175617..59cb148c4 100644 --- a/src/net/ea/gamehandler.h +++ b/src/net/ea/gamehandler.h @@ -32,13 +32,13 @@ namespace Ea { -class GameHandler : public Net::GameHandler, public Mana::Listener +class GameHandler : public Net::GameHandler, public Listener { public: GameHandler(); - virtual void processEvent(Mana::Channels channel, - const Mana::Event &event); + virtual void processEvent(Channels channel, + const Event &event); virtual void who(); diff --git a/src/net/manaserv/generalhandler.cpp b/src/net/manaserv/generalhandler.cpp index 584faa368..d95c98d23 100644 --- a/src/net/manaserv/generalhandler.cpp +++ b/src/net/manaserv/generalhandler.cpp @@ -93,8 +93,8 @@ GeneralHandler::GeneralHandler(): generalHandler = this; - listen(Mana::CHANNEL_CLIENT); - listen(Mana::CHANNEL_GAME); + listen(CHANNEL_CLIENT); + listen(CHANNEL_GAME); } void GeneralHandler::load() @@ -176,10 +176,10 @@ void GeneralHandler::clearHandlers() clearNetworkHandlers(); } -void GeneralHandler::processEvent(Mana::Channels channel, - const Mana::Event &event) +void GeneralHandler::processEvent(Channels channel, + const Event &event) { - if (channel == Mana::CHANNEL_CLIENT) + if (channel == CHANNEL_CLIENT) { int newState = event.getInt("newState"); @@ -195,9 +195,9 @@ void GeneralHandler::processEvent(Mana::Channels channel, Attributes::informItemDB(); } } - else if (channel == Mana::CHANNEL_GAME) + else if (channel == CHANNEL_GAME) { - if (event.getName() == Mana::EVENT_GUIWINDOWSLOADED) + if (event.getName() == EVENT_GUIWINDOWSLOADED) { inventoryWindow->setSplitAllowed(true); skillDialog->loadSkills("mana-skills.xml"); diff --git a/src/net/manaserv/generalhandler.h b/src/net/manaserv/generalhandler.h index fcb28c846..6ea5c7845 100644 --- a/src/net/manaserv/generalhandler.h +++ b/src/net/manaserv/generalhandler.h @@ -33,7 +33,7 @@ namespace ManaServ { -class GeneralHandler : public Net::GeneralHandler, public Mana::Listener +class GeneralHandler : public Net::GeneralHandler, public Listener { public: GeneralHandler(); @@ -50,7 +50,7 @@ class GeneralHandler : public Net::GeneralHandler, public Mana::Listener void clearHandlers(); - void processEvent(Mana::Channels channel, const Mana::Event &event); + void processEvent(Channels channel, const Event &event); protected: MessageHandlerPtr mBeingHandler; diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index a666fa5f4..77c91e1dd 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -244,12 +244,12 @@ void GeneralHandler::clearHandlers() mNetwork->clearHandlers(); } -void GeneralHandler::processEvent(Mana::Channels channel, - const Mana::Event &event) +void GeneralHandler::processEvent(Channels channel, + const Event &event) { - if (channel == Mana::CHANNEL_GAME) + if (channel == CHANNEL_GAME) { - if (event.getName() == Mana::EVENT_GUIWINDOWSLOADED) + if (event.getName() == EVENT_GUIWINDOWSLOADED) { if (inventoryWindow) inventoryWindow->setSplitAllowed(false); @@ -288,7 +288,7 @@ void GeneralHandler::processEvent(Mana::Channels channel, statusWindow->addAttribute(ATTACK_SPEED, _("Damage per sec."), false, ""); } - else if (event.getName() == Mana::EVENT_GUIWINDOWSUNLOADING) + else if (event.getName() == EVENT_GUIWINDOWSUNLOADING) { if (socialWindow) { diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h index b250ddfd4..73f7a0e1b 100644 --- a/src/net/tmwa/generalhandler.h +++ b/src/net/tmwa/generalhandler.h @@ -34,7 +34,7 @@ namespace TmwAthena { class GeneralHandler : public MessageHandler, public Net::GeneralHandler, - public Mana::Listener + public Listener { public: GeneralHandler(); @@ -53,7 +53,7 @@ class GeneralHandler : public MessageHandler, public Net::GeneralHandler, void clearHandlers(); - void processEvent(Mana::Channels channel, const Mana::Event &event); + void processEvent(Channels channel, const Event &event); void reloadPartially(); -- cgit v1.2.3-70-g09d2