Returns whether a party/raid member is nearby. The range check used by this function isn't directly based on the player's abilities (which may have varying ranges); it's fixed by Blizzard at a distance of around 40 yards (which encompasses many common healing spells and other abilities often used on raid members).

Also returns nil for units outside the player's area of view.

See also Unit functions.


inRange = UnitInRange("unit") or UnitInRange("name")


  • unit - A unit to query (string, unitID)
  • name - The name of a unit to query; only valid for party/raid members and their pets (string)


  • inRange - 1 if the unit is close enough to the player to (likely) be in range for helpful spells; otherwise nil (1nil)