From db6b57151deeb7c5b174e4eadd9f865338faa729 Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 25 Aug 2009 16:38:11 -0500 Subject: [PATCH] *Fix the bug that caster cannot have more than two persistent AA of the same spell. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 831760ba246..13e13111ae2 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -851,6 +851,7 @@ void AreaAuraEffect::Update(uint32 diff) void PersistentAreaAuraEffect::Update(uint32 diff) { + /* if(Unit *caster = GetParentAura()->GetCaster()) { if(DynamicObject *dynObj = caster->GetDynObject(GetId(), GetEffIndex())) @@ -862,6 +863,15 @@ void PersistentAreaAuraEffect::Update(uint32 diff) } } } + */ + if(DynamicObject *dynObj = GetSource()) + { + if(m_target->IsWithinDistInMap(dynObj, dynObj->GetRadius())) + { + AuraEffect::Update(diff); + return; + } + } // remove the aura if its caster or the dynamic object causing it was removed // or if the target moves too far from the dynamic object