1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 02:23:51 +00:00

Fixed instant negative dynamic stat changes being applied as positive

This commit is contained in:
Internecine 2015-01-01 21:26:09 +13:00
parent 5f9540318a
commit a7a3ab0c78

View file

@ -578,15 +578,27 @@ namespace MWMechanics
value.restore(magnitude); value.restore(magnitude);
target.getClass().getCreatureStats(target).setAttribute(attribute, value); target.getClass().getCreatureStats(target).setAttribute(attribute, value);
} }
else if (effectId == ESM::MagicEffect::DamageHealth || effectId == ESM::MagicEffect::RestoreHealth) else if (effectId == ESM::MagicEffect::DamageHealth)
{ {
applyDynamicStatsEffect(0, target, magnitude); applyDynamicStatsEffect(0, target, magnitude * -1);
} }
else if (effectId == ESM::MagicEffect::DamageFatigue || effectId == ESM::MagicEffect::RestoreFatigue) else if (effectId == ESM::MagicEffect::RestoreHealth)
{ {
applyDynamicStatsEffect(2, target, magnitude); applyDynamicStatsEffect(2, target, magnitude);
} }
else if (effectId == ESM::MagicEffect::DamageMagicka || effectId == ESM::MagicEffect::RestoreMagicka) else if (effectId == ESM::MagicEffect::DamageFatigue)
{
applyDynamicStatsEffect(2, target, magnitude * -1);
}
else if (effectId == ESM::MagicEffect::RestoreFatigue)
{
applyDynamicStatsEffect(2, target, magnitude);
}
else if (effectId == ESM::MagicEffect::DamageMagicka)
{
applyDynamicStatsEffect(1, target, magnitude * -1);
}
else if (effectId == ESM::MagicEffect::RestoreMagicka)
{ {
applyDynamicStatsEffect(1, target, magnitude); applyDynamicStatsEffect(1, target, magnitude);
} }