summaryrefslogtreecommitdiff
path: root/src/inventory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.h')
-rw-r--r--src/inventory.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/inventory.h b/src/inventory.h
index 1d1f49ebe..995a8ef52 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -35,6 +35,8 @@
#include "enums/being/gender.h"
+#include "utils/intmap.h"
+
#include <list>
#include <string>
@@ -174,15 +176,20 @@ class Inventory final
int findIndexByTag(const int tag) const;
- void addVirtualItem(const Item *const item,
+ bool addVirtualItem(const Item *const item,
int index);
+ void virtualRemove(Item *const item,
+ const int amount);
+
+ void restoreVirtuals();
protected:
typedef std::list<InventoryListener*> InventoryListenerList;
InventoryListenerList mInventoryListeners;
void distributeSlotsChangedEvent();
+ IntMap mVirtualRemove;
InventoryType::Type mType;
unsigned mSize; /**< The max number of inventory items */
Item **mItems; /**< The holder of items */