From 2d32dc27210d16102f9200de115f2c3f79a5cb22 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 17:45:52 +0300 Subject: Use BeingTypeId in Being for subtypeid. --- src/resources/iteminfo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/resources/iteminfo.cpp') 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::const_iterator i = - mAnimationFiles.find(static_cast(gender) + race * 4); + mAnimationFiles.find(static_cast(gender) + + toInt(race, int) * 4); if (i != mAnimationFiles.end()) return i->second; -- cgit v1.2.3-60-g2f50