diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-08-26 16:55:05 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-08-26 16:55:05 +0200 |
commit | 6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d (patch) | |
tree | 4e6e178095ac8cf89dc0dba4f532913891305436 /src/item.cpp | |
parent | ee8f131b49bb9b1d66cac3840b3c566eb49bcf3f (diff) | |
download | mana-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.gz mana-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.bz2 mana-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.xz mana-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.zip |
Merged testing branch into master.
Diffstat (limited to 'src/item.cpp')
-rw-r--r-- | src/item.cpp | 12 |
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(); +} |