No edit summary |
User-6548696 (talk | contribs) (Change return values) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{wowapi}} |
||
− | <!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | ;unit: String - [[UnitId]] of the unit to check. |
||
⚫ | |||
⚫ | |||
+ | ;isTrue : Boolean - true if the unit is a player, false otherwise. |
||
− | ---- |
||
⚫ | |||
− | |||
− | :<i>[[API_TYPE_UnitId|UnitId]]</i> |
||
− | |||
− | ---- |
||
⚫ | |||
− | |||
− | :<i>True/False</i> |
||
− | |||
− | ---- |
||
− | ;''Example'' |
||
− | <!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> |
||
− | |||
− | if (UnitIsPlayer(UnitId)) then |
||
− | --Do something here |
||
− | elseif (UnitIsPlayer(UnitId) ~= nil) then |
||
− | --Do something here |
||
− | end |
||
− | |||
− | ---- |
||
− | {{WoW API}} |
Revision as of 12:07, 29 October 2014
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Checks if a specified unit is a player.
isTrue = UnitIsPlayer(unit)
Arguments
- unit
- String - UnitId of the unit to check.
Returns
- isTrue
- Boolean - true if the unit is a player, false otherwise.