WoW API < TargetUnitsPet

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

TargetUnitsPet("unit");

Parameters[edit | edit source]

Arguments[edit | edit source]

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

Returns[edit | edit source]

none

Example[edit | edit source]

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

Details[edit | edit source]

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?

Community content is available under CC-BY-SA unless otherwise noted.