WoW:API UnitIsCivilian: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Move page script moved page API UnitIsCivilian to API UnitIsCivilian without leaving a redirect) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} | |||
{{removedapi|≤ 3.1.3|Dishonorable kills were removed from the Honor system}} | |||
Determine whether a unit is a civilian (low level enemy faction NPC that counts as a dishonorable kill). | Determine whether a unit is a civilian (low level enemy faction NPC that counts as a dishonorable kill). | ||
Line 13: | Line 15: | ||
=== 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; | ||
=== Notes === | |||
* No longer used by FrameXML as of 2.0, because of the new honor system. |
Latest revision as of 04:47, 15 August 2023
This is no longer a part of the World of Warcraft API.
|
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]
- unit
- String - The UnitId of the unit to check (Tested with hostile "target")
Returns[edit]
- isCivilian
- 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.