diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index c867bda9..4d101fd5 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -28,6 +28,8 @@ #include "commandhandler.h" #include "configuration.h" #include "effectmanager.h" +#include "event.h" +#include "eventmanager.h" #include "emoteshortcut.h" #include "graphics.h" #include "itemshortcut.h" @@ -147,10 +149,10 @@ static void createGuiWindows() // Create dialogs chatWindow = new ChatWindow; tradeWindow = new TradeWindow; - equipmentWindow = new EquipmentWindow(player_node->mEquipment.get()); + equipmentWindow = new EquipmentWindow(PlayerInfo::getEquipment()); statusWindow = new StatusWindow; miniStatusWindow = new MiniStatusWindow; - inventoryWindow = new InventoryWindow(player_node->getInventory()); + inventoryWindow = new InventoryWindow(PlayerInfo::getInventory()); skillDialog = new SkillDialog; minimap = new Minimap; helpWindow = new HelpWindow; @@ -250,6 +252,9 @@ Game::Game(): joystick = new Joystick(0); setupWindow->setInGame(true); + + Mana::Event event("Constructed"); + Mana::EventManager::trigger("Game", event); } Game::~Game() @@ -269,6 +274,9 @@ Game::~Game() del_0(mCurrentMap) mInstance = 0; + + Mana::Event event("Destructed"); + Mana::EventManager::trigger("Game", event); } static bool saveScreenshot() |