summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-03 01:25:21 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-03 01:25:21 +0200
commit22f79fd0d623c8e11994905534f53da267e22935 (patch)
tree04403929ca80f47253f8dd523a29489c0fd30162 /src/resources/iteminfo.h
parent582428edf9e40db0d1ed7b78222562a7a5031fe4 (diff)
downloadmanaverse-22f79fd0d623c8e11994905534f53da267e22935.tar.gz
manaverse-22f79fd0d623c8e11994905534f53da267e22935.tar.bz2
manaverse-22f79fd0d623c8e11994905534f53da267e22935.tar.xz
manaverse-22f79fd0d623c8e11994905534f53da267e22935.zip
Dehardcode item colors. Now reading all from configs.
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r--src/resources/iteminfo.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 3b72c7830..297c1b036 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -25,6 +25,7 @@
#include "being.h"
+#include "resources/colordb.h"
#include "resources/spritedef.h"
#include <map>
@@ -111,7 +112,9 @@ class ItemInfo
mDrawPriority(0),
mIsRemoveSprites(false),
mAttackAction(SpriteAction::INVALID),
- mAttackRange(0)
+ mAttackRange(0),
+ mColors(0),
+ mColorList("")
{
}
@@ -235,6 +238,11 @@ class ItemInfo
std::string getDyeColorsString(int color) const;
+ void setColorsList(std::string name);
+
+ bool isHaveColors()
+ { return !mColorList.empty(); }
+
protected:
SpriteDisplay mDisplay; /**< Display info (like icon) */
std::string mName;
@@ -269,6 +277,8 @@ class ItemInfo
/** Stores the names of sounds to be played at certain event. */
std::map < EquipmentSoundEvent, std::vector<std::string> > mSounds;
std::map <int, int> mTags;
+ std::map <int, ColorDB::ItemColor> *mColors;
+ std::string mColorList;
};
#endif