*Fix the bug that caster cannot have more than two persistent AA of the same spell.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-25 16:38:11 -05:00
parent fa38449620
commit db6b57151d

View File

@@ -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