diff --git a/CHANGELOG.md b/CHANGELOG.md index 67bf5afed..40cb23a01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -161,6 +161,7 @@ Bug #5175: Random script function returns an integer value Bug #5177: Editor: Unexplored map tiles get corrupted after a file with terrain is saved Bug #5182: OnPCEquip doesn't trigger on skipped beast race attempts to equip something not equippable by beasts + Bug #5186: Equipped item enchantments don't affect creatures Feature #1774: Handle AvoidNode Feature #2229: Improve pathfinding AI Feature #3025: Analogue gamepad movement controls diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 462bf40e1..49592c52e 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -667,7 +667,7 @@ namespace MWMechanics MagicEffects now = creatureStats.getSpells().getMagicEffects(); - if (creature.getClass().isNpc()) + if (creature.getClass().hasInventoryStore(creature)) { MWWorld::InventoryStore& store = creature.getClass().getInventoryStore (creature); now += store.getMagicEffects(); diff --git a/apps/openmw/mwscript/miscextensions.cpp b/apps/openmw/mwscript/miscextensions.cpp index 906e5d008..f7cc92865 100644 --- a/apps/openmw/mwscript/miscextensions.cpp +++ b/apps/openmw/mwscript/miscextensions.cpp @@ -441,7 +441,7 @@ namespace MWScript MWMechanics::MagicEffects effects = stats.getSpells().getMagicEffects(); effects += stats.getActiveSpells().getMagicEffects(); - if (ptr.getClass().isNpc()) + if (ptr.getClass().hasInventoryStore(ptr)) { MWWorld::InventoryStore& store = ptr.getClass().getInventoryStore(ptr); effects += store.getMagicEffects();