Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

API UnitIsPVP

From Wowpedia
Jump to: navigation, search

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