WoW:API ArenaTeamRoster: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(ArenaTeamRoster documentation)
 
m (Move page script moved page API ArenaTeamRoster to API ArenaTeamRoster without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}} __NOTOC__
<center>''Documentation by Salanex''</center>
Requests the arena team information from the server


Requests the latest data from the server of a specific arena team that you are in
ArenaTeamRoster(teamIndex);


void ArenaTeamRoster(teamIndex)
== Parameters ==
=== Arguments ===


==Arguments==
:;index : Index of the arena team to request information from, index can be a value of 1 through 3.


:;teamIndex - integer
----
:;values: 1 - 3. You can be an a maximum of three arena teams
=== Details ===


==Remarks==
Because this sends a request to the server, you will not get the data instantly you must register and watch for the ARENA_TEAM_ROSTER_UPDATE event.
 
It appears that ARENA_TEAM_ROSTER_UPDATE will not fire if you requested the same team index last call.
Calling this function will result in a server request for the latest information of an arena team. You must also call this function before you use any other arena team functions upon logging in.
 
When the new data is ready to use with other arena team functions, the events "ARENA_TEAM_UPDATE" or "ARENA_TEAM_ROSTER_UPDATE" will fire. I haven't distinguished the difference between the two events yet.
 
It is important to note that when the events fire, the built in Arena Team frame that ships with WoW will respond to the event. You must make sure that the frame's team is the same as the index you have chosen. This will avoid GetNumArenaTeamMembers from crashing in the built in frame. To do so, have the following code before you call ArenaTeamRoster():
 
:;PvPTeamDetails.team = teamIndex;
:;ArenaTeamRoster(teamIndex);

Latest revision as of 04:45, 15 August 2023

WoW API < ArenaTeamRoster

Requests the arena team information from the server

ArenaTeamRoster(teamIndex); 

Parameters

Arguments

index
Index of the arena team to request information from, index can be a value of 1 through 3.

Details

Because this sends a request to the server, you will not get the data instantly you must register and watch for the ARENA_TEAM_ROSTER_UPDATE event. It appears that ARENA_TEAM_ROSTER_UPDATE will not fire if you requested the same team index last call.