WoW API: UnitIsCivilian

Revision as of 04:47, 15 August 2023 by Move page script (talk) (Move page script moved page API UnitIsCivilian to API UnitIsCivilian without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Arguments

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

Returns

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

Example

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

Notes

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