Merge pull request #2985 from Assumeru/master

Fix regression #5572
pull/593/head
Bret Curtis 4 years ago committed by GitHub
commit 32e7b78cb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;

Loading…
Cancel
Save