WoW:API UnitInRaid: Difference between revisions
(See also) |
m (Move page script moved page API UnitInRaid to API UnitInRaid without leaving a redirect) |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | {{wowapi}} __NOTOC__ | ||
Returns a number if the unit is in your raid group, nil otherwise. | Returns a number if the unit is in your raid group, nil otherwise. | ||
raidIndex = UnitInRaid("unit") | |||
== Arguments == | == Arguments == | ||
;unit : String - [[unitId]] to check. | ;unit | ||
: String - [[unitId]] to check. | |||
== Returns == | == Returns == | ||
; | ;raidIndex | ||
: {{api|raidIndex|t=t}} of "unit" if he is in your raid group, otherwise nil. | |||
== Example == | == Example == | ||
print("Your target is " .. (UnitInRaid("target") and "" or "not ") .. "in your raid group.") | |||
==Details== | ==Details== | ||
* 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== | ==See also== | ||
* [[API UnitInParty]] | * [[API UnitInParty]] | ||
* [[API GetRaidRosterInfo]] | |||
Latest revision as of 04:47, 15 August 2023
← WoW API < UnitInRaid
Returns a number if the unit is in your raid group, nil otherwise.
raidIndex = UnitInRaid("unit")
Arguments
- unit
- String - unitId to check.
Returns
- raidIndex
- raidIndex of "unit" if he is in your raid group, otherwise nil.
Example
print("Your target is " .. (UnitInRaid("target") and "" or "not ") .. "in your raid group.")
Details
- 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.