Remove effects from all active spells with the same ID

pull/541/head
Capostrophic 6 years ago
parent 6c47f95677
commit ed1f8f7be7

@ -197,11 +197,13 @@ namespace MWMechanics
void ActiveSpells::removeEffects(const std::string &id)
{
TContainer::iterator spell(mSpells.find(id));
if (spell != end());
for (TContainer::iterator spell = mSpells.begin(); spell != mSpells.end(); ++spell)
{
spell->second.mEffects.clear();
mSpellsChanged = true;
if (spell->first == id)
{
spell->second.mEffects.clear();
mSpellsChanged = true;
}
}
}

Loading…
Cancel
Save