Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!
Returns a number corresponding to the type of the unit's selection (the outline around and the circle underneath a player character or an NPC).
type = UnitSelectionType(UnitId[, useExtendedColors])
- String - The unit whose selection type should be returned.
- Boolean (optional) - 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).
- 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.
- If the unit doesn't exist, this function will return 4 or 5, if using extended colours.
- Patch 8.1.5 (2019-03-12): Added.