WoW:API GetRaidTargetIndex: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (→Note) |
||
| Line 1: | Line 1: | ||
{{wowapi}} | {{wowapi}} __NOTOC__ | ||
Get which raid targetting icon is being shown over a mob or raid member. | |||
icon=GetRaidTargetIndex("unit"); | icon=GetRaidTargetIndex("unit"); | ||
In patch 1.11, Blizzard added the ability for a raid/party leader or assistant leader to assign up to 8 different target icons to mobs or players. These icons are visible only to other players within the raid or party. | |||
== Parameters == | |||
=== Arguments === | |||
:("unit") | :("unit") | ||
| Line 12: | Line 13: | ||
:;unit : String - The [[API TYPE UnitId|UnitId]] to examine. | :;unit : String - The [[API TYPE UnitId|UnitId]] to examine. | ||
=== Returns === | |||
:;icon : | :;icon : Number - a value from 0 to 8, as follows: | ||
:::0 = no icon | |||
:::1 = Yellow 4-point Star | |||
:::2 = Orange Circle | |||
:::3 = Purple Diamond | |||
:::4 = Green Triangle | |||
:::5 = White Crescent Moon | |||
:::6 = Blue Square | |||
:::7 = Red "X" Cross | |||
:::8 = White Skull | |||
== Example == | |||
icon=GetRaidTargetIndex("player"); | |||
--- | == Note == | ||
* Note that (at least during 1.11), GetRaidTargetIndex() will return seemingly-random indexes for units that do not exist. Always test for UnitExists() before doing GetRaidTargetIndex(). --[[User:Mikk|Mikk]] 05:52, 21 July 2006 (EDT) | |||
: Explicit case: "raid2target" when "raid2" is offline and not targetting anything at all misbehaves. | |||
Revision as of 10:14, 21 July 2006
← WoW API < GetRaidTargetIndex
Get which raid targetting icon is being shown over a mob or raid member.
icon=GetRaidTargetIndex("unit");
In patch 1.11, Blizzard added the ability for a raid/party leader or assistant leader to assign up to 8 different target icons to mobs or players. These icons are visible only to other players within the raid or party.
Parameters
Arguments
- ("unit")
- unit
- String - The UnitId to examine.
Returns
- icon
- Number - a value from 0 to 8, as follows:
- 0 = no icon
- 1 = Yellow 4-point Star
- 2 = Orange Circle
- 3 = Purple Diamond
- 4 = Green Triangle
- 5 = White Crescent Moon
- 6 = Blue Square
- 7 = Red "X" Cross
- 8 = White Skull
Example
icon=GetRaidTargetIndex("player");
Note
- Note that (at least during 1.11), GetRaidTargetIndex() will return seemingly-random indexes for units that do not exist. Always test for UnitExists() before doing GetRaidTargetIndex(). --Mikk 05:52, 21 July 2006 (EDT)
- Explicit case: "raid2target" when "raid2" is offline and not targetting anything at all misbehaves.