1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-23 21:39:42 +00:00

Remove effects from all active spells with the same ID

This commit is contained in:
Capostrophic 2018-08-29 13:40:37 +03:00
parent 6c47f95677
commit ed1f8f7be7

View file

@ -197,11 +197,13 @@ 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());
{ {
spell->second.mEffects.clear(); if (spell->first == id)
mSpellsChanged = true; {
spell->second.mEffects.clear();
mSpellsChanged = true;
}
} }
} }