summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-06 15:09:21 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-06 15:09:21 +0300
commit3acedd2fadd68550798a5eec0550a855dbc05d85 (patch)
tree6a31377c2babf6b1225ff9352f497cdb13067a2b
parent3910b94e502787e552a360d290c54ad26b3e6c5a (diff)
downloadmanaplus-3acedd2fadd68550798a5eec0550a855dbc05d85.tar.gz
manaplus-3acedd2fadd68550798a5eec0550a855dbc05d85.tar.bz2
manaplus-3acedd2fadd68550798a5eec0550a855dbc05d85.tar.xz
manaplus-3acedd2fadd68550798a5eec0550a855dbc05d85.zip
Allow use replacement item with any id.
Example: <replace to="5"/>
-rw-r--r--src/being.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 6041b7123..af3b14419 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -2183,6 +2183,12 @@ void Being::recalcSpritesOrder()
{
std::map<int, int>::const_iterator repIt
= itemReplacer.find(mSpriteIDs[remSprite]);
+ if (repIt == itemReplacer.end())
+ {
+ repIt = itemReplacer.find(0);
+ if (repIt->second == 0)
+ repIt = itemReplacer.end();
+ }
if (repIt != itemReplacer.end())
{
mSpriteHide[remSprite] = repIt->second;