mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-04 20:36:41 +00:00
Only reflect spells that have a caster
This commit is contained in:
parent
bedfbfd594
commit
7729ef2e5b
1 changed files with 1 additions and 1 deletions
|
@ -308,7 +308,7 @@ namespace
|
|||
if(target != caster && spellParams.getType() != ESM::ActiveSpells::Type_Enchantment && spellParams.getType() != ESM::ActiveSpells::Type_Permanent)
|
||||
{
|
||||
bool canReflect = magicEffect->mData.mFlags & ESM::MagicEffect::Harmful && !(magicEffect->mData.mFlags & ESM::MagicEffect::Unreflectable) &&
|
||||
!(effect.mFlags & ESM::ActiveEffect::Flag_Ignore_Reflect) && magnitudes.get(ESM::MagicEffect::Reflect).getMagnitude() > 0.f;
|
||||
!(effect.mFlags & ESM::ActiveEffect::Flag_Ignore_Reflect) && magnitudes.get(ESM::MagicEffect::Reflect).getMagnitude() > 0.f && !caster.isEmpty();
|
||||
bool canAbsorb = !(effect.mFlags & ESM::ActiveEffect::Flag_Ignore_SpellAbsorption) && magnitudes.get(ESM::MagicEffect::SpellAbsorption).getMagnitude() > 0.f;
|
||||
if(canReflect || canAbsorb)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue