summaryrefslogtreecommitdiff
path: root/src/equipment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/equipment.cpp')
-rw-r--r--src/equipment.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/equipment.cpp b/src/equipment.cpp
index 85b5eda3..cdbe387c 100644
--- a/src/equipment.cpp
+++ b/src/equipment.cpp
@@ -24,8 +24,6 @@
#include "equipment.h"
#include "item.h"
-Equipment *Equipment::mInstance = NULL;
-
Equipment::Equipment():
mArrows(NULL)
{
@@ -39,16 +37,6 @@ Equipment::~Equipment()
{
}
-Equipment*
-Equipment::getInstance()
-{
- if (!mInstance) {
- mInstance = new Equipment();
- }
-
- return mInstance;
-}
-
void
Equipment::removeEquipment(Item *item)
{
@@ -59,3 +47,9 @@ Equipment::removeEquipment(Item *item)
}
}
}
+
+void Equipment::setEquipment(int index, Item *item)
+{
+ mEquipment[index] = item;
+ item->setEquipped(true);
+}