WoW:API UnitInRaid: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{wowapi}} __NOTOC__
<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
Returns 1 if the unit is in your raid group, nil otherwise.
Returns 1 if the unit is in your raid group, nil otherwise.


Pets are not considered to be part of a raid group.
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
isTrue = UnitInRaid("arg1")
 
== Parameters ==
=== Arguments ===
<!-- List each argument, together with its type -->
:;arg1 : String - Unit who should be checked
 
=== Returns ===
<!-- List each return value, together with its type -->
:;isTrue : 1 or nil
 
== Example ==
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
local TargetInRaid = UnitInRaid("target")


====Result====
<!-- If it helps, include example results here, though they are not required. You're allowed to cheat liberally since WoW isn't a command line language. -->
TargetInRaid = 1  - If your target is in your raid group.
TargetInRaid = nil - If your target is not in raid group.


----
==Details==
{{WoW API}}
<!-- Details not appropriate for the main description can go here.
    REMOVE the section if you're just going to restate the intro line! -->


[[Category:World of Warcraft API]]
: 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.

Revision as of 14:50, 18 December 2006

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.