WoW API: UnitInRaid
← WoW API < UnitInRaid
Returns a number if the unit is in your raid group, nil otherwise.
raidIndex = UnitInRaid("unit")
ArgumentsEdit
- unit
- String - unitId to check.
ReturnsEdit
- raidIndex
- raidIndex of "unit" if he is in your raid group, otherwise nil.
ExampleEdit
print("Your target is " .. (UnitInRaid("target") and "" or "not ") .. "in your raid group.")
DetailsEdit
- The return value is the same index used to retrieve information about raid members using API GetRaidRosterInfo.
- Pets are not considered to be part of your raid group.
- While in a battleground, this function returns information about your battleground group.