mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 11:39:44 +00:00
Fix #6959
This commit is contained in:
parent
bf0865d03d
commit
2b9d475e50
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue