mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-10 12:59:58 -04:00
Remove spell effects on RemoveSpell
This commit is contained in:
parent
c89f88c4e6
commit
5ea3cca83b
@ -537,7 +537,11 @@ namespace MWScript
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
MWMechanics::CreatureStats& creatureStats = ptr.getClass().getCreatureStats(ptr);
|
MWMechanics::CreatureStats& creatureStats = ptr.getClass().getCreatureStats(ptr);
|
||||||
creatureStats.getSpells().remove(id);
|
const ESM::Spell* spell = MWBase::Environment::get().getESMStore()->get<ESM::Spell>().find(id);
|
||||||
|
creatureStats.getSpells().remove(spell);
|
||||||
|
if (spell->mData.mType == ESM::Spell::ST_Ability || spell->mData.mType == ESM::Spell::ST_Blight
|
||||||
|
|| spell->mData.mType == ESM::Spell::ST_Curse || spell->mData.mType == ESM::Spell::ST_Disease)
|
||||||
|
creatureStats.getActiveSpells().removeEffectsBySourceSpellId(ptr, id);
|
||||||
|
|
||||||
MWBase::WindowManager* wm = MWBase::Environment::get().getWindowManager();
|
MWBase::WindowManager* wm = MWBase::Environment::get().getWindowManager();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user