diff options
author | megamage <none@none> | 2009-08-25 16:38:11 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-25 16:38:11 -0500 |
commit | db6b57151deeb7c5b174e4eadd9f865338faa729 (patch) | |
tree | 970022f72ec71749a73a2c09a36912ed3207c71e | |
parent | fa38449620ffc49c3510c03a3f731bb56e2d70d2 (diff) |
*Fix the bug that caster cannot have more than two persistent AA of the same spell.
--HG--
branch : trunk
-rw-r--r-- | src/game/SpellAuras.cpp | 10 |
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 |