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
+3
View File
@@ -468,10 +468,13 @@ void Unit::Update(uint32 p_time)
uint32 count = itr->second;
extraAttacksTargets.erase(itr);
if (Unit* victim = ObjectAccessor::GetUnit(*this, targetGuid))
{
if (victim->IsWithinMeleeRange(this))
{
HandleProcExtraAttackFor(victim, count);
}
}
}
_lastExtraAttackSpell = 0;
}