WoW:API TargetUnitsPet: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API TargetUnitsPet to API TargetUnitsPet without leaving a redirect)
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<center>'''TargetUnitsPet''' </center>
{{wowapi|removed=1.6.0|replace=Use [[API TargetUnit|TargetUnit("unitpet")]] instead}}
 
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.


----
TargetUnitsPet("unit");
;''Arguments''
 
:("unit")
 
:;unit : String - The [[API TYPE UnitId|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? -- [[User:Goldark|Goldark]] 12:30, 21 Dec 2004 (EST)''


----
== Parameters ==
;''Result''
=== Arguments ===
* unit (string) - The [[API TYPE UnitId|UnitId]] of the owner of the pet you wish to target


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


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


----
== Details ==
{{Template:WoW API}}
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?
[[Category:API Removed Functions|TargetUnitsPet]]

Latest revision as of 04:47, 15 August 2023

WoW API < TargetUnitsPet

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

TargetUnitsPet("unit");

Parameters[edit]

Arguments[edit]

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

Returns[edit]

none

Example[edit]

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

Details[edit]

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?