summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/inventoryhandler.cpp6
-rw-r--r--src/net/ea/inventoryhandler.h2
-rw-r--r--src/net/inventoryhandler.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 086a05102..65f0d87a0 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -95,6 +95,12 @@ InventoryHandler::~InventoryHandler()
mStorage = nullptr;
}
+void InventoryHandler::clear()
+{
+ delete mStorage;
+ mStorage = nullptr;
+}
+
bool InventoryHandler::canSplit(const Item *const item A_UNUSED) const
{
return false;
diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h
index b398053e3..2497d9dd5 100644
--- a/src/net/ea/inventoryhandler.h
+++ b/src/net/ea/inventoryhandler.h
@@ -149,6 +149,8 @@ class InventoryHandler : public Net::InventoryHandler
~InventoryHandler();
+ void clear();
+
bool canSplit(const Item *const item) const override A_WARN_UNUSED;
void splitItem(const Item *const item,
diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h
index 39e7bf8ba..97a88ca04 100644
--- a/src/net/inventoryhandler.h
+++ b/src/net/inventoryhandler.h
@@ -36,6 +36,8 @@ class InventoryHandler
virtual ~InventoryHandler()
{ }
+ virtual void clear() = 0;
+
virtual void equipItem(const Item *const item) const = 0;
virtual void unequipItem(const Item *const item) const = 0;