diff options
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; |