WoW:API UnitIsCivilian: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 13: Line 13:
=== Example ===
=== Example ===
if (UnitIsCivilian("target")==1) then DEFAULT_CHAT_FRAME:AddMessage("Target is a civilian", 1, 1, 0) end;
if (UnitIsCivilian("target")==1) then DEFAULT_CHAT_FRAME:AddMessage("Target is a civilian", 1, 1, 0) end;
----
{{template:WoW API}}

Revision as of 22:04, 30 December 2005

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;


Template:WoW API