summaryrefslogtreecommitdiff
path: root/src/net/equipmenthandler.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-07-24 17:18:03 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-07-24 17:18:03 +0000
commitb7f7b15995cfc9b41100e237bebc7f2c009e56b3 (patch)
tree5ed6b6bfba1f12ded4f6cf857292bc8784240e1b /src/net/equipmenthandler.cpp
parent35a21fff70fcdec12fa40e76678883c309d6553f (diff)
downloadmana-client-b7f7b15995cfc9b41100e237bebc7f2c009e56b3.tar.gz
mana-client-b7f7b15995cfc9b41100e237bebc7f2c009e56b3.tar.bz2
mana-client-b7f7b15995cfc9b41100e237bebc7f2c009e56b3.tar.xz
mana-client-b7f7b15995cfc9b41100e237bebc7f2c009e56b3.zip
Equipments now use real slot positions.
Diffstat (limited to 'src/net/equipmenthandler.cpp')
-rw-r--r--src/net/equipmenthandler.cpp12
1 files changed, 6 insertions, 6 deletions
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: