We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 211a5e5 + 065a388 commit b29d89bCopy full SHA for b29d89b
apps/openmw/mwmechanics/activespells.cpp
@@ -289,8 +289,9 @@ namespace MWMechanics
289
const ESM::RefId& enchantmentId = slot->getClass().getEnchantment(*slot);
290
if (enchantmentId.empty())
291
continue;
292
- const ESM::Enchantment* enchantment = world->getStore().get<ESM::Enchantment>().find(enchantmentId);
293
- if (enchantment->mData.mType != ESM::Enchantment::ConstantEffect)
+ const ESM::Enchantment* enchantment
+ = world->getStore().get<ESM::Enchantment>().search(enchantmentId);
294
+ if (enchantment == nullptr || enchantment->mData.mType != ESM::Enchantment::ConstantEffect)
295
296
if (std::find_if(mSpells.begin(), mSpells.end(),
297
[&](const ActiveSpellParams& params) {
0 commit comments