WoW:API TargetUnitsPet

From AddOn Studio
Revision as of 17:30, 21 December 2004 by WoWWiki>Goldark (First draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
TargetUnitsPet

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


Arguments
(String unit)
unit
The owner of the pet you wish to target (e.g. "party1", "target")



Returns
Unknown: presumably no return value, possibly some status to indicate if success/failure? -- Goldark 12:30, 21 Dec 2004 (EST)

Result
The specified unit's pet becomes the active target, if such a pet exists. Otherwise, no change to target is made.

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

Template:WoW API