Wowpedia

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

READ MORE

Wowpedia
Register
Advertisement

Returns the raid target of a unit.

index = GetRaidTargetIndex(unit)

Arguments[]

unit
string : UnitId

Returns[]

index
number?
Value Icon
1 IconSmall RaidStar Yellow 4-point Star
2 IconSmall RaidCircle Orange Circle
3 IconSmall RaidDiamond Purple Diamond
4 IconSmall RaidTriangle Green Triangle
5 IconSmall RaidMoon White Crescent Moon
6 IconSmall RaidSquare Blue Square
7 IconSmall RaidCross Red "X" Cross
8 IconSmall RaidSkull 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.
WoW Icon update Patch 1.11.0 (2006-06-19): Added.

See also[]

Advertisement