mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-25 21:09:43 +00:00
Merge branch 'scroll_indices' into 'master'
Properly transform item ID to enchantment ID Closes #6959 See merge request OpenMW/openmw!2328 (cherry picked from commitf1e95ad615
)2b9d475e
Fix #6959
This commit is contained in:
parent
ada64daf87
commit
649ca6b8e6
1 changed files with 5 additions and 1 deletions
|
@ -569,7 +569,11 @@ namespace MWWorld
|
||||||
if (const ESM::Spell* spell = esmStore.get<ESM::Spell>().search(magicBoltState.mSpellId))
|
if (const ESM::Spell* spell = esmStore.get<ESM::Spell>().search(magicBoltState.mSpellId))
|
||||||
effects = &spell->mEffects;
|
effects = &spell->mEffects;
|
||||||
else
|
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);
|
cast.inflict(target, caster, *effects, ESM::RT_Target);
|
||||||
|
|
||||||
magicBoltState.mToDelete = true;
|
magicBoltState.mToDelete = true;
|
||||||
|
|
Loading…
Reference in a new issue