mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Purge effects from all permanent spells with the same ID
This commit is contained in:
parent
ed1f8f7be7
commit
b8ba9092cb
@ -283,12 +283,18 @@ namespace MWMechanics
|
||||
{
|
||||
if (isSpellActive(id))
|
||||
{
|
||||
TContainer::iterator spellIt = mSpells.find(getSpell(id));
|
||||
for (long unsigned int i = 0; i != spellIt->first->mEffects.mList.size(); i++)
|
||||
for (TContainer::iterator spell = mSpells.begin(); spell != mSpells.end(); ++spell)
|
||||
{
|
||||
spellIt->second.mPurgedEffects.insert(i);
|
||||
mSpellsChanged = true;
|
||||
if (spell->first == getSpell(id))
|
||||
{
|
||||
for (long unsigned int i = 0; i != spell->first->mEffects.mList.size(); i++)
|
||||
{
|
||||
spell->second.mPurgedEffects.insert(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mSpellsChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user