WoW:API UnitInRaid: Difference between revisions

m
Move page script moved page API UnitInRaid to WoW:API UnitInRaid without leaving a redirect
No edit summary
m (Move page script moved page API UnitInRaid to WoW:API UnitInRaid without leaving a redirect)
 
(4 intermediate revisions by 4 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.
  index = UnitInRaid("unit")
  raidIndex = UnitInRaid("unit")


== Arguments ==
== Arguments ==
;unit : String - [[unitId]] to check.
;unit
: String - [[unitId]] to check.


== Returns ==
== Returns ==
;index : Layout position for raid members: integer ascending from 0 (which is the first member of the first group).
;raidIndex
: {{api|raidIndex|t=t}} of "unit" if he is in your raid group, otherwise nil.


== Example ==
== Example ==
  if UnitInRaid("target") then
  print("Your target is " .. (UnitInRaid("target") and "" or "not ") .. "in your raid group.")
  print(UnitName("target") .. " is in your raid group.");
 
end
 


==Details==
==Details==
: Pets are not considered to be part of your raid group.
* The return value is the same index used to retrieve information about raid members using [[API GetRaidRosterInfo]].
; While in a battleground, this function returns information about your battleground group.
* 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==
* [[API UnitInParty]]
* [[API GetRaidRosterInfo]]
Anonymous user