![]() |
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns the selection type of the outline and circle underneath the unit.
type = UnitSelectionType(UnitId[, useExtendedColors])
Arguments[]
- UnitId
- string - The unit whose selection type should be returned.
- useExtendedColors
- boolean? - If true, a more appropriate type of the unit's selection will be returned. For instance, if used on a dead hostile target, the default return will be 0 (hostile), but the extended return will be 9 (dead).
Returns[]
- type
- number - The unit's selection type:
- 0 - Hostile.
- 1 - Unfriendly.
- 2 - Neutral.
- 3 - Friendly.
- 4 - Player.
- 5 - Player, if using extended colours.
- 6 - Party.
- 7 - Party (War Mode On).
- 8 - Friend, a player from your friend list.
- 9 - Dead.
- 10 - Commentator Team 1, only available to commentators.
- 11 - Commentator Team 2, only available to commentators.
- 12 - Self, your character if highlighting of your character is enabled.
- 13 - Friendly (Battleground), party members and friendly units in battlegrounds.
Details[]
- If the unit doesn't exist, this function will return 4 or 5, if using extended colours.
Patch changes[]
Patch 8.1.5 (2019-03-12): Added.
