mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 20:39:57 +00:00
Remove effects from all active spells with the same ID
This commit is contained in:
parent
6c47f95677
commit
ed1f8f7be7
1 changed files with 6 additions and 4 deletions
|
@ -197,13 +197,15 @@ namespace MWMechanics
|
||||||
|
|
||||||
void ActiveSpells::removeEffects(const std::string &id)
|
void ActiveSpells::removeEffects(const std::string &id)
|
||||||
{
|
{
|
||||||
TContainer::iterator spell(mSpells.find(id));
|
for (TContainer::iterator spell = mSpells.begin(); spell != mSpells.end(); ++spell)
|
||||||
if (spell != end());
|
{
|
||||||
|
if (spell->first == id)
|
||||||
{
|
{
|
||||||
spell->second.mEffects.clear();
|
spell->second.mEffects.clear();
|
||||||
mSpellsChanged = true;
|
mSpellsChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ActiveSpells::visitEffectSources(EffectSourceVisitor &visitor) const
|
void ActiveSpells::visitEffectSources(EffectSourceVisitor &visitor) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue