summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 056cf552d..3d6707f60 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -795,6 +795,18 @@ void Inventory::clear()
m_lists.clear();
}
+void Inventory::clearContents()
+{
+ for(u32 i=0; i<m_lists.size(); i++)
+ {
+ InventoryList *list = m_lists[i];
+ for(u32 j=0; j<list->getSize(); j++)
+ {
+ list->deleteItem(j);
+ }
+ }
+}
+
Inventory::Inventory(IItemDefManager *itemdef)
{
m_itemdef = itemdef;