WoW API: UnitInRaid

From AddOn Studio
Jump to navigation Jump to search

WoW API < UnitInRaid

Returns 1 if the unit is in your raid group, nil otherwise.

isTrue = UnitInRaid("arg1")

Parameters

Arguments

arg1
String - Unit who should be checked

Returns

isTrue
1 or nil

Example

local TargetInRaid = UnitInRaid("target")

Result

TargetInRaid = 1   - If your target is in your raid group.
TargetInRaid = nil - If your target is not in raid group.

Details

Pets are not considered to be part of your raid group.
The "battleground"-raid/party-members are also not considered to be part of your raid.
Inside "battleground" UnitInRaid("unit") will return a number based on layout position