API GetRaidTargetIndex

Returns the raid target index assigned to a unit. index = GetRaidTargetIndex(unit)

Arguments

 * unit : string : UnitId

Returns

 * index : number ?

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 to check whether a unit is valid.
 * For example: "raid2target" when "raid2" is offline and not targetting anything at all misbehaves.

Example
Prints the raid target index for your target. /dump GetRaidTargetIndex("target")