Don't apply effects when spell absorption is successful (bug #4820)

pull/541/head
Capostrophic 6 years ago
parent c5176321ee
commit 67450a7046

@ -21,6 +21,7 @@
Bug #4800: Standing collisions are not updated immediately when an object is teleported without a cell change Bug #4800: Standing collisions are not updated immediately when an object is teleported without a cell change
Bug #4803: Stray special characters before begin statement break script compilation Bug #4803: Stray special characters before begin statement break script compilation
Bug #4804: Particle system with the "Has Sizes = false" causes an exception Bug #4804: Particle system with the "Has Sizes = false" causes an exception
Bug #4820: Spell absorption is broken
Feature #2229: Improve pathfinding AI Feature #2229: Improve pathfinding AI
Feature #3442: Default values for fallbacks from ini file Feature #3442: Default values for fallbacks from ini file
Feature #3610: Option to invert X axis Feature #3610: Option to invert X axis

@ -501,8 +501,11 @@ namespace MWMechanics
float magnitudeMult = 1; float magnitudeMult = 1;
if (!absorbed && target.getClass().isActor()) if (target.getClass().isActor())
{ {
if (absorbed)
continue;
bool isHarmful = magicEffect->mData.mFlags & ESM::MagicEffect::Harmful; bool isHarmful = magicEffect->mData.mFlags & ESM::MagicEffect::Harmful;
// Reflect harmful effects // Reflect harmful effects
if (isHarmful && !reflected && !caster.isEmpty() && caster != target && !(magicEffect->mData.mFlags & ESM::MagicEffect::Unreflectable)) if (isHarmful && !reflected && !caster.isEmpty() && caster != target && !(magicEffect->mData.mFlags & ESM::MagicEffect::Unreflectable))

Loading…
Cancel
Save