From d8d9232a67a03548b827bdb0515fe7a620a488f8 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 15 Aug 2010 21:28:10 -0600 Subject: Move more to the event system Most of Net::InventoryHandler is now done through events. The ActorSpriteManager was also replaced by events. A few odds and ends were taken care of too. Reviewed-by: Bertram --- src/net/tmwa/inventoryhandler.h | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'src/net/tmwa/inventoryhandler.h') diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h index 8e6e12ca..18d73517 100644 --- a/src/net/tmwa/inventoryhandler.h +++ b/src/net/tmwa/inventoryhandler.h @@ -24,6 +24,7 @@ #include "equipment.h" #include "inventory.h" +#include "listener.h" #include "playerinfo.h" #include "gui/inventorywindow.h" @@ -115,7 +116,8 @@ class InventoryItem typedef std::list InventoryItems; -class InventoryHandler : public MessageHandler, public Net::InventoryHandler +class InventoryHandler : public MessageHandler, public Net::InventoryHandler, + public Mana::Listener { public: enum { @@ -129,27 +131,10 @@ class InventoryHandler : public MessageHandler, public Net::InventoryHandler void handleMessage(Net::MessageIn &msg); - void equipItem(const Item *item); - - void unequipItem(const Item *item); - - void useItem(const Item *item); - - void dropItem(const Item *item, int amount); + void event(const std::string &channel, const Mana::Event &event); bool canSplit(const Item *item); - void splitItem(const Item *item, int amount); - - void moveItem(int oldIndex, int newIndex); - - void openStorage(int type); - - void closeStorage(int type); - - void moveItem(int source, int slot, int amount, - int destination); - size_t getSize(int type) const; private: -- cgit v1.2.3-60-g2f50