GetEffect fix

This commit is contained in:
scrawl 2015-12-08 15:24:02 +01:00
parent 3890afd6f5
commit bd68ebac62

View file

@ -425,7 +425,7 @@ namespace MWScript
const MWMechanics::MagicEffects& effects = ptr.getClass().getCreatureStats(ptr).getMagicEffects(); const MWMechanics::MagicEffects& effects = ptr.getClass().getCreatureStats(ptr).getMagicEffects();
for (MWMechanics::MagicEffects::Collection::const_iterator it = effects.begin(); it != effects.end(); ++it) for (MWMechanics::MagicEffects::Collection::const_iterator it = effects.begin(); it != effects.end(); ++it)
{ {
if (it->first.mId == key) if (it->first.mId == key && it->second.getModifier() > 0)
{ {
runtime.push(1); runtime.push(1);
return; return;