fix(Core/Unit): Check if the unit is within melee range before proces… (#13697)

fix(Core/Unit): Check if the unit is within melee range before processing extra attack procs
This commit is contained in:
Skjalf
2022-11-04 19:27:02 -03:00
committed by GitHub
parent 5c88f9269e
commit e5ff59ec17

View File

@@ -469,7 +469,10 @@ void Unit::Update(uint32 p_time)
extraAttacksTargets.erase(itr);
if (Unit* victim = ObjectAccessor::GetUnit(*this, targetGuid))
{
HandleProcExtraAttackFor(victim, count);
if (victim->IsWithinMeleeRange(this))
{
HandleProcExtraAttackFor(victim, count);
}
}
}
_lastExtraAttackSpell = 0;