summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
authorJan-Fabian Humann <malastare@gmx.net>2005-04-04 17:59:12 +0000
committerJan-Fabian Humann <malastare@gmx.net>2005-04-04 17:59:12 +0000
commitacb216cbbd50f68710502068bec83e073128d6fc (patch)
tree88e5649a5814bdc0ea7c3e646e79f8fee790a63e /src/gui/itemcontainer.cpp
parente571ede8b977f7e69dd7ee28c0edc04cd71400d3 (diff)
downloadmana-client-acb216cbbd50f68710502068bec83e073128d6fc.tar.gz
mana-client-acb216cbbd50f68710502068bec83e073128d6fc.tar.bz2
mana-client-acb216cbbd50f68710502068bec83e073128d6fc.tar.xz
mana-client-acb216cbbd50f68710502068bec83e073128d6fc.zip
quick fix for bug which increased item amount when warping client-side
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++) {