1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

Fix regression #6328

This commit is contained in:
Evil Eye 2021-10-06 17:14:00 +02:00
parent 40f18d6a8b
commit 7540265432

View File

@ -63,9 +63,9 @@ namespace
auto& creatureStats = target.getClass().getCreatureStats(target); auto& creatureStats = target.getClass().getCreatureStats(target);
auto stat = creatureStats.getDynamic(index); auto stat = creatureStats.getDynamic(index);
float current = stat.getCurrent(); float current = stat.getCurrent();
stat.setModified(stat.getModified() - magnitude, 0); stat.setModified(stat.getModified() + magnitude, 0);
stat.setCurrentModified(stat.getCurrentModified() - magnitude); stat.setCurrentModified(stat.getCurrentModified() + magnitude);
stat.setCurrent(current - magnitude); stat.setCurrent(current + magnitude);
creatureStats.setDynamic(index, stat); creatureStats.setDynamic(index, stat);
} }
@ -487,7 +487,7 @@ void applyMagicEffect(const MWWorld::Ptr& target, const MWWorld::Ptr& caster, co
index = 2; index = 2;
// Damage "Dynamic" abilities reduce the base value // Damage "Dynamic" abilities reduce the base value
if(spellParams.getType() == ESM::ActiveSpells::Type_Ability) if(spellParams.getType() == ESM::ActiveSpells::Type_Ability)
modDynamicStat(target, index, effect.mMagnitude); modDynamicStat(target, index, -effect.mMagnitude);
else else
{ {
static const bool uncappedDamageFatigue = Settings::Manager::getBool("uncapped damage fatigue", "Game"); static const bool uncappedDamageFatigue = Settings::Manager::getBool("uncapped damage fatigue", "Game");