diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-07-24 17:18:03 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-07-24 17:18:03 +0000 |
commit | b7f7b15995cfc9b41100e237bebc7f2c009e56b3 (patch) | |
tree | 5ed6b6bfba1f12ded4f6cf857292bc8784240e1b | |
parent | 35a21fff70fcdec12fa40e76678883c309d6553f (diff) | |
download | mana-b7f7b15995cfc9b41100e237bebc7f2c009e56b3.tar.gz mana-b7f7b15995cfc9b41100e237bebc7f2c009e56b3.tar.bz2 mana-b7f7b15995cfc9b41100e237bebc7f2c009e56b3.tar.xz mana-b7f7b15995cfc9b41100e237bebc7f2c009e56b3.zip |
Equipments now use real slot positions.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/net/equipmenthandler.cpp | 12 |
2 files changed, 7 insertions, 6 deletions
@@ -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 <bjorn@lindeijer.nl> 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: |