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:
parent
ed1f8f7be7
commit
b8ba9092cb
1 changed files with 10 additions and 4 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue