mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 16:29:55 +00:00
Merge branch 'removed_isnt_remove' into 'master'
Actually remove effects before proclaiming they've been removed Closes #6480 See merge request OpenMW/openmw!1465
This commit is contained in:
commit
f3f385fd5e
1 changed files with 4 additions and 0 deletions
|
@ -796,13 +796,17 @@ MagicApplicationResult applyMagicEffect(const MWWorld::Ptr& target, const MWWorl
|
|||
{
|
||||
if(target == getPlayer())
|
||||
MWBase::Environment::get().getWindowManager()->messageBox ("#{sLevitateDisabled}");
|
||||
onMagicEffectRemoved(target, spellParams, effect);
|
||||
return MagicApplicationResult::REMOVED;
|
||||
}
|
||||
else if(effect.mEffectId == ESM::MagicEffect::AlmsiviIntervention || effect.mEffectId == ESM::MagicEffect::DivineIntervention || effect.mEffectId == ESM::MagicEffect::Recall)
|
||||
{
|
||||
if(effect.mFlags & ESM::ActiveEffect::Flag_Applied)
|
||||
{
|
||||
onMagicEffectRemoved(target, spellParams, effect);
|
||||
return MagicApplicationResult::REMOVED;
|
||||
}
|
||||
}
|
||||
const auto* magicEffect = world->getStore().get<ESM::MagicEffect>().find(effect.mEffectId);
|
||||
if(effect.mFlags & ESM::ActiveEffect::Flag_Applied)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue