WoW API: UnitInRaid

From AddOn Studio
Revision as of 04:47, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API UnitInRaid to API UnitInRaid without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < UnitInRaid

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

raidIndex = UnitInRaid("unit")

Arguments[edit]

unit
String - unitId to check.

Returns[edit]

raidIndex
raidIndex of "unit" if he is in your raid group, otherwise nil.

Example[edit]

print("Your target is " .. (UnitInRaid("target") and "" or "not ") .. "in your raid group.")


Details[edit]

  • 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.

See also[edit]