From 249d9fad37dd10650a1aee83c45c820017de218a Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Sun, 27 Dec 2009 18:30:43 +0100 Subject: Item was not shown as equiped If the first item in the inventory was equiped, then that item was not showen in the equipment window. --- src/net/ea/inventoryhandler.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index 709d6b53..65f48f6a 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -43,7 +43,7 @@ class EquipBackend : public Equipment::Backend { Item *getEquipment(int index) const { int invyIndex = mEquipment[index]; - if (invyIndex == 0) + if (invyIndex == -1) { return NULL; } @@ -54,7 +54,7 @@ class EquipBackend : public Equipment::Backend { { for (int i = 0; i < EQUIPMENT_SIZE; i++) { - if (mEquipment[i]) + if (mEquipment[i] != -1) { Item* item = player_node->getInventory()->getItem(i); if (item) @@ -63,7 +63,7 @@ class EquipBackend : public Equipment::Backend { } } - mEquipment[i] = 0; + mEquipment[i] = -1; } } -- cgit v1.2.3-70-g09d2