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!
→ WoW API
Checks to see if a unit is flagged for PvP or not.
local ispvp = UnitIsPVP(unit);
- unit (UnitID)
- the unit name (e.g., "target")
- 1 if the unit is flagged for PvP, nil otherwise.
if (UnitIsPVP("target")) then -- Target is flagged for PvP end