diff --git a/CHANGELOG.md b/CHANGELOG.md index dfb6532f3..74d0e048d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ Bug #5539: Window resize breaks when going from a lower resolution to full screen resolution Bug #5548: Certain exhausted topics can be highlighted again even though there's no new dialogue Bug #5557: Diagonal movement is noticeably slower with analogue stick + Bug #5603: Setting constant effect cast style doesn't correct effects view Feature #390: 3rd person look "over the shoulder" Feature #2386: Distant Statics in the form of Object Paging Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher diff --git a/apps/openmw/mwgui/spellcreationdialog.cpp b/apps/openmw/mwgui/spellcreationdialog.cpp index bfdba8b2e..1f086507f 100644 --- a/apps/openmw/mwgui/spellcreationdialog.cpp +++ b/apps/openmw/mwgui/spellcreationdialog.cpp @@ -739,5 +739,24 @@ namespace MWGui { mAddEffectDialog.setConstantEffect(constant); mConstantEffect = constant; + + if (!constant) + return; + + for (auto it = mEffects.begin(); it != mEffects.end();) + { + if (it->mRange != ESM::RT_Self) + { + auto& store = MWBase::Environment::get().getWorld()->getStore(); + auto magicEffect = store.get().find(it->mEffectID); + if ((magicEffect->mData.mFlags & ESM::MagicEffect::CastSelf) == 0) + { + it = mEffects.erase(it); + continue; + } + it->mRange = ESM::RT_Self; + } + ++it; + } } }