Core/Units: ensure that we use valid iterators when providing spell Ids in Unit::RemoveAppliedAuras and Unit::RemoveOwnedAuras
This commit is contained in:
1 parent
3a401564c2
commit
dd43ca3e6a
1 file changed
+2
@@ -3502,6 +3502,7 @@ void Unit::RemoveAppliedAuras(uint32 spellId, std::function<bool(AuraApplication
|
||||
if (check(iter->second))
|
||||
{
|
||||
RemoveAura(iter, removeMode);
|
||||
iter = m_appliedAuras.lower_bound(spellId);
|
||||
continue;
|
||||
}
|
||||
++iter;
|
||||
@@ -3515,6 +3516,7 @@ void Unit::RemoveOwnedAuras(uint32 spellId, std::function<bool(Aura const*)> con
|
||||
if (check(iter->second))
|
||||
{
|
||||
RemoveOwnedAura(iter, removeMode);
|
||||
iter = m_ownedAuras.lower_bound(spellId);
|
||||
continue;
|
||||
}
|
||||
++iter;
|
||||
|
||||
Reference in new issue
Block a user