WoW:API UnitIsUnit

From AddOn Studio
Revision as of 17:26, 21 December 2004 by WoWWiki>Goldark (First draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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
  TargetUnitsPet("party1");
else
  TargetUnit("party1");
end;

Template:WoW API