From fb28d27d080c2c365be1d159d310a3f710289968 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Fri, 7 Aug 2020 16:36:59 +0200 Subject: [PATCH] don't discard purged effects --- apps/openmw/mwmechanics/spells.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/spells.cpp b/apps/openmw/mwmechanics/spells.cpp index 32cd19c5b9..a66c267cc6 100644 --- a/apps/openmw/mwmechanics/spells.cpp +++ b/apps/openmw/mwmechanics/spells.cpp @@ -434,8 +434,9 @@ namespace MWMechanics const auto& baseSpells = mSpellList->getSpells(); for (const auto& it : mSpells) { - //Don't save spells stored in the base record - if(std::find(baseSpells.begin(), baseSpells.end(), it.first->mId) == baseSpells.end()) + // Don't save spells and powers stored in the base record + if((it.first->mData.mType != ESM::Spell::ST_Spell && it.first->mData.mType != ESM::Spell::ST_Power) || + std::find(baseSpells.begin(), baseSpells.end(), it.first->mId) == baseSpells.end()) { ESM::SpellState::SpellParams params; params.mEffectRands = it.second.mEffectRands;