mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Add missing checks to see if spell still exists when loading a savegame (Bug #2883)
This commit is contained in:
parent
af3b0cd883
commit
52d8bc555c
2 changed files with 5 additions and 2 deletions
|
@ -467,7 +467,8 @@ namespace MWGui
|
|||
switch (keyType)
|
||||
{
|
||||
case Type_Magic:
|
||||
onAssignMagic(id);
|
||||
if (MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().search(id))
|
||||
onAssignMagic(id);
|
||||
break;
|
||||
case Type_Item:
|
||||
case Type_MagicItem:
|
||||
|
|
|
@ -1686,7 +1686,9 @@ namespace MWGui
|
|||
else if (type == ESM::REC_ASPL)
|
||||
{
|
||||
reader.getSubNameIs("ID__");
|
||||
mSelectedSpell = reader.getHString();
|
||||
std::string spell = reader.getHString();
|
||||
if (MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().search(spell))
|
||||
mSelectedSpell = spell;
|
||||
}
|
||||
else if (type == ESM::REC_MARK)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue