forked from mirror/openmw-tes3mp
[Client] Only add spells to players that are ensured to exist
This commit is contained in:
parent
f6d36d5d80
commit
c3d1eada89
1 changed files with 3 additions and 2 deletions
|
@ -648,8 +648,9 @@ void LocalPlayer::addSpells()
|
|||
MWMechanics::Spells &ptrSpells = ptrPlayer.getClass().getCreatureStats(ptrPlayer).getSpells();
|
||||
|
||||
for (const auto &spell : spellbookChanges.spells)
|
||||
ptrSpells.add(spell.mId);
|
||||
|
||||
// Only add spells that are ensured to exist
|
||||
if (MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().search(spell.mId))
|
||||
ptrSpells.add(spell.mId);
|
||||
}
|
||||
|
||||
void LocalPlayer::addJournalItems()
|
||||
|
|
Loading…
Reference in a new issue