summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 17:45:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 17:45:52 +0300
commit2d32dc27210d16102f9200de115f2c3f79a5cb22 (patch)
tree5aa84ebe6c5c1d708b14bee2bf0ce95df714fc1d /src/resources/iteminfo.cpp
parent7bdb50605562e47f1d6ae134881c09bd42293be5 (diff)
downloadplus-2d32dc27210d16102f9200de115f2c3f79a5cb22.tar.gz
plus-2d32dc27210d16102f9200de115f2c3f79a5cb22.tar.bz2
plus-2d32dc27210d16102f9200de115f2c3f79a5cb22.tar.xz
plus-2d32dc27210d16102f9200de115f2c3f79a5cb22.zip
Use BeingTypeId in Being for subtypeid.
Diffstat (limited to 'src/resources/iteminfo.cpp')
-rw-r--r--src/resources/iteminfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index c68762728..0cdbed04d 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -87,7 +87,7 @@ ItemInfo::~ItemInfo()
}
const std::string &ItemInfo::getSprite(const Gender::Type gender,
- const int race) const
+ const BeingTypeId race) const
{
if (mView)
{
@@ -98,7 +98,8 @@ const std::string &ItemInfo::getSprite(const Gender::Type gender,
{
static const std::string empty;
std::map<int, std::string>::const_iterator i =
- mAnimationFiles.find(static_cast<int>(gender) + race * 4);
+ mAnimationFiles.find(static_cast<int>(gender) +
+ toInt(race, int) * 4);
if (i != mAnimationFiles.end())
return i->second;