1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-04 02:45:33 +00:00

Merge pull request #2985 from Assumeru/master

Fix regression #5572
This commit is contained in:
Bret Curtis 2020-08-07 21:23:38 +02:00 committed by GitHub
commit 32e7b78cb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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