mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
*Fix the bug that caster cannot have more than two persistent AA of the same spell.
--HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user