WoW API < UnitIsCivilian

Determine whether a unit is a civilian (low level enemy faction NPC that counts as a dishonorable kill).

isCivilian = UnitIsCivilian(unit)

Parameters Edit

Arguments Edit

String - The UnitId of the unit to check (Tested with hostile "target")

Returns Edit

Flag - Returns 1 if the unit is a civilian, nil otherwise.

Example Edit

if (UnitIsCivilian("target")==1) then DEFAULT_CHAT_FRAME:AddMessage("Target is a civilian", 1, 1, 0) end;

Notes Edit

  • No longer used by FrameXML as of 2.0, because of the new honor system.

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.