1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-17 21:16:38 +00:00

Allow GetSpellEffects to detect enchantments by id

This commit is contained in:
Evil Eye 2025-01-19 20:07:53 +01:00
parent c16064e6f3
commit 3b50bcfb3a

View file

@ -884,8 +884,8 @@ namespace MWScript
return;
}
const MWMechanics::CreatureStats& stats = ptr.getClass().getCreatureStats(ptr);
runtime.push(stats.getActiveSpells().isSpellActive(id));
const auto& activeSpells = ptr.getClass().getCreatureStats(ptr).getActiveSpells();
runtime.push(activeSpells.isSpellActive(id) || activeSpells.isEnchantmentActive(id));
}
};