WoW:API TargetUnitsPet: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 30: Line 30:
   TargetUnit("party1");
   TargetUnit("party1");
  end;
  end;


----
----
{{Template:WoW API}}
{{WoW API}}
[[Category:API Removed Functions|TargetUnitsPet]]

Revision as of 05:59, 4 January 2006

TargetUnitsPet
TagetUnitsPet("unit");

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


Arguments
("unit")
unit
String - The UnitId of the owner of the pet you wish to 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