Make enchantments affect all actors with an inventory (bug #5186)

pull/2556/head
Capostrophic 5 years ago
parent 19e9ece291
commit ce943b4f9e

@ -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

@ -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();

@ -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();

Loading…
Cancel
Save