summaryrefslogtreecommitdiff
path: root/src/net/ea/inventoryhandler.h
diff options
context:
space:
mode:
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