diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-27 18:08:34 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-27 23:26:17 +0200 |
commit | df5c7ae83a80db63ab90142df9e3a93f5ee630d0 (patch) | |
tree | 465991eb7785c1d17e1b15f6798efa67951a0c83 /src/resources | |
parent | 41e84157e0eca3a494cd6d44eec96dfbde0f5626 (diff) | |
download | plus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.gz plus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.bz2 plus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.xz plus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.zip |
First part of implimintation item colors.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/iteminfo.cpp | 28 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 4 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 255a9a7b3..49aadc23d 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -81,3 +81,31 @@ std::map<int, int> &ItemInfo::addReplaceSprite(int sprite) } return it->second; } + +std::string ItemInfo::getDyeString(int color) const +{ + if (mId == 1172) + { + if (color == 1) + return "W:#115511,22aa22,99dd99;R:#547000,a5dc00,d1ff46"; + if (color == 0) + return "W:#547000,a5dc00,d1ff46;R:#115511,22aa22,99dd99"; + if (color == 3) + return "W:#ffffff,000000,000000;R:#333333,333333,333333"; + } + return ""; +} + +std::string ItemInfo::getDyeColorsString(int color) const +{ + if (mId == 1172) + { + if (color == 1) + return "#115511,22aa22,99dd99;#547000,a5dc00,d1ff46"; + if (color == 0) + return "#547000,a5dc00,d1ff46;#115511,22aa22,99dd99"; + if (color == 3) + return "#ffffff,000000,000000;#333333,333333,333333"; + } + return ""; +}
\ No newline at end of file diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 5ea537fae..3b72c7830 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -231,6 +231,10 @@ class ItemInfo std::map<int, std::map<int, int> > getSpriteToItemReplaceMap() const { return mSpriteToItemReplaceMap; } + std::string getDyeString(int color) const; + + std::string getDyeColorsString(int color) const; + protected: SpriteDisplay mDisplay; /**< Display info (like icon) */ std::string mName; |