Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
mNo edit summary
mNo edit summary
Line 21: Line 21:
 
;''Example''
 
;''Example''
 
if ( UnitIsUnit("party1", "target") ) then
 
if ( UnitIsUnit("party1", "target") ) then
TargetUnit("party1pet");
+
TargetUnit("partypet1");
 
else
 
else
 
TargetUnit("party1");
 
TargetUnit("party1");

Revision as of 17:50, 2 December 2005

UnitIsUnit

Returns true if the two specified units are the same, false otherwise.


Arguments
(String unit1, String unit2)
unit1
The first unit to query (e.g. "party1", "pet", "player")
unit2
The second unit to compare it to (e.g. "target")

Returns
Boolean unitIsUnit
unitIsUnit
True if the two units are the same, false otherwise.

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

Template:WoW API