WoW:API GetRaidRosterInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (game doesn't crash if index is out of bounds)
mNo edit summary
Line 1: Line 1:
<center>'''GetRaidRosterInfo''' ''Documentation by Totem''</center>
{{wowapi}} __NOTOC__


Gets information about a raid member.
Gets information about a raid member.


  GetRaidRosterInfo();
  name, rank, subgroup, level, class, fileName, zone, online, isDead = GetRaidRosterInfo(raidIndex);


----
== Parameters ==
;''Arguments''
=== Arguments ===
:(Integer [[API TYPE RaidIndex|RaidIndex]])


:;RaidIndex : Index of raid member between 1 and 40. If you specify an index that is out of bounds, that is zero, a negative number, or an integer greater than the number of players, the function returns [[nil]].
:;[[raidIndex]] : Number - Index of raid member between 1 and (up to) 40. If you specify an index that is out of bounds, the function returns [[nil]].


----
=== Returns ===
;''Returns''
:name, rank, subgroup, level, class, fileName, zone, online, isDead


:;name, rank, subgroup, level, class, fileName, zone, online, isDead
:;name: String - the name of the player


;''name''
:;rank: Integer - The character's current rank in the raid.  0 is a standard raid member.  1 is a raid Assistant - labeled (A) in the standard raid window.  2 is the Leader of the raid - labeled (L) in the standard raid window.
:Provides the name of the character as a string.
::'''Possible values:'''  0, 1, 2
:'''Possible values:'''  Any valid character name


;''rank''
:;subgroup: Integer - The raid party this character is currently a member of.  Raid subgroups are numbered as on the standard raid window.
:Provides an integer of the character's current rank in the raid.  0 is a standard member of the raid1 is the Assistant - labeled (A) in the standard raid window.  2 is the Leader of the raid - labeled (L) in the standard raid window.
::'''Possible values:'''  1, 2, 3, 4, 5, 6, 7, 8
:'''Possible values:'''  0, 1, 2


;''subgroup''
:;level: Number - The level of the character.  If this character is offline, the level will show as 0 (not nil).
:Provides the raid group this character is currently a member of.  Raid subgroups are numbered on the standard raid window.
::'''Possible values:'''  0, any valid character level
:'''Possible values:'''  1, 2, 3, 4, 5, 6, 7, 8


;''level''
:;class: String - The character's class (localized), with the first letter capitalized (e.g. "Priest"). This function works as normal for offline characters.
:Provides the level of the character.  If this character is offline, the level will show as 0 (not nil).
::'''Possible values:'''  Any valid character class, localized
:'''Possible values:'''  0, any valid character level


;''class''
:;fileName: String - The system representation of the character's class; always in english, always fully capitalized.
:Provides a string of the class of character. Capitalization seems to be standard (ex: Priest).  This function works as normal for offline characters.
::'''Possible values:'''  "PRIEST, "WARRIOR", "WARLOCK", etc...
:'''Possible values:'''  Any valid character class


;''fileName''
:;zone: String - The name of the zone this character is currently in.  This is the same value you see if you mouseover their portrait (if in group).  If the character is offline, this value will be the string "Offline".
:This seems to also provide the character class, but fully capitalized in English (exPRIEST)This function works as normal for offline characters. And useful to determine class regardless of localization.
::'''BUG''' (as of 2/26/2005)It seems that the person calling this function will have their Zone value returned as nil if they have not changed locations since last reloading their UIOnce you change locations (get the name to popup on screen), it seems to return as normal. This only seems to affect when you look at the zone value of yourself from the raid. ''Could a call to [[API SetMapToCurrentZone|SetMapToCurrentZone]]() cure this? --[[User:Mikk|Mikk]] 10:30, 13 August 2006 (EDT)''
:'''Possible values:'''  Any valid character class, but capitalized and always in English.
::'''Possible values:'''  nil, "Offline", any valid location


;''zone''
:;online: [[Boolean]] - The player's current online status
:Provides the name of the zone this character is currently in.  This is the same value you see if you mouseover their portrait (if in group).  If the character is offline, this value will be the string 'Offline'.
::'''Possible values:'''  1, nil
:'''BUG''' (as of 2/26/2005):  It seems that the person calling this function will have their Zone value returned as nil if they have not changed locations since last reloading their UI.  Once you change locations (get the name to popup on screen), it seems to return as normal.  This only seems to affect when you look at the zone value of yourself from the raid.
:'''Possible values:'''  nil, 'Offline', any valid location


;''online''
:;isDead: [[Boolean]] - Returns if raid member is dead or not
:Player's current online status
::Note: this does not show hunters as being dead when they have Feign Death.)
:'''Possible values:'''  1, nil


