WoW:API UnitIsPVP

From AddOn Studio
Revision as of 18:12, 24 February 2006 by WoWWiki>Starlightblunder (Formatting (based on UnitClassification))
Jump to navigation Jump to search
UnitIsPVP - Documentation by MadJester

Checks to see if a unit is flagged for PvP or not.

local ispvp = UnitIsPVP(unit);

Arguments
unit (UnitID)
the unit name (e.g., "target")

Returns
ispvp
1 if the unit is flagged for PvP, nil otherwise.

Example
if (UnitIsPVP("target")) then
 -- Target is flagged for PvP
end

Template:WoW API