Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia

Returns the raid target of a unit.

index = GetRaidTargetIndex(unit)

Arguments[]

unit
string : UnitId

Returns[]

index
number?
Value 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

Details[]

  • Raid target icons are typically displayed by unit frames, as well as above the marked entities in the 3D world. The targets can be assigned by raid leaders and assistants, party members, and the player while soloing, and are only visible to other players within the same group.
  • This function can return arbitrary values if the queried unit does not exist. Use UnitExists() to check whether a unit is valid.
    For example: "raid2target" when "raid2" is offline and not targetting anything at all misbehaves.
Related API SetRaidTarget
Related Events RAID_TARGET_UPDATE

Example[]

Prints the raid target index for your target.

/dump GetRaidTargetIndex("target")

Patch changes[]

Shadowlands Patch 9.2.0 (2022-02-22): Removed invisible IDs 9 to 18.
Patch 1.11.0 (2006-06-19): Added.

See also[]