summaryrefslogtreecommitdiff
path: root/src/net/manaserv/inventoryhandler.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-08-15 21:28:10 -0600
committerJared Adams <jaxad0127@gmail.com>2010-08-16 13:19:09 -0600
commitd8d9232a67a03548b827bdb0515fe7a620a488f8 (patch)
treed6e0644f99e0ff89f9b320c0b479ba5a4e398125 /src/net/manaserv/inventoryhandler.h
parenta6c2b90c2dabac18ad8052d948bc540406b3a613 (diff)
downloadmana-d8d9232a67a03548b827bdb0515fe7a620a488f8.tar.gz
mana-d8d9232a67a03548b827bdb0515fe7a620a488f8.tar.bz2
mana-d8d9232a67a03548b827bdb0515fe7a620a488f8.tar.xz
mana-d8d9232a67a03548b827bdb0515fe7a620a488f8.zip
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
Diffstat (limited to 'src/net/manaserv/inventoryhandler.h')
-rw-r--r--src/net/manaserv/inventoryhandler.h23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/net/manaserv/inventoryhandler.h b/src/net/manaserv/inventoryhandler.h
index fd08b95e..a1673e99 100644
--- a/src/net/manaserv/inventoryhandler.h
+++ b/src/net/manaserv/inventoryhandler.h
@@ -23,6 +23,7 @@
#define NET_MANASERV_INVENTORYHANDLER_H
#include "equipment.h"
+#include "listener.h"
#include "net/inventoryhandler.h"
@@ -67,34 +68,18 @@ class EquipBackend : public Equipment::Backend
Item *mEquipment[EQUIPMENT_SIZE];
};
-class InventoryHandler : public MessageHandler, Net::InventoryHandler
+class InventoryHandler : public MessageHandler, Net::InventoryHandler,
+ public Mana::Listener
{
public:
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: