summaryrefslogtreecommitdiff
path: root/src/equipment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/equipment.cpp')
-rw-r--r--src/equipment.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/equipment.cpp b/src/equipment.cpp
index c8e58b8c..8fc09fa9 100644
--- a/src/equipment.cpp
+++ b/src/equipment.cpp
@@ -36,7 +36,7 @@ Equipment::Equipment()
#ifdef TMWSERV_SUPPORT
std::fill_n(mEquipment, EQUIPMENT_SIZE, (Item*) 0);
#else
- std::fill_n(mEquipment, EQUIPMENT_SIZE, 0);
+ std::fill_n(mEquipment, EQUIPMENT_SIZE, -1);
#endif
}
@@ -74,4 +74,10 @@ void Equipment::setEquipment(int index, int inventoryIndex)
item->setEquipped(true);
}
+void Equipment::removeEquipment(int index)
+{
+ if (index >= 0 && index < EQUIPMENT_SIZE)
+ mEquipment[index] = -1;
+}
+
#endif