WoW API: TargetUnitsPet

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

WoW API < TargetUnitsPet

Targets the specified unit's pet. If no such pet exists, the target will remain unchanged.

TargetUnitsPet("unit");

Parameters

Arguments

  • unit (string) - The UnitId of the owner of the pet you wish to target

Returns

none

Example

if UnitIsUnit("party1", "target") then
  TargetUnitsPet("party1")
else
  TargetUnit("party1")
end

Details

The specified unit's pet becomes the active target, if such a pet exists. Otherwise, no change to target is made. Presumably no return value, possibly some status to indicate if success/failure?