aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/SpellAuras.cpp10
1 files changed, 10 insertions, 0 deletions
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