mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 22:20:33 +00:00
Do not apply effects with CasterLinked flag when there is no valid caster
This commit is contained in:
parent
c34314ae26
commit
832eaae27b
@ -378,6 +378,11 @@ namespace MWMechanics
|
||||
if (!checkEffectTarget(effectIt->mEffectID, target, castByPlayer))
|
||||
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 (castByPlayer && target != caster
|
||||
&& effectIt->mEffectID == ESM::MagicEffect::RestoreHealth
|
||||
|
Loading…
x
Reference in New Issue
Block a user