summaryrefslogtreecommitdiff
path: root/src/net/manaserv/inventoryhandler.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-12-07 11:34:29 -0700
committerJared Adams <jaxad0127@gmail.com>2009-12-07 11:34:29 -0700
commit2f310b3040dcb56bd9ed1868dfa4f74b3fd00136 (patch)
tree81957f3eef8130b51e3dd85578ef18f56c274139 /src/net/manaserv/inventoryhandler.cpp
parentfc48c24c6d366e165cbcfbd022d9421790089890 (diff)
downloadmana-client-2f310b3040dcb56bd9ed1868dfa4f74b3fd00136.tar.gz
mana-client-2f310b3040dcb56bd9ed1868dfa4f74b3fd00136.tar.bz2
mana-client-2f310b3040dcb56bd9ed1868dfa4f74b3fd00136.tar.xz
mana-client-2f310b3040dcb56bd9ed1868dfa4f74b3fd00136.zip
Simplify Equipment handling
Also merge eAthena's EquipmentHandler and InventoryHander. Fixes http://mantis.themanaworld.org/view.php?id=888 .
Diffstat (limited to 'src/net/manaserv/inventoryhandler.cpp')
-rw-r--r--src/net/manaserv/inventoryhandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/manaserv/inventoryhandler.cpp b/src/net/manaserv/inventoryhandler.cpp
index ba4031ec..9bf727d1 100644
--- a/src/net/manaserv/inventoryhandler.cpp
+++ b/src/net/manaserv/inventoryhandler.cpp
@@ -61,6 +61,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
{
case GPMSG_INVENTORY_FULL:
player_node->clearInventory();
+ player_node->mEquipment->setBackend(&mEqiups);
// no break!
case GPMSG_INVENTORY:
@@ -76,7 +77,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
int id = msg.readInt16();
if (slot < EQUIPMENT_SIZE)
{
- player_node->mEquipment->setEquipment(slot, id);
+ mEqiups.setEquipment(slot, id);
}
else if (slot >= 32 && slot < 32 + getSize(INVENTORY))
{
@@ -104,7 +105,7 @@ void InventoryHandler::unequipItem(const Item *item)
// Tidy equipment directly to avoid weapon still shown bug, for instance
int equipSlot = item->getInvIndex();
logger->log("Unequipping %d", equipSlot);
- player_node->mEquipment->setEquipment(equipSlot, 0);
+ mEqiups.setEquipment(equipSlot, 0);
}
void InventoryHandler::useItem(const Item *item)