summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
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;
}