From b7f7b15995cfc9b41100e237bebc7f2c009e56b3 Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Mon, 24 Jul 2006 17:18:03 +0000 Subject: Equipments now use real slot positions. --- ChangeLog | 1 + src/net/equipmenthandler.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9896abad..92986d2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,7 @@ data/help/header.txt, data/help/index.txt, data/help/skills.txt, data/help/support.txt, data/help/team.txt: Forced to use UNIX end of line character. + * src/net/equipmenthandler.cpp: Equipments now use real slot positions. 2006-07-24 Bjørn Lindeijer diff --git a/src/net/equipmenthandler.cpp b/src/net/equipmenthandler.cpp index 437b5f3e..01760eeb 100644 --- a/src/net/equipmenthandler.cpp +++ b/src/net/equipmenthandler.cpp @@ -87,7 +87,7 @@ void EquipmentHandler::handleMessage(MessageIn *msg) position++; } item = player_node->getInvItem(index); - player_node->mEquipment->setEquipment(position - 1, item); + player_node->mEquipment->setEquipment(position, item); } } break; @@ -116,14 +116,14 @@ void EquipmentHandler::handleMessage(MessageIn *msg) mask <<= 1; position++; } - logger->log("Position %i", position - 1); - item = player_node->mEquipment->getEquipment(position - 1); + logger->log("Position %i", position); + item = player_node->mEquipment->getEquipment(position); if (item) { item->setEquipped(false); } item = player_node->getInvItem(index); - player_node->mEquipment->setEquipment(position - 1, item); + player_node->mEquipment->setEquipment(position, item); player_node->setWeaponById(item->getId()); break; @@ -185,11 +185,11 @@ void EquipmentHandler::handleMessage(MessageIn *msg) // unequipped in inventory too? break; default: - player_node->mEquipment->removeEquipment(position - 1); + player_node->mEquipment->removeEquipment(position); break; } logger->log("Unequipping: %i %i(%i) %i", - index, equipPoint, type, position - 1); + index, equipPoint, type, position); break; case SMSG_PLAYER_ARROW_EQUIP: -- cgit v1.2.3-70-g09d2