diff options
author | Lloyd Bryant <lloyd_bryant@netzero.net> | 2008-08-18 00:04:30 +0000 |
---|---|---|
committer | Lloyd Bryant <lloyd_bryant@netzero.net> | 2008-08-18 00:04:30 +0000 |
commit | 46074f67394f313331d13a5def4eb81ca92df576 (patch) | |
tree | e5c5fa2c4bd599657846918bdf88c27203a99eb6 /src/equipment.cpp | |
parent | d5b86aa54dfa4ddf5b5f2361918c719ba8d0dd18 (diff) | |
download | mana-client-46074f67394f313331d13a5def4eb81ca92df576.tar.gz mana-client-46074f67394f313331d13a5def4eb81ca92df576.tar.bz2 mana-client-46074f67394f313331d13a5def4eb81ca92df576.tar.xz mana-client-46074f67394f313331d13a5def4eb81ca92df576.zip |
Fixed bugs with new arrow types
Diffstat (limited to 'src/equipment.cpp')
-rw-r--r-- | src/equipment.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/equipment.cpp b/src/equipment.cpp index 0a285447..08e6fad1 100644 --- a/src/equipment.cpp +++ b/src/equipment.cpp @@ -41,6 +41,13 @@ Equipment::removeEquipment(Item *item) if (i != mEquipment + EQUIPMENT_SIZE) { *i = 0; } + item->setEquipped(false); +} + +void Equipment::removeEquipment(int index) +{ + mEquipment[index]->setEquipped(false); + mEquipment[index] = 0; } void Equipment::setEquipment(int index, Item *item) @@ -48,3 +55,14 @@ void Equipment::setEquipment(int index, Item *item) mEquipment[index] = item; item->setEquipped(true); } + +void Equipment::setArrows(Item *arrows) +{ + if (mArrows) + mArrows->setEquipped(false); + + mArrows = arrows; + + if (arrows) + arrows->setEquipped(true); +} |