1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 08:53:52 +00:00

Purge effects from all permanent spells with the same ID

This commit is contained in:
Capostrophic 2018-08-29 14:09:43 +03:00
parent ed1f8f7be7
commit b8ba9092cb

View file

@ -283,12 +283,18 @@ namespace MWMechanics
{ {
if (isSpellActive(id)) if (isSpellActive(id))
{ {
TContainer::iterator spellIt = mSpells.find(getSpell(id)); for (TContainer::iterator spell = mSpells.begin(); spell != mSpells.end(); ++spell)
for (long unsigned int i = 0; i != spellIt->first->mEffects.mList.size(); i++)
{ {
spellIt->second.mPurgedEffects.insert(i); if (spell->first == getSpell(id))
mSpellsChanged = true; {
for (long unsigned int i = 0; i != spell->first->mEffects.mList.size(); i++)
{
spell->second.mPurgedEffects.insert(i);
}
}
} }
mSpellsChanged = true;
} }
} }