aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells
diff options
context:
space:
mode:
authorShauren <none@none>2010-12-20 11:04:48 +0100
committerShauren <none@none>2010-12-20 11:04:48 +0100
commit756ee5832ba09923eb0e736fd85f8ba0ae72001e (patch)
tree16d1c0f253d452c6dd7e7aa04e53780d816a9401 /src/server/game/Spells
parent6ec717ed5b062113161a3d67783992b17103f25d (diff)
Core/Auras: Allow stacking of auras proced from different items
Closes issue #2296. --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Spells')
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index fde83bfaced..fab20a8634d 100755
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -46,14 +46,14 @@ m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(fa
// Try find slot for aura
uint8 slot = MAX_AURAS;
// Lookup for auras already applied from spell
- if (AuraApplication * foundAura = m_target->GetAuraApplication(m_base->GetId(), m_base->GetCasterGUID()))
+ if (AuraApplication * foundAura = GetTarget()->GetAuraApplication(GetBase()->GetId(), GetBase()->GetCasterGUID(), GetBase()->GetCastItemGUID()))
{
// allow use single slot only by auras from same caster
slot = foundAura->GetSlot();
}
else
{
- Unit::VisibleAuraMap const * visibleAuras = m_target->GetVisibleAuras();
+ Unit::VisibleAuraMap const * visibleAuras = GetTarget()->GetVisibleAuras();
// lookup for free slots in units visibleAuras
Unit::VisibleAuraMap::const_iterator itr = visibleAuras->find(0);
for (uint32 freeSlot = 0; freeSlot < MAX_AURAS; ++itr , ++freeSlot)
@@ -70,7 +70,7 @@ m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(fa
if (slot < MAX_AURAS)
{
m_slot = slot;
- m_target->SetVisibleAura(slot, this);
+ GetTarget()->SetVisibleAura(slot, this);
SetNeedClientUpdate();
sLog.outDebug("Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
}
@@ -82,7 +82,7 @@ m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(fa
if (GetBase()->GetCasterGUID() == GetTarget()->GetGUID()) // caster == target - 1 negative effect is enough for aura to be negative
m_isNeedManyNegativeEffects = false;
else if (caster)
- m_isNeedManyNegativeEffects = caster->IsFriendlyTo(m_target);
+ m_isNeedManyNegativeEffects = caster->IsFriendlyTo(GetTarget());
m_flags |= (_CheckPositive(caster) ? AFLAG_POSITIVE : AFLAG_NEGATIVE) |
(GetBase()->GetCasterGUID() == GetTarget()->GetGUID() ? AFLAG_CASTER : AFLAG_NONE);
@@ -95,7 +95,7 @@ void AuraApplication::_Remove()
if (slot >= MAX_AURAS)
return;
- if (AuraApplication * foundAura = m_target->GetAuraApplication(GetBase()->GetId(), GetBase()->GetCasterGUID()))
+ if (AuraApplication * foundAura = m_target->GetAuraApplication(GetBase()->GetId(), GetBase()->GetCasterGUID(), GetBase()->GetCastItemGUID()))
{
// Reuse visible aura slot by aura which is still applied - prevent storing dead pointers
if (slot == foundAura->GetSlot())