mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
Merge pull request #2556 from Capostrophic/enchant
Make enchantments affect all actors with an inventory (bug #5186)
This commit is contained in:
commit
1a610d3f72
3 changed files with 3 additions and 2 deletions
|
@ -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…
Reference in a new issue