WoW API: UnitIsPVP

From AddOn Studio
Revision as of 04:47, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API UnitIsPVP to API UnitIsPVP without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < UnitIsPVP

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