mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
[Client] Only add spells to players that are ensured to exist
This commit is contained in:
parent
f6d36d5d80
commit
c3d1eada89
@ -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…
x
Reference in New Issue
Block a user