summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-11 16:17:36 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-11 16:17:36 +0300
commitdde2d920e07d651b9571ada0b4c6a8cc58e4982a (patch)
treea1b7b52d9f35222ff7e30dcf458191bb4ed33ace /src/resources/iteminfo.cpp
parentb6df3c3999d4be067e7314e3887e583c13ad1624 (diff)
downloadplus-dde2d920e07d651b9571ada0b4c6a8cc58e4982a.tar.gz
plus-dde2d920e07d651b9571ada0b4c6a8cc58e4982a.tar.bz2
plus-dde2d920e07d651b9571ada0b4c6a8cc58e4982a.tar.xz
plus-dde2d920e07d651b9571ada0b4c6a8cc58e4982a.zip
add partial support for player look.
can change look in char creation dialog, but cant render different look.
Diffstat (limited to 'src/resources/iteminfo.cpp')
-rw-r--r--src/resources/iteminfo.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index e9a550cda..78740522f 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -309,3 +309,15 @@ void ItemInfo::setSprite(const std::string &animationFile,
{
mAnimationFiles[static_cast<int>(gender) + race * 4] = animationFile;
}
+
+std::string ItemInfo::getColorName(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.name;
+}