summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-22 01:44:36 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-22 01:44:36 +0300
commit2925b20acb9f70d032cd5981687642a770778c53 (patch)
treee9dd3bd137dd359b8a0845487520ac28f5e3bdb7 /src
parentab0b6df9f69a736f79d2233508d8aa88b8e11800 (diff)
downloadManaVerse-2925b20acb9f70d032cd5981687642a770778c53.tar.gz
ManaVerse-2925b20acb9f70d032cd5981687642a770778c53.tar.bz2
ManaVerse-2925b20acb9f70d032cd5981687642a770778c53.tar.xz
ManaVerse-2925b20acb9f70d032cd5981687642a770778c53.zip
Rename object event to depricatedevent because current implimentation very
bad and must be replaced with better implimentation.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/Makefile.am4
-rw-r--r--src/client.cpp10
-rw-r--r--src/depricatedevent.cpp (renamed from src/event.cpp)30
-rw-r--r--src/depricatedevent.h (renamed from src/event.h)40
-rw-r--r--src/game.cpp30
-rw-r--r--src/gui/chatwindow.cpp2
-rw-r--r--src/gui/chatwindow.h2
-rw-r--r--src/gui/inventorywindow.cpp2
-rw-r--r--src/gui/inventorywindow.h2
-rw-r--r--src/gui/killstats.cpp4
-rw-r--r--src/gui/killstats.h2
-rw-r--r--src/gui/ministatuswindow.cpp2
-rw-r--r--src/gui/ministatuswindow.h2
-rw-r--r--src/gui/statuswindow.cpp4
-rw-r--r--src/gui/statuswindow.h2
-rw-r--r--src/listener.cpp8
-rw-r--r--src/listener.h5
-rw-r--r--src/localplayer.cpp2
-rw-r--r--src/localplayer.h2
-rw-r--r--src/net/ea/buysellhandler.cpp2
-rw-r--r--src/net/ea/gamehandler.cpp4
-rw-r--r--src/net/ea/gamehandler.h2
-rw-r--r--src/net/ea/guildhandler.cpp2
-rw-r--r--src/net/ea/tradehandler.cpp2
-rw-r--r--src/net/manaserv/generalhandler.cpp2
-rw-r--r--src/net/manaserv/generalhandler.h2
-rw-r--r--src/net/manaserv/guildhandler.cpp2
-rw-r--r--src/net/manaserv/partyhandler.cpp2
-rw-r--r--src/net/manaserv/tradehandler.cpp2
-rw-r--r--src/net/tmwa/adminhandler.cpp2
-rw-r--r--src/net/tmwa/buysellhandler.cpp2
-rw-r--r--src/net/tmwa/chathandler.cpp2
-rw-r--r--src/net/tmwa/gamehandler.cpp2
-rw-r--r--src/net/tmwa/generalhandler.cpp2
-rw-r--r--src/net/tmwa/generalhandler.h2
-rw-r--r--src/playerinfo.cpp16
37 files changed, 108 insertions, 101 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7e7d60886..8653c2ef7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -520,13 +520,13 @@ SET(SRCS
debug.h
defaults.cpp
defaults.h
+ depricatedevent.cpp
+ depricatedevent.h
effectmanager.cpp
effectmanager.h
emoteshortcut.cpp
emoteshortcut.h
equipment.h
- event.cpp
- event.h
flooritem.cpp
flooritem.h
game.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 06b457e4b..abb65f338 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -527,13 +527,13 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
debug.h \
defaults.cpp \
defaults.h \
+ depricatedevent.cpp \
+ depricatedevent.h \
effectmanager.cpp \
effectmanager.h \
emoteshortcut.cpp \
emoteshortcut.h \
equipment.h \
- event.cpp \
- event.h \
flooritem.cpp \
flooritem.h \
game.cpp \
diff --git a/src/client.cpp b/src/client.cpp
index 4462c1a5d..62147874d 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -26,9 +26,9 @@
#include "auctionmanager.h"
#include "chatlogger.h"
#include "configuration.h"
+#include "depricatedevent.h"
#include "dropshortcut.h"
#include "emoteshortcut.h"
-#include "event.h"
#include "game.h"
#include "guild.h"
#include "guildmanager.h"
@@ -998,10 +998,10 @@ int Client::gameExec()
if (mState != mOldState)
{
- Event evt(EVENT_STATECHANGE);
+ DepricatedEvent evt(EVENT_STATECHANGE);
evt.setInt("oldState", mOldState);
evt.setInt("newState", mState);
- Event::trigger(CHANNEL_CLIENT, evt);
+ DepricatedEvent::trigger(CHANNEL_CLIENT, evt);
if (mOldState == STATE_GAME)
{
@@ -1215,10 +1215,10 @@ int Client::gameExec()
TranslationManager::loadCurrentLang();
- Event evt2(EVENT_STATECHANGE);
+ DepricatedEvent evt2(EVENT_STATECHANGE);
evt2.setInt("newState", STATE_LOAD_DATA);
evt2.setInt("oldState", mOldState);
- Event::trigger(CHANNEL_CLIENT, evt2);
+ DepricatedEvent::trigger(CHANNEL_CLIENT, evt2);
// Load XML databases
CharDB::load();
diff --git a/src/event.cpp b/src/depricatedevent.cpp
index a536bcaea..965876fd1 100644
--- a/src/event.cpp
+++ b/src/depricatedevent.cpp
@@ -19,16 +19,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "event.h"
+#include "depricatedevent.h"
#include "listener.h"
#include "variabledata.h"
#include "debug.h"
-ListenMap Event::mBindings;
+ListenMap DepricatedEvent::mBindings;
-Event::~Event()
+DepricatedEvent::~DepricatedEvent()
{
VariableMap::iterator it = mData.begin();
while (it != mData.end())
@@ -39,7 +39,7 @@ Event::~Event()
}
}
-void Event::setInt(const std::string &key, int value) throw (BadEvent)
+void DepricatedEvent::setInt(const std::string &key, int value) throw (BadDepricatedEvent)
{
if (mData.find(key) != mData.end())
throw KEY_ALREADY_EXISTS;
@@ -47,7 +47,7 @@ void Event::setInt(const std::string &key, int value) throw (BadEvent)
mData[key] = new IntData(value);
}
-int Event::getInt(const std::string &key) const throw (BadEvent)
+int DepricatedEvent::getInt(const std::string &key) const throw (BadDepricatedEvent)
{
VariableMap::const_iterator it = mData.find(key);
if (it == mData.end())
@@ -59,8 +59,8 @@ int Event::getInt(const std::string &key) const throw (BadEvent)
return static_cast<IntData *>(it->second)->getData();
}
-void Event::setString(const std::string &key,
- const std::string &value) throw (BadEvent)
+void DepricatedEvent::setString(const std::string &key,
+ const std::string &value) throw (BadDepricatedEvent)
{
if (mData.find(key) != mData.end())
throw KEY_ALREADY_EXISTS;
@@ -68,8 +68,8 @@ void Event::setString(const std::string &key,
mData[key] = new StringData(value);
}
-const std::string &Event::getString(const std::string &key)
- const throw (BadEvent)
+const std::string &DepricatedEvent::getString(const std::string &key)
+ const throw (BadDepricatedEvent)
{
VariableMap::const_iterator it = mData.find(key);
if (it == mData.end())
@@ -82,7 +82,7 @@ const std::string &Event::getString(const std::string &key)
}
-void Event::setFloat(const std::string &key, double value) throw (BadEvent)
+void DepricatedEvent::setFloat(const std::string &key, double value) throw (BadDepricatedEvent)
{
if (mData.find(key) != mData.end())
throw KEY_ALREADY_EXISTS;
@@ -90,7 +90,7 @@ void Event::setFloat(const std::string &key, double value) throw (BadEvent)
mData[key] = new FloatData(value);
}
-double Event::getFloat(const std::string &key) const throw (BadEvent)
+double DepricatedEvent::getFloat(const std::string &key) const throw (BadDepricatedEvent)
{
VariableMap::const_iterator it = mData.find(key);
if (it == mData.end())
@@ -102,7 +102,7 @@ double Event::getFloat(const std::string &key) const throw (BadEvent)
return static_cast<FloatData *>(it->second)->getData();
}
-void Event::trigger(Channels channel, const Event &event)
+void DepricatedEvent::trigger(Channels channel, const DepricatedEvent &event)
{
ListenMap::const_iterator it = mBindings.find(channel);
@@ -120,7 +120,7 @@ void Event::trigger(Channels channel, const Event &event)
}
}
-void Event::remove(Listener *listener)
+void DepricatedEvent::remove(Listener *listener)
{
ListenMap::iterator it = mBindings.begin();
while (it != mBindings.end())
@@ -130,12 +130,12 @@ void Event::remove(Listener *listener)
}
}
-void Event::bind(Listener *listener, Channels channel)
+void DepricatedEvent::bind(Listener *listener, Channels channel)
{
mBindings[channel].insert(listener);
}
-void Event::unbind(Listener *listener, Channels channel)
+void DepricatedEvent::unbind(Listener *listener, Channels channel)
{
mBindings[channel].erase(listener);
}
diff --git a/src/event.h b/src/depricatedevent.h
index 7dffaad21..a353b3de8 100644
--- a/src/event.h
+++ b/src/depricatedevent.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MANA_EVENT_H
-#define MANA_EVENT_H
+#ifndef DEPRICATED_EVENT_H
+#define DEPRICATED_EVENT_H
#include <map>
#include <set>
@@ -41,7 +41,7 @@ enum Channels
CHANNEL_STORAGE
};
-enum Events
+enum DepricatedEvents
{
EVENT_ANNOUNCEMENT = 0,
EVENT_BEING,
@@ -96,7 +96,7 @@ enum Events
};
// Possible exception that can be thrown
-enum BadEvent
+enum BadDepricatedEvent
{
BAD_KEY = 0,
BAD_VALUE,
@@ -111,47 +111,47 @@ typedef std::set<Listener *> ListenerSet;
typedef std::map<Channels, ListenerSet > ListenMap;
#define SERVER_NOTICE(message) { \
-Event event(EVENT_SERVERNOTICE); \
+DepricatedEvent event(EVENT_SERVERNOTICE); \
event.setString("message", message); \
-Event::trigger(CHANNEL_NOTICES, event); }
+DepricatedEvent::trigger(CHANNEL_NOTICES, event); }
-class Event
+class DepricatedEvent
{
public:
// String passed can be retivered with getName()
// and is to used to identify what type of event
// this is.
- Event(Events name)
- { mEventName = name; }
+ DepricatedEvent(DepricatedEvents name)
+ { mDepricatedEventName = name; }
- ~Event();
+ ~DepricatedEvent();
- Events getName() const
- { return mEventName; }
+ DepricatedEvents getName() const
+ { return mDepricatedEventName; }
// Sets or gets a interger with a key to identify
void setInt(const std::string &key, int value)
- throw (BadEvent);
+ throw (BadDepricatedEvent);
int getInt(const std::string &key)
- const throw (BadEvent);
+ const throw (BadDepricatedEvent);
// Sets or gets a string with a key to identify
void setString(const std::string &key,
const std::string &value)
- throw (BadEvent);
+ throw (BadDepricatedEvent);
const std::string &getString(const std::string &key)
- const throw (BadEvent);
+ const throw (BadDepricatedEvent);
// Sets or gets a floating point number with key to identify
void setFloat(const std::string &key, double value)
- throw (BadEvent);
+ throw (BadDepricatedEvent);
double getFloat(const std::string &key)
- const throw (BadEvent);
+ const throw (BadDepricatedEvent);
// Sends event to all listener on the channel
- static void trigger(Channels channel, const Event &event);
+ static void trigger(Channels channel, const DepricatedEvent &event);
// Removes a listener from all channels
static void remove(Listener *listener);
@@ -161,7 +161,7 @@ class Event
static void unbind(Listener *listener, Channels channel);
private:
- Events mEventName;
+ DepricatedEvents mDepricatedEventName;
static ListenMap mBindings;
diff --git a/src/game.cpp b/src/game.cpp
index 3aae1f60b..44ec0ea68 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -32,10 +32,10 @@
#include "client.h"
#include "commandhandler.h"
#include "configuration.h"
+#include "depricatedevent.h"
#include "dropshortcut.h"
#include "effectmanager.h"
#include "emoteshortcut.h"
-#include "event.h"
#include "guildmanager.h"
#include "graphics.h"
#include "itemshortcut.h"
@@ -175,7 +175,8 @@ const unsigned adjustDelay = 10;
*/
static void initEngines()
{
- Event::trigger(CHANNEL_GAME, Event(EVENT_ENGINESINITALIZING));
+ DepricatedEvent::trigger(CHANNEL_GAME,
+ DepricatedEvent(EVENT_ENGINESINITALIZING));
actorSpriteManager = new ActorSpriteManager;
commandHandler = new CommandHandler;
@@ -187,7 +188,8 @@ static void initEngines()
particleEngine = new Particle(nullptr);
particleEngine->setupEngine();
- Event::trigger(CHANNEL_GAME, Event(EVENT_ENGINESINITALIZED));
+ DepricatedEvent::trigger(CHANNEL_GAME,
+ DepricatedEvent(EVENT_ENGINESINITALIZED));
}
/**
@@ -195,7 +197,8 @@ static void initEngines()
*/
static void createGuiWindows()
{
- Event::trigger(CHANNEL_GAME, Event(EVENT_GUIWINDOWSLOADING));
+ DepricatedEvent::trigger(CHANNEL_GAME,
+ DepricatedEvent(EVENT_GUIWINDOWSLOADING));
if (setupWindow)
setupWindow->clearWindowsForReset();
@@ -292,7 +295,8 @@ static void createGuiWindows()
if (player_node)
player_node->updateStatus();
- Event::trigger(CHANNEL_GAME, Event(EVENT_GUIWINDOWSLOADED));
+ DepricatedEvent::trigger(CHANNEL_GAME,
+ DepricatedEvent(EVENT_GUIWINDOWSLOADED));
}
#define del_0(X) { delete X; X = nullptr; }
@@ -302,7 +306,8 @@ static void createGuiWindows()
*/
static void destroyGuiWindows()
{
- Event::trigger(CHANNEL_GAME, Event(EVENT_GUIWINDOWSUNLOADING));
+ DepricatedEvent::trigger(CHANNEL_GAME,
+ DepricatedEvent(EVENT_GUIWINDOWSUNLOADING));
logger->setChatWindow(nullptr);
if (whoIsOnline)
@@ -345,7 +350,8 @@ static void destroyGuiWindows()
del_0(killStats);
del_0(didYouKnowWindow);
- Event::trigger(CHANNEL_GAME, Event(EVENT_GUIWINDOWSUNLOADED));
+ DepricatedEvent::trigger(CHANNEL_GAME,
+ DepricatedEvent(EVENT_GUIWINDOWSUNLOADED));
if (auctionManager && AuctionManager::getEnableAuctionBot())
auctionManager->reload();
@@ -416,7 +422,8 @@ Game::Game():
if (guildManager && GuildManager::getEnableGuildBot())
guildManager->requestGuildInfo();
- Event::trigger(CHANNEL_GAME, Event(EVENT_CONSTRUCTED));
+ DepricatedEvent::trigger(CHANNEL_GAME,
+ DepricatedEvent(EVENT_CONSTRUCTED));
}
Game::~Game()
@@ -450,7 +457,8 @@ Game::~Game()
mInstance = nullptr;
- Event::trigger(CHANNEL_GAME, Event(EVENT_DESTRUCTED));
+ DepricatedEvent::trigger(CHANNEL_GAME,
+ DepricatedEvent(EVENT_DESTRUCTED));
}
static bool saveScreenshot()
@@ -1846,9 +1854,9 @@ void Game::changeMap(const std::string &mapPath)
if (mumbleManager)
mumbleManager->setMap(mapPath);
- Event event(EVENT_MAPLOADED);
+ DepricatedEvent event(EVENT_MAPLOADED);
event.setString("mapPath", mapPath);
- Event::trigger(CHANNEL_GAME, event);
+ DepricatedEvent::trigger(CHANNEL_GAME, event);
}
void Game::updateHistory(SDL_Event &event)
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index d651df87b..674c34039 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -869,7 +869,7 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event)
addInputText(Temp, false);
}
-void ChatWindow::processEvent(Channels channel, const Event &event)
+void ChatWindow::processEvent(Channels channel, const DepricatedEvent &event)
{
if (channel == CHANNEL_NOTICES)
{
diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h
index b3dce33fc..aa56237a2 100644
--- a/src/gui/chatwindow.h
+++ b/src/gui/chatwindow.h
@@ -190,7 +190,7 @@ class ChatWindow : public Window,
*/
void mousePressed(gcn::MouseEvent &event);
- void processEvent(Channels channel, const Event &event);
+ void processEvent(Channels channel, const DepricatedEvent &event);
/**
* Scrolls the chat window
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 98d029be4..c3d5460ce 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -575,7 +575,7 @@ void InventoryWindow::close()
}
void InventoryWindow::processEvent(Channels channel A_UNUSED,
- const Event &event)
+ const DepricatedEvent &event)
{
if (event.getName() == EVENT_UPDATEATTRIBUTE)
{
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index a1ecd104c..47194b909 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -126,7 +126,7 @@ class InventoryWindow : public Window,
void updateDropButton();
- void processEvent(Channels channel, const Event &event);
+ void processEvent(Channels channel, const DepricatedEvent &event);
void updateButtons(Item *item = nullptr);
diff --git a/src/gui/killstats.cpp b/src/gui/killstats.cpp
index e563b8c7c..9fcc64ad3 100644
--- a/src/gui/killstats.cpp
+++ b/src/gui/killstats.cpp
@@ -32,7 +32,7 @@
#include "gui/chatwindow.h"
#include "actorspritemanager.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "localplayer.h"
#include "playerinfo.h"
@@ -438,7 +438,7 @@ void KillStats::validateJacko()
}
void KillStats::processEvent(Channels channel A_UNUSED,
- const Event &event)
+ const DepricatedEvent &event)
{
if (event.getName() == EVENT_UPDATEATTRIBUTE)
{
diff --git a/src/gui/killstats.h b/src/gui/killstats.h
index 67c2967e3..e1528523d 100644
--- a/src/gui/killstats.h
+++ b/src/gui/killstats.h
@@ -78,7 +78,7 @@ class KillStats : public Window, gcn::ActionListener, public Listener
void addLog(std::string str);
void processEvent(Channels channel A_UNUSED,
- const Event &event);
+ const DepricatedEvent &event);
private:
void validateJacko();
diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp
index aaccd36c8..219c319a5 100644
--- a/src/gui/ministatuswindow.cpp
+++ b/src/gui/ministatuswindow.cpp
@@ -219,7 +219,7 @@ void MiniStatusWindow::drawIcons(Graphics *graphics)
}
void MiniStatusWindow::processEvent(Channels channel A_UNUSED,
- const Event &event)
+ const DepricatedEvent &event)
{
if (event.getName() == EVENT_UPDATEATTRIBUTE)
{
diff --git a/src/gui/ministatuswindow.h b/src/gui/ministatuswindow.h
index eb6ded7dd..dfc945689 100644
--- a/src/gui/ministatuswindow.h
+++ b/src/gui/ministatuswindow.h
@@ -59,7 +59,7 @@ class MiniStatusWindow : public Popup,
void drawIcons(Graphics *graphics);
- void processEvent(Channels channel, const Event &event);
+ void processEvent(Channels channel, const DepricatedEvent &event);
void updateStatus();
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 1964b974d..b1dade7d0 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -24,7 +24,7 @@
#include "chatwindow.h"
#include "configuration.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "equipment.h"
#include "inventory.h"
#include "item.h"
@@ -284,7 +284,7 @@ StatusWindow::StatusWindow():
}
void StatusWindow::processEvent(Channels channel A_UNUSED,
- const Event &event)
+ const DepricatedEvent &event)
{
static bool blocked = false;
if (blocked)
diff --git a/src/gui/statuswindow.h b/src/gui/statuswindow.h
index 7f6bd2d18..c477a0099 100644
--- a/src/gui/statuswindow.h
+++ b/src/gui/statuswindow.h
@@ -52,7 +52,7 @@ class StatusWindow : public Window,
*/
StatusWindow();
- void processEvent(Channels channel, const Event &event);
+ void processEvent(Channels channel, const DepricatedEvent &event);
void setPointsNeeded(int id, int needed);
diff --git a/src/listener.cpp b/src/listener.cpp
index fd04c9f00..0ad7c2603 100644
--- a/src/listener.cpp
+++ b/src/listener.cpp
@@ -21,21 +21,19 @@
#include "listener.h"
-#include "event.h"
-
#include "debug.h"
Listener::~Listener()
{
- Event::remove(this);
+ DepricatedEvent::remove(this);
}
void Listener::listen(Channels channel)
{
- Event::bind(this, channel);
+ DepricatedEvent::bind(this, channel);
}
void Listener::ignore(Channels channel)
{
- Event::unbind(this, channel);
+ DepricatedEvent::unbind(this, channel);
}
diff --git a/src/listener.h b/src/listener.h
index bb6e3d4b4..d161f6ef5 100644
--- a/src/listener.h
+++ b/src/listener.h
@@ -22,7 +22,7 @@
#ifndef LISTENER_H
#define LISTENER_H
-#include "event.h"
+#include "depricatedevent.h"
#include <string>
@@ -35,7 +35,8 @@ class Listener
void ignore(Channels channel);
- virtual void processEvent(Channels channel, const Event &event) = 0;
+ virtual void processEvent(Channels channel,
+ const DepricatedEvent &event) = 0;
};
#endif
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index f455cccb2..a57349a8a 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -1655,7 +1655,7 @@ void LocalPlayer::optionChanged(const std::string &value)
}
void LocalPlayer::processEvent(Channels channel,
- const Event &event)
+ const DepricatedEvent &event)
{
if (channel == CHANNEL_ATTRIBUTES)
{
diff --git a/src/localplayer.h b/src/localplayer.h
index 03b3a2538..51d21178c 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -389,7 +389,7 @@ class LocalPlayer : public Being, public ActorSpriteListener,
*/
void optionChanged(const std::string &value);
- void processEvent(Channels channel, const Event &event);
+ void processEvent(Channels channel, const DepricatedEvent &event);
/**
* set a following player.
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index 73d4090b7..5208f34fc 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -24,7 +24,7 @@
#include "actorspritemanager.h"
#include "configuration.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "inventory.h"
#include "item.h"
#include "localplayer.h"
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index c8c870dbd..71110984d 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -23,7 +23,7 @@
#include "net/ea/gamehandler.h"
#include "client.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "game.h"
#include "localplayer.h"
#include "logger.h"
@@ -47,7 +47,7 @@ GameHandler::GameHandler()
}
void GameHandler::processEvent(Channels channel,
- const Event &event)
+ const DepricatedEvent &event)
{
if (channel == CHANNEL_GAME)
{
diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h
index 59cb148c4..de7a1623d 100644
--- a/src/net/ea/gamehandler.h
+++ b/src/net/ea/gamehandler.h
@@ -38,7 +38,7 @@ class GameHandler : public Net::GameHandler, public Listener
GameHandler();
virtual void processEvent(Channels channel,
- const Event &event);
+ const DepricatedEvent &event);
virtual void who();
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index 950f26b03..88bf65d67 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -22,8 +22,8 @@
#include "net/ea/guildhandler.h"
#include "actorspritemanager.h"
+#include "depricatedevent.h"
#include "guild.h"
-#include "event.h"
#include "localplayer.h"
#include "logger.h"
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 0ba3925a8..80104ea67 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -22,7 +22,7 @@
#include "net/ea/tradehandler.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "inventory.h"
#include "item.h"
#include "logger.h"
diff --git a/src/net/manaserv/generalhandler.cpp b/src/net/manaserv/generalhandler.cpp
index d95c98d23..241377956 100644
--- a/src/net/manaserv/generalhandler.cpp
+++ b/src/net/manaserv/generalhandler.cpp
@@ -177,7 +177,7 @@ void GeneralHandler::clearHandlers()
}
void GeneralHandler::processEvent(Channels channel,
- const Event &event)
+ const DepricatedEvent &event)
{
if (channel == CHANNEL_CLIENT)
{
diff --git a/src/net/manaserv/generalhandler.h b/src/net/manaserv/generalhandler.h
index 6ea5c7845..2c5ef9263 100644
--- a/src/net/manaserv/generalhandler.h
+++ b/src/net/manaserv/generalhandler.h
@@ -50,7 +50,7 @@ class GeneralHandler : public Net::GeneralHandler, public Listener
void clearHandlers();
- void processEvent(Channels channel, const Event &event);
+ void processEvent(Channels channel, const DepricatedEvent &event);
protected:
MessageHandlerPtr mBeingHandler;
diff --git a/src/net/manaserv/guildhandler.cpp b/src/net/manaserv/guildhandler.cpp
index aa82d6dcd..be8a9609a 100644
--- a/src/net/manaserv/guildhandler.cpp
+++ b/src/net/manaserv/guildhandler.cpp
@@ -22,7 +22,7 @@
#include "net/manaserv/guildhandler.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "guild.h"
#include "logger.h"
#include "localplayer.h"
diff --git a/src/net/manaserv/partyhandler.cpp b/src/net/manaserv/partyhandler.cpp
index 60dcaaaff..34fb2e954 100644
--- a/src/net/manaserv/partyhandler.cpp
+++ b/src/net/manaserv/partyhandler.cpp
@@ -22,7 +22,7 @@
#include "net/manaserv/partyhandler.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "logger.h"
#include "localplayer.h"
diff --git a/src/net/manaserv/tradehandler.cpp b/src/net/manaserv/tradehandler.cpp
index e827c2cec..72dbf9a9d 100644
--- a/src/net/manaserv/tradehandler.cpp
+++ b/src/net/manaserv/tradehandler.cpp
@@ -23,7 +23,7 @@
#include "net/manaserv/tradehandler.h"
#include "actorspritemanager.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "item.h"
#include "localplayer.h"
#include "playerinfo.h"
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index 65f4d6f2c..acf869f25 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -26,7 +26,7 @@
#include "actorspritemanager.h"
#include "being.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "game.h"
#include "logger.h"
#include "playerrelations.h"
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 629aa54f6..c3e489350 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -24,7 +24,7 @@
#include "actorspritemanager.h"
#include "configuration.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "inventory.h"
#include "item.h"
#include "localplayer.h"
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index 368421285..7830d3a81 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -25,7 +25,7 @@
#include "actorspritemanager.h"
#include "being.h"
#include "configuration.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "game.h"
#include "localplayer.h"
#include "playerrelations.h"
diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp
index 2496898d1..12bfe24cf 100644
--- a/src/net/tmwa/gamehandler.cpp
+++ b/src/net/tmwa/gamehandler.cpp
@@ -23,7 +23,7 @@
#include "net/tmwa/gamehandler.h"
#include "client.h"
-#include "event.h"
+#include "depricatedevent.h"
#include "game.h"
#include "localplayer.h"
#include "logger.h"
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 77c91e1dd..8f2f25d6d 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -245,7 +245,7 @@ void GeneralHandler::clearHandlers()
}
void GeneralHandler::processEvent(Channels channel,
- const Event &event)
+ const DepricatedEvent &event)
{
if (channel == CHANNEL_GAME)
{
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index 73f7a0e1b..f938ddd1d 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -53,7 +53,7 @@ class GeneralHandler : public MessageHandler, public Net::GeneralHandler,
void clearHandlers();
- void processEvent(Channels channel, const Event &event);
+ void processEvent(Channels channel, const DepricatedEvent &event);
void reloadPartially();
diff --git a/src/playerinfo.cpp b/src/playerinfo.cpp
index 6dd7bdc06..533ed8576 100644
--- a/src/playerinfo.cpp
+++ b/src/playerinfo.cpp
@@ -22,8 +22,8 @@
#include "playerinfo.h"
#include "client.h"
+#include "depricatedevent.h"
#include "equipment.h"
-#include "event.h"
#include "inventory.h"
#include "listener.h"
#include "logger.h"
@@ -59,11 +59,11 @@ int mLevelProgress = 0;
void triggerAttr(int id, int old)
{
- Event event(EVENT_UPDATEATTRIBUTE);
+ DepricatedEvent event(EVENT_UPDATEATTRIBUTE);
event.setInt("id", id);
event.setInt("oldValue", old);
event.setInt("newValue", mData.mAttributes.find(id)->second);
- Event::trigger(CHANNEL_ATTRIBUTES, event);
+ DepricatedEvent::trigger(CHANNEL_ATTRIBUTES, event);
}
void triggerStat(int id, const std::string &changed, int old1, int old2)
@@ -72,7 +72,7 @@ void triggerStat(int id, const std::string &changed, int old1, int old2)
if (it == mData.mStats.end())
return;
- Event event(EVENT_UPDATESTAT);
+ DepricatedEvent event(EVENT_UPDATESTAT);
event.setInt("id", id);
event.setInt("base", it->second.base);
event.setInt("mod", it->second.mod);
@@ -81,7 +81,7 @@ void triggerStat(int id, const std::string &changed, int old1, int old2)
event.setString("changed", changed);
event.setInt("oldValue1", old1);
event.setInt("oldValue2", old2);
- Event::trigger(CHANNEL_ATTRIBUTES, event);
+ DepricatedEvent::trigger(CHANNEL_ATTRIBUTES, event);
}
// --- Attributes -------------------------------------------------------------
@@ -280,9 +280,9 @@ void setTrading(bool trading)
if (notify)
{
- Event event(EVENT_TRADING);
+ DepricatedEvent event(EVENT_TRADING);
event.setInt("trading", trading);
- Event::trigger(CHANNEL_STATUS, event);
+ DepricatedEvent::trigger(CHANNEL_STATUS, event);
}
}
@@ -312,7 +312,7 @@ public:
listen(CHANNEL_GAME);
}
- void processEvent(Channels channel, const Event &event)
+ void processEvent(Channels channel, const DepricatedEvent &event)
{
if (channel == CHANNEL_CLIENT)
{