diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-12 17:02:17 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-12 17:02:17 +0200 |
commit | 992c2920f7e1940aa293e27cf4ea7ec23668a673 (patch) | |
tree | 4328076c6585a015433cb8bb763eab687da675bc /src/resources/iteminfo.cpp | |
parent | 428770c113abf002e5cc0b79ae872db1f26cf283 (diff) | |
download | manaplus-992c2920f7e1940aa293e27cf4ea7ec23668a673.tar.gz manaplus-992c2920f7e1940aa293e27cf4ea7ec23668a673.tar.bz2 manaplus-992c2920f7e1940aa293e27cf4ea7ec23668a673.tar.xz manaplus-992c2920f7e1940aa293e27cf4ea7ec23668a673.zip |
Add items attribute what allow hide other sprites only by id.
Diffstat (limited to 'src/resources/iteminfo.cpp')
-rw-r--r-- | src/resources/iteminfo.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 300c6bd26..f65e0396a 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -24,6 +24,8 @@ #include "resources/itemdb.h" #include "configuration.h" +#include <set> + const std::string &ItemInfo::getSprite(Gender gender) const { if (mView) @@ -64,3 +66,14 @@ const std::string &ItemInfo::getSound(EquipmentSoundEvent event) const return i == mSounds.end() ? empty : i->second[rand() % i->second.size()]; } + +bool ItemInfo::isRemoveSpriteId(int id) const +{ + if (!mRemoveSpriteIds.size() + || mRemoveSpriteIds.find(id) != mRemoveSpriteIds.end()) + { + return true; + } + + return false; +}
\ No newline at end of file |