diff options
author | Ira Rice <irarice@gmail.com> | 2008-09-25 00:15:44 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-09-25 00:15:44 +0000 |
commit | 489a429bea6739dfa25503b9329bd9e33bffb856 (patch) | |
tree | 8112f6fd988fdc0610329b6bc14ee3f9d5801092 /src/net/equipmenthandler.cpp | |
parent | 2dc8eadff1e67bb70b1772ecc19c9e1e2e40a5b4 (diff) | |
download | mana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.gz mana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.bz2 mana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.xz mana-489a429bea6739dfa25503b9329bd9e33bffb856.zip |
Merged the Tametomo branch into trunk.
Diffstat (limited to 'src/net/equipmenthandler.cpp')
-rw-r--r-- | src/net/equipmenthandler.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/equipmenthandler.cpp b/src/net/equipmenthandler.cpp index cc5d016c..0fc98175 100644 --- a/src/net/equipmenthandler.cpp +++ b/src/net/equipmenthandler.cpp @@ -156,6 +156,12 @@ void EquipmentHandler::handleMessage(MessageIn *msg) mask <<= 1; position++; } + + item = inventory->getItem(index); + if (!item) + break; + + item->setEquipped(false); player_node->mEquipment->removeEquipment(position); } logger->log("Unequipping: %i %i(%i) %i", @@ -174,6 +180,7 @@ void EquipmentHandler::handleMessage(MessageIn *msg) item = inventory->getItem(index); if (item) { + item->setEquipped(true); player_node->mEquipment->setArrows(item); logger->log("Arrows equipped: %i", index); } |