Merge branch 'csspellarg' into 'master'

Editor: Reset effect arguments when the effect ID changes (#7785)

Closes #7785

See merge request OpenMW/openmw!3802
ini_importer_tests
psi29a 11 months ago
commit 6136e3d8fc

@ -134,6 +134,7 @@
Bug #7765: OpenMW-CS: Touch Record option is broken
Bug #7770: Sword of the Perithia: Script execution failure
Bug #7780: Non-ASCII texture paths in NIF files don't work
Bug #7785: OpenMW-CS initialising Skill and Attribute fields to 0 instead of -1 on non-FortifyStat spells
Bug #7796: Absorbed enchantments don't restore magicka
Feature #2566: Handle NAM9 records for manual cell references
Feature #3537: Shader-based water ripples

@ -385,6 +385,26 @@ namespace CSMWorld
case 0:
{
effect.mEffectID = static_cast<short>(value.toInt());
switch (effect.mEffectID)
{
case ESM::MagicEffect::DrainSkill:
case ESM::MagicEffect::DamageSkill:
case ESM::MagicEffect::RestoreSkill:
case ESM::MagicEffect::FortifySkill:
case ESM::MagicEffect::AbsorbSkill:
effect.mAttribute = -1;
break;
case ESM::MagicEffect::DrainAttribute:
case ESM::MagicEffect::DamageAttribute:
case ESM::MagicEffect::RestoreAttribute:
case ESM::MagicEffect::FortifyAttribute:
case ESM::MagicEffect::AbsorbAttribute:
effect.mSkill = -1;
break;
default:
effect.mSkill = -1;
effect.mAttribute = -1;
}
break;
}
case 1:

Loading…
Cancel
Save