WoW:API UnitIsPVP: Difference between revisions

m
Move page script moved page API UnitIsPVP to WoW:API UnitIsPVP without leaving a redirect
No edit summary
 
m (Move page script moved page API UnitIsPVP to WoW:API UnitIsPVP without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{API/Uncategorized}}
{{wowapi}}
 
Checks to see if a unit is flagged for PvP or not.
local ispvp = UnitIsPVP(unit);
 
----
;''Arguments''
 
:;unit ([[API_TYPE_UnitId|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
 
----
__NOTOC__
Anonymous user