summaryrefslogtreecommitdiff
path: root/src/net/ea/inventoryhandler.h
diff options
context:
space:
mode:
authorStefan Dombrowski <stefan@uni-bonn.de>2009-12-27 18:30:43 +0100
committerJared Adams <jaxad0127@gmail.com>2009-12-27 10:40:17 -0700
commit249d9fad37dd10650a1aee83c45c820017de218a (patch)
treeca9ac836b9ff7a8d8a2cd3a9cdd575bbb71dbb27 /src/net/ea/inventoryhandler.h
parentccffcf979a0a2c6bf1b12569a23c9455257bd177 (diff)
downloadmana-249d9fad37dd10650a1aee83c45c820017de218a.tar.gz
mana-249d9fad37dd10650a1aee83c45c820017de218a.tar.bz2
mana-249d9fad37dd10650a1aee83c45c820017de218a.tar.xz
mana-249d9fad37dd10650a1aee83c45c820017de218a.zip
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.
Diffstat (limited to 'src/net/ea/inventoryhandler.h')
-rw-r--r--src/net/ea/inventoryhandler.h6
1 files 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;
}
}