From 95100fc5191ea6e2e379ca73cd4e67bee4376ba1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 11 Jun 2013 23:40:50 +0300 Subject: add support for player look. --- src/resources/iteminfo.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/resources/iteminfo.cpp') 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 ::const_iterator + it = mColors->find(idx); + if (it == mColors->end()) + return std::string(); + return it->second.color; +} -- cgit v1.2.3-70-g09d2