From eee49b7ea79441cf576e1b9a4078bb2afa2e6de0 Mon Sep 17 00:00:00 2001 From: Allofich Date: Mon, 2 Jan 2017 17:35:50 +0900 Subject: [PATCH] Make dispel an instant effect again (Fixes #3695) --- apps/openmw/mwmechanics/spellcasting.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwmechanics/spellcasting.cpp b/apps/openmw/mwmechanics/spellcasting.cpp index 43d77b99d..1d1d8cf25 100644 --- a/apps/openmw/mwmechanics/spellcasting.cpp +++ b/apps/openmw/mwmechanics/spellcasting.cpp @@ -613,6 +613,14 @@ namespace MWMechanics return true; } } + else if (target.getClass().isActor()) + { + if (effectId == ESM::MagicEffect::Dispel) + { + target.getClass().getCreatureStats(target).getActiveSpells().purgeAll(magnitude); + return true; + } + } else if (target.getClass().isActor() && target == getPlayer()) { MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(mCaster); @@ -1140,9 +1148,6 @@ namespace MWMechanics case ESM::MagicEffect::CureCorprusDisease: actor.getClass().getCreatureStats(actor).getSpells().purgeCorprusDisease(); break; - case ESM::MagicEffect::Dispel: - actor.getClass().getCreatureStats(actor).getActiveSpells().purgeAll(magnitude); - break; case ESM::MagicEffect::RemoveCurse: actor.getClass().getCreatureStats(actor).getSpells().purgeCurses(); break;