mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
[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();
|
MWMechanics::Spells &ptrSpells = ptrPlayer.getClass().getCreatureStats(ptrPlayer).getSpells();
|
||||||
|
|
||||||
for (const auto &spell : spellbookChanges.spells)
|
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()
|
void LocalPlayer::addJournalItems()
|
||||||
|
|
Loading…
Reference in a new issue