WoW:API GetArenaTeam: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(GetArenaTeam docos)
 
m (Move page script moved page API GetArenaTeam to API GetArenaTeam without leaving a redirect)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}} __NOTOC__
<center>''Documentation by Salanex''</center>
Requests information regarding the arena team that the player is in, see Returns for a full list of what this returns.


Gets basic information about an arena team that you are in.
teamName, teamSize, teamRating, weekPlayed, weekWins, seasonPlayed, seasonWins, playerPlayed, seasonPlayerPlayed, teamRank, playerRating = GetArenaTeam(id);


teamName, teamSize, teamRating, teamPlayed, teamWins, playerPlayed, teamRank = GetArenaTeam(teamIndex);
== Parameters ==
=== Arguments ===


==Arguments==
:;index : Index of the team you want information on, can be a value between 1 and 3.


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


==Return Values==
:;teamName : String - Teams name, nil if they aren't on a team or the data wasn't received yet.
:;teamSize : Integer - Team size (2, 3 or 5)
:;teamRating : Integer - Teams rating, for a team that hasn't played any games this season it'll be 1500
:;weekPlayed : Integer - Total games the team has played for the current week
:;weekWins : Integer - Total games the team has won for the current week
:;seasonPlayed : Integer - Total games that the team has played this season
:;seasonWins : Integer - Total games that the team has played this season
:;playerPlayed : Integer - Total games that the player has played this week
:;seasonPlayerPlayed : Integer - Total games that the player has played this season
:;teamRank : Integer - Teams current ranking, this is updated once a week typically when points are calculated
:;personalRating : Integer - Players personal rating with this team
:;background (red) : Float - Amount of red in the teams banner background
:;background (green) : Float - Amount of green in the teams banner background
:;background (blue) : Float - Amount of blue in the teams banner background
:;emblem :  Integer - Emblem graphic name
:;emblem - (red) : Float - Amount of red in the teams emblem color
:;emblem - (green) : Float - Amount of green in the teams emblem color
:;emblem (blue)  : Float - Amount of blue in the teams emblem color
:;border : Integer - Border graphic name
:;border (red) : Float - Amount of red in the teams border color
:;border (green) : Float - Amount of green in the teams border color
:;border (blue) : Float - Amount of blue in the teams border color


:;teamName : (string) the full string that represents the team's name
----
:;teamSize : (integer) the number of players that can compete at a time in arena.
::; values : 2, 3 and 5 for 2v2, 3v3 and 5v5
:; teamRating : (integer) the team's current arena rating
:; teamPlayed : (integer) the number of games the team has played this week
:; teamWins : (integer) the number of wins for the week
:; playerPlayed : (integer) untested but most likely the number of games you have played for the team this week
:; teamRank : (integer) the ranking of the team within it's battlegroup.


==Remarks==
=== Details ===
The team information is not kept up to date ARENA_TEAM_UPDATE is fired when the client gets the team information. The game will call [[API ArenaTeamRoster|ArenaTeamRoster]] when the player first logs in and when the game ends.


The function actually returns many more values but they are in relation to the banner icon, colours etc.
Emblem graphics are located in Interface\\PVPFrame\\Icons\\PVP-Banner-Emblem-##
 
Interface\\PVPFrame\\PVP-Banner-<TEAM SIZE>-Border-<BORDER NUMBER>
Calling this function without having called ArenaTeamRoster(teamIndex) previously will result in unexpected results or outdated information.

Latest revision as of 04:45, 15 August 2023

WoW API < GetArenaTeam

Requests information regarding the arena team that the player is in, see Returns for a full list of what this returns.

teamName, teamSize, teamRating, weekPlayed, weekWins, seasonPlayed, seasonWins, playerPlayed, seasonPlayerPlayed, teamRank, playerRating = GetArenaTeam(id);

Parameters[edit]

Arguments[edit]

index
Index of the team you want information on, can be a value between 1 and 3.

Returns[edit]

teamName
String - Teams name, nil if they aren't on a team or the data wasn't received yet.
teamSize
Integer - Team size (2, 3 or 5)
teamRating
Integer - Teams rating, for a team that hasn't played any games this season it'll be 1500
weekPlayed
Integer - Total games the team has played for the current week
weekWins
Integer - Total games the team has won for the current week
seasonPlayed
Integer - Total games that the team has played this season
seasonWins
Integer - Total games that the team has played this season
playerPlayed
Integer - Total games that the player has played this week
seasonPlayerPlayed
Integer - Total games that the player has played this season
teamRank
Integer - Teams current ranking, this is updated once a week typically when points are calculated
personalRating
Integer - Players personal rating with this team
background (red)
Float - Amount of red in the teams banner background
background (green)
Float - Amount of green in the teams banner background
background (blue)
Float - Amount of blue in the teams banner background
emblem
Integer - Emblem graphic name
emblem - (red)
Float - Amount of red in the teams emblem color
emblem - (green)
Float - Amount of green in the teams emblem color
emblem (blue)
Float - Amount of blue in the teams emblem color
border
Integer - Border graphic name
border (red)
Float - Amount of red in the teams border color
border (green)
Float - Amount of green in the teams border color
border (blue)
Float - Amount of blue in the teams border color

Details[edit]

The team information is not kept up to date ARENA_TEAM_UPDATE is fired when the client gets the team information. The game will call ArenaTeamRoster when the player first logs in and when the game ends.

Emblem graphics are located in Interface\\PVPFrame\\Icons\\PVP-Banner-Emblem-## Interface\\PVPFrame\\PVP-Banner-<TEAM SIZE>-Border-<BORDER NUMBER>