From d564943867452ad76e6d313a28870e640715dded Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Fri, 26 Feb 2010 08:01:06 -0700 Subject: Simplify arrow handling for eAthena MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Thorbjørn Lindeijer --- src/net/ea/inventoryhandler.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/net/ea/inventoryhandler.cpp') diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 4e8aa725..60288ed3 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -174,16 +174,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) if (msg.getId() == SMSG_PLAYER_INVENTORY) { - inventory->setItem(index, itemId, amount, false); - // Trick because arrows are not considered equipment - if (arrow & 0x8000) - { - if (Item *item = inventory->getItem(index)) - item->setEquipment(true); - } + bool isEquipment = arrow & 0x8000; - //const Item *item = inventory->getItem(index); + inventory->setItem(index, itemId, amount, isEquipment); } else { -- cgit v1.2.3-70-g09d2