summaryrefslogtreecommitdiff
path: root/src/equipment.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-31 21:29:00 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-31 21:29:00 +0000
commit36d28236321b6a2824ad4f394faeabbf79626808 (patch)
tree7d2475acf84852f2a21cc29eecbf7524cd58ff52 /src/equipment.cpp
parentc9f930c759004e179545c3b82992e3f8a12345f2 (diff)
downloadmana-36d28236321b6a2824ad4f394faeabbf79626808.tar.gz
mana-36d28236321b6a2824ad4f394faeabbf79626808.tar.bz2
mana-36d28236321b6a2824ad4f394faeabbf79626808.tar.xz
mana-36d28236321b6a2824ad4f394faeabbf79626808.zip
Removed legacy inventory code. Added display of equipment.
Diffstat (limited to 'src/equipment.cpp')
-rw-r--r--src/equipment.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/equipment.cpp b/src/equipment.cpp
index 6cd4d967..1dfc7d02 100644
--- a/src/equipment.cpp
+++ b/src/equipment.cpp
@@ -21,29 +21,12 @@
* $Id$
*/
-#include "equipment.h"
-
#include <algorithm>
-#include "item.h"
-
-Equipment::Equipment():
- mArrows(0)
-{
- std::fill_n(mEquipment, EQUIPMENT_SIZE, (Item*)0);
-}
+#include "equipment.h"
-void
-Equipment::removeEquipment(Item *item)
+Equipment::Equipment()
{
- Item **i = std::find(mEquipment, mEquipment+EQUIPMENT_SIZE, item);
- if (i != mEquipment+EQUIPMENT_SIZE) {
- *i = 0;
- }
+ std::fill_n(mEquipment, EQUIPMENT_SIZE, 0);
}
-void Equipment::setEquipment(int index, Item *item)
-{
- mEquipment[index] = item;
- item->setEquipped(true);
-}