WoW:API TargetUnitsPet: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(First draft)
 
m (Recategorized)
Line 1: Line 1:
<center>'''TargetUnitsPet''' </center>
<center>'''TargetUnitsPet''' </center>
TagetUnitsPet("unit");


Targets the specified unit's pet. If no such pet exists, the target will remain unchanged.
Targets the specified unit's pet. If no such pet exists, the target will remain unchanged.
Line 6: Line 8:
;''Arguments''
;''Arguments''


:(String unit)
:("unit")


:;unit : The owner of the pet you wish to target (e.g. "party1", "target")
:;unit : String - The [[API TYPE UnitId|UnitId]] of the owner of the pet you wish to target.




Line 31: Line 33:
----
----
{{Template:WoW API}}
{{Template:WoW API}}
[[Category:API Pet Functions|TargetUnitsPet]]
[[Category:API Targetting Functions|TargetUnitsPet]]

Revision as of 19:29, 28 December 2004

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