From 727133b0497b1c45dcfeb34bb915865512bb1747 Mon Sep 17 00:00:00 2001 From: PKX Date: Wed, 16 Nov 2011 11:16:23 +0100 Subject: 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 --- src/server/game/Entities/Unit/Unit.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 6bab63acf1b..d8e2a56847a 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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; } -- cgit v1.2.3