>wowhelm_
~/forever/addon-api/function/C_SwingTimer.IsTargetWithinSwingRange

C_SwingTimer.IsTargetWithinSwingRange

documented function · SwingTimer
C_SwingTimer.IsTargetWithinSwingRange(swingType) : isInRange

Whether the current target is within range of the player's auto attack for the given swing type. Auto attacks only ever apply to the current target, so no other unit can be queried.

──ARGUMENTS
swingType
PlayerSwingType
──RETURNS
isInRange
bool, optional (Nil when no range check could be made, for example there is no target, the target cannot be attacked, or no weapon is equipped for the swing type. Nil must not be treated as out of range.)
──DETAILS
Secret Arguments
AllowedWhenUntainted
──VERSION HISTORY

Present since at least 1.60.1.70707, the first build we track.