forked from mirror/openmw-tes3mp
Issue #317: check if spell actually exist in AddSpell
This commit is contained in:
parent
2db6e4f4cf
commit
efb95e2f83
1 changed files with 3 additions and 0 deletions
|
@ -299,6 +299,9 @@ namespace MWScript
|
|||
std::string id = runtime.getStringLiteral (runtime[0].mInteger);
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue