summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r--src/gui/itemcontainer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 3ee6bfb4..d76fc3d9 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -135,6 +135,14 @@ void ItemContainer::addItem(int index, int id, int quantity, bool equipment)
items[index].equipment = equipment;
}
+void ItemContainer::resetItems()
+{
+ for (int i = 0; i < INVENTORY_SIZE; i++) {
+ items[i].id = -1;
+ items[i].quantity = 0;
+ }
+}
+
void ItemContainer::removeItem(int id)
{
for (int i = 0; i < INVENTORY_SIZE; i++) {