summaryrefslogtreecommitdiff
path: root/src/statuseffect.cpp
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2008-12-09 08:37:38 -0700
committerFate <fate-tmw@googlemail.com>2008-12-09 08:37:38 -0700
commitcaee40df5da03eb2db6ed8d528f1561ef9bcbd34 (patch)
tree898b2f02f0109864aff772567abb2c37d9ab5149 /src/statuseffect.cpp
parentb8cca9c48d6ea5a2372e10bbe2a75ae95917db42 (diff)
downloadmana-caee40df5da03eb2db6ed8d528f1561ef9bcbd34.tar.gz
mana-caee40df5da03eb2db6ed8d528f1561ef9bcbd34.tar.bz2
mana-caee40df5da03eb2db6ed8d528f1561ef9bcbd34.tar.xz
mana-caee40df5da03eb2db6ed8d528f1561ef9bcbd34.zip
Status particle effects: when looking up block IDs (effect IDs for other
players), make sure to initialise if needed Status particle effects: properly delete particles after effect has worn off
Diffstat (limited to 'src/statuseffect.cpp')
-rw-r--r--src/statuseffect.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index eeae45d8..8aeb66c6 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -91,6 +91,7 @@ static std::map<int, int> blockEffectIndexMap;
int StatusEffect::blockEffectIndexToEffectIndex(int blockIndex)
{
+ load();
if (blockEffectIndexMap.find(blockIndex) == blockEffectIndexMap.end())
return -1;
return blockEffectIndexMap[blockIndex];
@@ -142,6 +143,7 @@ void StatusEffect::load()
if (index >= 0 && block_index >= 0)
blockEffectIndexMap[block_index] = index;
+
} else if (xmlStrEqual(node->name, BAD_CAST "stun-effect"))
the_map = &stunEffects;
@@ -159,6 +161,8 @@ void StatusEffect::load()
endEffect->mSFXEffect = XML::getProperty(node, "end-audio", "");
endEffect->mParticleEffect = XML::getProperty(node, "end-particle", "");
+ endEffect->mPersistentParticleEffect = (XML::getProperty(node, "persistent-particle-effect", "no")) != "no";
+
(*the_map)[1][index] = startEffect;
(*the_map)[0][index] = endEffect;
}