summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/item.cpp b/src/item.cpp
index 7a8ccf6d..a2a1d443 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -29,11 +29,11 @@
#include "resources/resourcemanager.h"
#include "resources/theme.h"
-Item::Item(int id, int quantity, bool equipment, bool equipped):
+Item::Item(int id, int quantity, bool equipped):
mImage(0),
mDrawImage(0),
mQuantity(quantity),
- mEquipment(equipment), mEquipped(equipped), mInEquipment(false)
+ mEquipped(equipped), mInEquipment(false)
{
setId(id);
}
@@ -48,9 +48,6 @@ void Item::setId(int id)
{
mId = id;
- // Types 0 and 1 are not equippable items.
- mEquipment = id && getInfo().getType() >= 2;
-
// Load the associated image
if (mImage)
mImage->decRef();
@@ -89,3 +86,8 @@ void Item::doEvent(const std::string &eventName, int amount)
event.setInt("amount", amount);
event.trigger("Item");
}
+
+bool Item::isEquippable() const
+{
+ return getInfo().getEquippable();
+}