summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/net/equipmenthandler.cpp12
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 <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: