diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-11 23:40:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-12 01:39:53 +0300 |
commit | 95100fc5191ea6e2e379ca73cd4e67bee4376ba1 (patch) | |
tree | 1232af2b6d9a85e28a46b126140af54d8de3b9fc /src/resources | |
parent | fe01452d2448a8033dfff33a052f5a674dfc1a43 (diff) | |
download | plus-95100fc5191ea6e2e379ca73cd4e67bee4376ba1.tar.gz plus-95100fc5191ea6e2e379ca73cd4e67bee4376ba1.tar.bz2 plus-95100fc5191ea6e2e379ca73cd4e67bee4376ba1.tar.xz plus-95100fc5191ea6e2e379ca73cd4e67bee4376ba1.zip |
add support for player look.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/iteminfo.cpp | 12 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 78740522f..9ca3f4f1e 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -321,3 +321,15 @@ std::string ItemInfo::getColorName(const int idx) const return std::string(); return it->second.name; } + +std::string ItemInfo::getColor(const int idx) const +{ + if (!mColors) + return std::string(); + + const std::map <int, ColorDB::ItemColor>::const_iterator + it = mColors->find(idx); + if (it == mColors->end()) + return std::string(); + return it->second.color; +} diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 3e6d0d249..e3dfe29d7 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -297,6 +297,8 @@ class ItemInfo final std::string getColorName(const int idx) const; + std::string getColor(const int idx) const; + int mDrawBefore[10]; int mDrawAfter[10]; int mDrawPriority[10]; |