mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Merge pull request #5013 from PKX/fix_auras
Core/Auras: Fix Pet & Totem aura stacking
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user