@ -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);
}
};