Core/Auras: Fix Pet & Totem aura stacking

Fixes aura staking for Pet, Totem and other spell effects that do not use SPELL_EFFECT_APPLY_AURA

Signed-off-by: PKX <[email protected]>
This commit is contained in:
PKX
2012-01-27 15:43:21 +01:00
parent 6c1815db7f
commit 727133b049
+5 -5
View File
@@ -3306,19 +3306,19 @@ void Unit::_RemoveNoStackAurasDueToAura(Aura* aura)
return;
bool remove = false;
for (AuraMap::iterator i = m_ownedAuras.begin(); i != m_ownedAuras.end(); ++i)
for (AuraApplicationMap::iterator i = m_appliedAuras.begin(); i != m_appliedAuras.end(); ++i)
{
if (remove)
{
remove = false;
i = m_ownedAuras.begin();
i = m_appliedAuras.begin();
}
if (aura->CanStackWith(i->second))
if (aura->CanStackWith(i->second->GetBase()))
continue;
RemoveOwnedAura(i, AURA_REMOVE_BY_DEFAULT);
if (i == m_ownedAuras.end())
RemoveAura(i, AURA_REMOVE_BY_DEFAULT);
if (i == m_appliedAuras.end())
break;
remove = true;
}