mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 12:39:55 +00:00
Don't applyInstantEffect when magnitude is zero
This commit is contained in:
parent
4af376133b
commit
375caf037d
@ -494,8 +494,11 @@ namespace MWMechanics
|
||||
effectTick(creatureStats, ptr, it->first, it->second.getMagnitude() * duration);
|
||||
|
||||
// instant effects are already applied on spell impact in spellcasting.cpp, but may also come from permanent abilities
|
||||
CastSpell cast(ptr, ptr);
|
||||
cast.applyInstantEffect(ptr, ptr, it->first, it->second.getMagnitude());
|
||||
if (it->second.getMagnitude() > 0)
|
||||
{
|
||||
CastSpell cast(ptr, ptr);
|
||||
cast.applyInstantEffect(ptr, ptr, it->first, it->second.getMagnitude());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user