WoW:API TargetUnitsPet: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Remove singatures made using ~ in main namespace)
mNo edit summary
Line 1: Line 1:
{{wowapi}}
{{wowapi|removed=1.6.0|replace=Use [[API TargetUnit|TargetUnit("unitpet")]] instead}}
{{removedapi|1.6.0|Use [[API TargetUnit|TargetUnit("unitpet")]] instead.}}
 
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");
  TargetUnitsPet("unit");


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


:
=== Returns ===
: none


:;unit : String - The [[API TYPE UnitId|UnitId]] of the owner of the pet you wish to target.
== Example ==
if UnitIsUnit("party1", "target") then
  TargetUnitsPet("party1")
else
  TargetUnit("party1")
end


 
== Details ==
----
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?
;''Returns''
 
: ''Unknown: presumably no return value, possibly some status to indicate if success/failure?''
 
----
;''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;

Revision as of 01:15, 11 February 2021

WoW API < TargetUnitsPet

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

TargetUnitsPet("unit");

Parameters

Arguments

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

Returns

none

Example

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

Details

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?