forked from mirror/openmw-tes3mp
Do not apply effects with CasterLinked flag when there is no valid caster
This commit is contained in:
parent
c34314ae26
commit
832eaae27b
1 changed files with 5 additions and 0 deletions
|
@ -378,6 +378,11 @@ namespace MWMechanics
|
||||||
if (!checkEffectTarget(effectIt->mEffectID, target, castByPlayer))
|
if (!checkEffectTarget(effectIt->mEffectID, target, castByPlayer))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// caster needs to be an actor for linked effects (e.g. Absorb)
|
||||||
|
if (magicEffect->mData.mFlags & ESM::MagicEffect::CasterLinked
|
||||||
|
&& (caster.isEmpty() || !caster.getClass().isActor()))
|
||||||
|
continue;
|
||||||
|
|
||||||
// If player is healing someone, show the target's HP bar
|
// If player is healing someone, show the target's HP bar
|
||||||
if (castByPlayer && target != caster
|
if (castByPlayer && target != caster
|
||||||
&& effectIt->mEffectID == ESM::MagicEffect::RestoreHealth
|
&& effectIt->mEffectID == ESM::MagicEffect::RestoreHealth
|
||||||
|
|
Loading…
Reference in a new issue