From bd56bf8afdab16383ed8ad08412a8c807f84af85 Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Sun, 22 Jan 2006 13:31:13 +0000 Subject: Merged NETWORK branch (includes BEING_OVERHAUL). --- src/equipment.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/equipment.cpp') 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); +} -- cgit v1.2.3-70-g09d2