Issue #317: check if spell actually exist in AddSpell

actorid
Marc Zinnschlag 13 years ago
parent 2db6e4f4cf
commit efb95e2f83

@ -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…
Cancel
Save