summaryrefslogtreecommitdiff
path: root/src/equipment.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 23:25:43 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 23:28:19 +0100
commit4f02ad59df9ee3314fb0d429a031ecbfa3206e3a (patch)
tree90b7afc312b7385061d25db753e8d1e500c83e69 /src/equipment.cpp
parentf67237cb69599753192c301f0f2eb38b88f7b57a (diff)
downloadmana-4f02ad59df9ee3314fb0d429a031ecbfa3206e3a.tar.gz
mana-4f02ad59df9ee3314fb0d429a031ecbfa3206e3a.tar.bz2
mana-4f02ad59df9ee3314fb0d429a031ecbfa3206e3a.tar.xz
mana-4f02ad59df9ee3314fb0d429a031ecbfa3206e3a.zip
Moved the inventory and storage offset handling into netcode
No need to complicate the item containers and inventory classes with a silly offset used by the eAthena server. Also fixed the logToStandardOut option by reading it from the config after the configuration has been initialized.
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