mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-14 06:40:40 +00:00
Issue #317: check if spell actually exist in AddSpell
This commit is contained in:
parent
2db6e4f4cf
commit
efb95e2f83
@ -299,6 +299,9 @@ namespace MWScript
|
|||||||
std::string id = runtime.getStringLiteral (runtime[0].mInteger);
|
std::string id = runtime.getStringLiteral (runtime[0].mInteger);
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
|
|
||||||
|
// make sure a spell with this ID actually exists.
|
||||||
|
MWBase::Environment::get().getWorld()->getStore().spells.find (id);
|
||||||
|
|
||||||
MWWorld::Class::get (ptr).getCreatureStats (ptr).mSpells.add (id);
|
MWWorld::Class::get (ptr).getCreatureStats (ptr).mSpells.add (id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user