;''isDead''
:Returns if raid member is dead or not
:(note: this does not show hunters as being dead when they have Feign Death.)


----
;''Example''
name, rank, subgroup, level, class, fileName, zone, online = GetRaidRosterInfo(Raid_Member_ID_Number);


;''Result''


----
== Details ==
;''Description''


: Regarding the corrispondance of raid indecies to players. Let C be the list of players in a raid ordered by their raid index.  It appears that after any series of changes is made to the raid, at the end all players from C still in the raid will retain their original ordering (even if they left and rejoined the raid), with new members existing at any index 0<i<=40.
:Regarding the correspondance of raid indices to players: Let C be the list of players in a raid ordered by their raid index.  It appears that after any series of changes is made to the raid, at the end all players from C still in the raid will retain their original ordering (even if they left and rejoined the raid), with new members existing at any index 1<i<=40.
----
{{WoW API}}

Revision as of 14:31, 13 August 2006

WoW API < GetRaidRosterInfo

Gets information about a raid member.

name, rank, subgroup, level, class, fileName, zone, online, isDead = GetRaidRosterInfo(raidIndex);

Parameters

Arguments

raidIndex
Number - Index of raid member between 1 and (up to) 40. If you specify an index that is out of bounds, the function returns nil.

Returns

name, rank, subgroup, level, class, fileName, zone, online, isDead
name
String - the name of the player
rank
Integer - The character's current rank in the raid. 0 is a standard raid member. 1 is a raid Assistant - labeled (A) in the standard raid window. 2 is the Leader of the raid - labeled (L) in the standard raid window.
Possible values: 0, 1, 2
subgroup
Integer - The raid party this character is currently a member of. Raid subgroups are numbered as on the standard raid window.
Possible values: 1, 2, 3, 4, 5, 6, 7, 8
level
Number - The level of the character. If this character is offline, the level will show as 0 (not nil).
Possible values: 0, any valid character level
class
String - The character's class (localized), with the first letter capitalized (e.g. "Priest"). This function works as normal for offline characters.
Possible values: Any valid character class, localized
fileName
String - The system representation of the character's class; always in english, always fully capitalized.
Possible values: "PRIEST, "WARRIOR", "WARLOCK", etc...
zone
String - The name of the zone this character is currently in. This is the same value you see if you mouseover their portrait (if in group). If the character is offline, this value will be the string "Offline".
BUG (as of 2/26/2005): It seems that the person calling this function will have their Zone value returned as nil if they have not changed locations since last reloading their UI. Once you change locations (get the name to popup on screen), it seems to return as normal. This only seems to affect when you look at the zone value of yourself from the raid. Could a call to SetMapToCurrentZone() cure this? --Mikk 10:30, 13 August 2006 (EDT)
Possible values: nil, "Offline", any valid location
online
Boolean - The player's current online status
Possible values: 1, nil
isDead
Boolean - Returns if raid member is dead or not
Note: this does not show hunters as being dead when they have Feign Death.)



Details

Regarding the correspondance of raid indices to players: Let C be the list of players in a raid ordered by their raid index. It appears that after any series of changes is made to the raid, at the end all players from C still in the raid will retain their original ordering (even if they left and rejoined the raid), with new members existing at any index 1<i<=40.