Merge pull request #5013 from PKX/fix_auras

Core/Auras: Fix Pet & Totem aura stacking
This commit is contained in:
QAston
2012-02-05 00:14:53 -08:00

View File

@@ -3352,19 +3352,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;
}