summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-12 23:59:10 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-13 00:04:53 +0300
commit0a7725600eecd8491f3c814110bb434824e71252 (patch)
tree05df7742a9697f394a9478082fdeb15a46d4bbb4 /src/inventory.cpp
parent9e53440cb2dbcfd4311ce2566eb98839383738c7 (diff)
downloadmv-0a7725600eecd8491f3c814110bb434824e71252.tar.gz
mv-0a7725600eecd8491f3c814110bb434824e71252.tar.bz2
mv-0a7725600eecd8491f3c814110bb434824e71252.tar.xz
mv-0a7725600eecd8491f3c814110bb434824e71252.zip
Use per race equipment sprites.
Example: <sprite gender="male" race="4">...</sprite>
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 47a32bce1..b247b2f63 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -204,7 +204,8 @@ void Inventory::distributeSlotsChangedEvent()
(*i)->slotsChanged(this);
}
-Item *Inventory::findItemBySprite(std::string spritePath, Gender gender)
+Item *Inventory::findItemBySprite(std::string spritePath,
+ Gender gender, int race)
{
spritePath = removeSpriteIndex(spritePath);
// logger->log1("Inventory::FindItemBySprite sprite: " + spritePath);
@@ -217,7 +218,7 @@ Item *Inventory::findItemBySprite(std::string spritePath, Gender gender)
{
if (mItems[i])
{
- std::string path = mItems[i]->getInfo().getSprite(gender);
+ std::string path = mItems[i]->getInfo().getSprite(gender, race);
if (!path.empty())
{
path = removeSpriteIndex(path);