1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
This commit is contained in:
Evil Eye 2022-08-22 17:44:49 +02:00
parent bf0865d03d
commit 2b9d475e50

View File

@ -570,7 +570,11 @@ namespace MWWorld
if (const ESM::Spell* spell = esmStore.get<ESM::Spell>().search(magicBoltState.mSpellId))
effects = &spell->mEffects;
else
effects = &esmStore.get<ESM::Enchantment>().find(magicBoltState.mSpellId)->mEffects;
{
MWWorld::ManualRef ref(esmStore, magicBoltState.mSpellId);
const MWWorld::Ptr& ptr = ref.getPtr();
effects = &esmStore.get<ESM::Enchantment>().find(ptr.getClass().getEnchantment(ptr))->mEffects;
}
cast.inflict(target, caster, *effects, ESM::RT_Target);
magicBoltState.mToDelete = true;