summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-01 06:41:26 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-01 06:41:26 +0000
commit3b79ce4edf01b19a9ca0d1cb75ce38da8384b41d (patch)
tree4a4cb6b490acdb05d4d414c2493223a4a3845baa /src/item.cpp
parent3a3789a2c8cca53ece5ede1de9ee6d96707c76fc (diff)
downloadmana-3b79ce4edf01b19a9ca0d1cb75ce38da8384b41d.tar.gz
mana-3b79ce4edf01b19a9ca0d1cb75ce38da8384b41d.tar.bz2
mana-3b79ce4edf01b19a9ca0d1cb75ce38da8384b41d.tar.xz
mana-3b79ce4edf01b19a9ca0d1cb75ce38da8384b41d.zip
Fixed inventory display with respect to empty slots.
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/item.cpp b/src/item.cpp
index 946181dc..66f638a5 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -24,16 +24,15 @@
#include "item.h"
Item::Item(int id, int quantity) :
- mId(id),
mQuantity(quantity)
{
- // Either type or slot, both are unused anyway. -- silene
- mEquipment = getInfo().getType();
+ setId(id);
}
void Item::setId(int id)
{
mId = id;
- mEquipment = getInfo().getType();
+ // Types 0 and 1 are not equippable items.
+ mEquipment = id && getInfo().getType() >= 2;
}