summaryrefslogtreecommitdiff
path: root/src/net/equipmenthandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/equipmenthandler.cpp')
-rw-r--r--src/net/equipmenthandler.cpp7
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);
}