Fandom

WoWWiki

API UnitIsPVP

104,637pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

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

Also on Fandom

Random Wiki