diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-07-11 12:58:11 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-07-11 12:58:11 +0000 |
commit | 84aafd27dad40f4033561052164c21fe68cf78ad (patch) | |
tree | 77fb9224634f95b1ede62c6605976feb4ee9455b /src/net/equipmenthandler.cpp | |
parent | 8dd7eef0402cc6e22642f045e3cfde7f5b011d5b (diff) | |
download | mana-client-84aafd27dad40f4033561052164c21fe68cf78ad.tar.gz mana-client-84aafd27dad40f4033561052164c21fe68cf78ad.tar.bz2 mana-client-84aafd27dad40f4033561052164c21fe68cf78ad.tar.xz mana-client-84aafd27dad40f4033561052164c21fe68cf78ad.zip |
Weapon sprites are now (almost) threated like other equipment sprites through the equipment sprite database. (use -u to ignore updates)
Diffstat (limited to 'src/net/equipmenthandler.cpp')
-rw-r--r-- | src/net/equipmenthandler.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/net/equipmenthandler.cpp b/src/net/equipmenthandler.cpp index 74ce95f3..579b6ed3 100644 --- a/src/net/equipmenthandler.cpp +++ b/src/net/equipmenthandler.cpp @@ -125,7 +125,8 @@ void EquipmentHandler::handleMessage(MessageIn *msg) item = player_node->getInvItem(index); player_node->mEquipment->setEquipment(position, item); - player_node->setWeaponById(item->getId()); + player_node->setVisibleEquipment( + Being::WEAPON_SPRITE, item->getId()); break; case 0x01d7: @@ -138,7 +139,7 @@ void EquipmentHandler::handleMessage(MessageIn *msg) if (!being) break; - being->setWeaponById(itemId); + being->setVisibleEquipment(Being::WEAPON_SPRITE, itemId); break; case SMSG_PLAYER_UNEQUIP: @@ -181,7 +182,7 @@ void EquipmentHandler::handleMessage(MessageIn *msg) case 536: case 1200: case 1201: - player_node->setWeapon(0); + player_node->setVisibleEquipment(Being::WEAPON_SPRITE, 0); // TODO: Why this break? Shouldn't a weapon be // unequipped in inventory too? break; @@ -192,7 +193,7 @@ void EquipmentHandler::handleMessage(MessageIn *msg) logger->log("Unequipping: %i %i(%i) %i", index, equipPoint, type, position); break; - + case SMSG_PLAYER_ATTACK_RANGE: player_node->setAttackRange(msg->readInt16()); break; |