|
|
|
@ -512,8 +512,8 @@ namespace MWMechanics
|
|
|
|
|
if (magnitude > 0 && remainingTime > 0 && remainingTime < mDuration)
|
|
|
|
|
{
|
|
|
|
|
CreatureStats& creatureStats = mActor.getClass().getCreatureStats(mActor);
|
|
|
|
|
effectTick(creatureStats, mActor, key, magnitude * remainingTime);
|
|
|
|
|
creatureStats.getMagicEffects().add(key, -magnitude);
|
|
|
|
|
if (effectTick(creatureStats, mActor, key, magnitude * remainingTime))
|
|
|
|
|
creatureStats.getMagicEffects().add(key, -magnitude);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
@ -527,8 +527,10 @@ namespace MWMechanics
|
|
|
|
|
|
|
|
|
|
if (duration > 0)
|
|
|
|
|
{
|
|
|
|
|
// apply correct magnitude for tickable effects that have just expired,
|
|
|
|
|
// in case duration > remaining time of effect
|
|
|
|
|
// Apply correct magnitude for tickable effects that have just expired,
|
|
|
|
|
// in case duration > remaining time of effect.
|
|
|
|
|
// One case where this will happen is when the player uses the rest/wait command
|
|
|
|
|
// while there is a tickable effect active that should expire before the end of the rest/wait.
|
|
|
|
|
ExpiryVisitor visitor(ptr, duration);
|
|
|
|
|
creatureStats.getActiveSpells().visitEffectSources(visitor);
|
|
|
|
|
|
|
|
|
|