summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-16 21:32:20 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-16 21:32:20 +0300
commit0d4fa49a591658989edb5b640d996b9dc93775d2 (patch)
tree852c22715d7146733879aeffd9c3b34dcc04e3f4 /src/resources/iteminfo.cpp
parent7bd3762e44b31b432d46f5d32686a812a2b0a92f (diff)
downloadmv-0d4fa49a591658989edb5b640d996b9dc93775d2.tar.gz
mv-0d4fa49a591658989edb5b640d996b9dc93775d2.tar.bz2
mv-0d4fa49a591658989edb5b640d996b9dc93775d2.tar.xz
mv-0d4fa49a591658989edb5b640d996b9dc93775d2.zip
Rename colors list variables in iteminfo.
Diffstat (limited to 'src/resources/iteminfo.cpp')
-rw-r--r--src/resources/iteminfo.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index c439be5c5..52e238a5d 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -59,8 +59,8 @@ ItemInfo::ItemInfo() :
mAnimationFiles(),
mSounds(),
mTags(),
- mColors(nullptr),
- mColorList(),
+ mColorsList(nullptr),
+ mColorsListName(),
mHitEffectId(-1),
mCriticalHitEffectId(-1),
mMissEffectId(-1),
@@ -191,24 +191,24 @@ void ItemInfo::setColorsList(const std::string &name)
{
if (name.empty())
{
- mColors = nullptr;
- mColorList.clear();
+ mColorsList = nullptr;
+ mColorsListName.clear();
}
else
{
- mColors = ColorDB::getColorsList(name);
- mColorList = name;
+ mColorsList = ColorDB::getColorsList(name);
+ mColorsListName = name;
}
}
std::string ItemInfo::getDyeColorsString(const ItemColor color) const
{
- if (!mColors || mColorList.empty())
+ if (!mColorsList || mColorsListName.empty())
return "";
const std::map <ItemColor, ColorDB::ItemColorData>::const_iterator
- it = mColors->find(color);
- if (it == mColors->end())
+ it = mColorsList->find(color);
+ if (it == mColorsList->end())
return "";
return it->second.color;
@@ -228,11 +228,11 @@ const std::string ItemInfo::replaceColors(std::string str,
const ItemColor color) const
{
std::string name;
- if (mColors && !mColorList.empty())
+ if (mColorsList && !mColorsListName.empty())
{
const std::map <ItemColor, ColorDB::ItemColorData>::const_iterator
- it = mColors->find(color);
- if (it == mColors->end())
+ it = mColorsList->find(color);
+ if (it == mColorsList->end())
name = "unknown";
else
name = it->second.name;
@@ -371,24 +371,24 @@ void ItemInfo::setSprite(const std::string &animationFile,
std::string ItemInfo::getColorName(const ItemColor idx) const
{
- if (!mColors)
+ if (!mColorsList)
return std::string();
const std::map <ItemColor, ColorDB::ItemColorData>::const_iterator
- it = mColors->find(idx);
- if (it == mColors->end())
+ it = mColorsList->find(idx);
+ if (it == mColorsList->end())
return std::string();
return it->second.name;
}
std::string ItemInfo::getColor(const ItemColor idx) const
{
- if (!mColors)
+ if (!mColorsList)
return std::string();
const std::map <ItemColor, ColorDB::ItemColorData>::const_iterator
- it = mColors->find(idx);
- if (it == mColors->end())
+ it = mColorsList->find(idx);
+ if (it == mColorsList->end())
return std::string();
return it->second.color;
}