WoW API: CanInspect

From AddOn Studio
Revision as of 04:45, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API CanInspect to API CanInspect without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < CanInspect

Returns whether you can inspect a particular unit.

canInspect = CanInspect("unit"[, showError])

Arguments[edit]

unit
String (unitId) - Unit to check inspectability of.
showError
Flag - If true, the function will display an error message ("You can't inspect that unit") if you cannot inspect the specified unit.

Returns[edit]

canInspect
Flag - 1 if you can inspect the specified unit, nil otherwise.

Details[edit]

  • You cannot inspect NPCs, nor PvP-enabled hostile players in PvP-enabled locations.
  • This function doesn't check whether you're close enough to the unit to inspect it; use CheckInteractDistance for that.

See also[edit]