mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 12:41:01 +00:00
Merge branch 'breaklilacor' into 'master'
Allow GetEffect to detect 0 magnitude spells Closes #8097 See merge request OpenMW/openmw!4297
This commit is contained in:
commit
9234b5707f
@ -188,6 +188,7 @@
|
||||
Bug #8063: menu_background.bik video with audio freezes the game forever
|
||||
Bug #8064: Lua move360 script doesn't respect the enableZoom/disableZoom Camera interface setting
|
||||
Bug #8085: Don't search in scripts or shaders directories for "Select directories you wish to add" menu in launcher
|
||||
Bug #8097: GetEffect doesn't detect 0 magnitude spells
|
||||
Feature #1415: Infinite fall failsafe
|
||||
Feature #2566: Handle NAM9 records for manual cell references
|
||||
Feature #3501: OpenMW-CS: Instance Editing - Shortcuts for axial locking
|
||||
|
@ -603,17 +603,17 @@ namespace MWScript
|
||||
key = ESM::MagicEffect::effectGmstIdToIndex(effect);
|
||||
|
||||
const MWMechanics::CreatureStats& stats = ptr.getClass().getCreatureStats(ptr);
|
||||
|
||||
const MWMechanics::MagicEffects& effects = stats.getMagicEffects();
|
||||
|
||||
for (const auto& activeEffect : effects)
|
||||
for (const auto& spell : stats.getActiveSpells())
|
||||
{
|
||||
if (activeEffect.first.mId == key && activeEffect.second.getModifier() > 0)
|
||||
for (const auto& effect : spell.getEffects())
|
||||
{
|
||||
if (effect.mFlags & ESM::ActiveEffect::Flag_Applied && effect.mEffectId == key)
|
||||
{
|
||||
runtime.push(1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
runtime.push(0);
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user