summaryrefslogtreecommitdiff
path: root/src/net/ea/inventoryhandler.h
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2010-03-03 23:36:37 +0100
committerBertram <bertram@cegetel.net>2010-03-03 23:36:37 +0100
commit8cc31b582f372238ce6bd2c86888d312cf1fe5b2 (patch)
tree8db5f864348d08a05b8533c7ede58e76741a98f8 /src/net/ea/inventoryhandler.h
parentb1845e9e081df1fc77d9bcbed3ab95792d6ba682 (diff)
parentd564943867452ad76e6d313a28870e640715dded (diff)
downloadmana-client-8cc31b582f372238ce6bd2c86888d312cf1fe5b2.tar.gz
mana-client-8cc31b582f372238ce6bd2c86888d312cf1fe5b2.tar.bz2
mana-client-8cc31b582f372238ce6bd2c86888d312cf1fe5b2.tar.xz
mana-client-8cc31b582f372238ce6bd2c86888d312cf1fe5b2.zip
Merge branch 'master' of gitorious.org:mana/mana
Conflicts: src/being.cpp
Diffstat (limited to 'src/net/ea/inventoryhandler.h')
-rw-r--r--src/net/ea/inventoryhandler.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h
index a2d0d388..2699e584 100644
--- a/src/net/ea/inventoryhandler.h
+++ b/src/net/ea/inventoryhandler.h
@@ -26,11 +26,15 @@
#include "inventory.h"
#include "localplayer.h"
+#include "gui/storagewindow.h"
+
#include "net/inventoryhandler.h"
#include "net/net.h"
#include "net/ea/messagehandler.h"
+#include <list>
+
namespace EAthena {
class EquipBackend : public Equipment::Backend {
@@ -89,11 +93,35 @@ class EquipBackend : public Equipment::Backend {
int mEquipment[EQUIPMENT_SIZE];
};
+/**
+ * Used to cache storage data until we get size data for it.
+ */
+class InventoryItem
+{
+ public:
+ int slot;
+ int id;
+ int quantity;
+ bool equip;
+
+ InventoryItem(int slot, int id, int quantity, bool equip)
+ {
+ this->slot = slot;
+ this->id = id;
+ this->quantity = quantity;
+ this->equip = equip;
+ }
+};
+
+typedef std::list<InventoryItem> InventoryItems;
+
class InventoryHandler : public MessageHandler, public Net::InventoryHandler
{
public:
InventoryHandler();
+ ~InventoryHandler();
+
void handleMessage(Net::MessageIn &msg);
void equipItem(const Item *item);
@@ -121,6 +149,9 @@ class InventoryHandler : public MessageHandler, public Net::InventoryHandler
private:
EquipBackend mEquips;
+ InventoryItems mInventoryItems;
+ Inventory *mStorage;
+ StorageWindow *mStorageWindow;
};
} // namespace EAthena