WoW:API GetBattlefieldStatus: Difference between revisions

→‎Returns: Updated returns levels, 2.0.1 been out for close to a year so shouldn't need new in anymore
(__NOTOC__)
(→‎Returns: Updated returns levels, 2.0.1 been out for close to a year so shouldn't need new in anymore)
Line 13: Line 13:


:;status : String - Battlefield status (none, queued, confirm, active, error)
:;status : String - Battlefield status (none, queued, confirm, active, error)
:;map : String - Localized battlefield name ([[Warsong Gulch]], [[Arathi Basin]], [[Alterac Valley]] or [[Eastern Kingdoms]])
:;map : String - Localized battlefield name ([[Warsong Gulch]], [[Arathi Basin]], [[Alterac Valley]] or nil)
:;instanceID : Integer - Battlefield instance (returns 0 until you are inside an active battlefield)
:;instanceID : Integer - Battlefield instance (returns 0 until you are inside an active battlefield)
:;lowestLevel : Integer - Lowest level in the battleground that will be joining (10, 20, 30, 40, 51 or 60)
:;lowestLevel : Integer - Lowest level in the battleground that will be joining (10, 20, 30, 40, 51, 60, 61, 70)
:;highestLevel : Integer - Highest level in the battleground that will be joining (19, 29, 39, 49 or 60)
:;highestLevel : Integer - Highest level in the battleground that will be joining (19, 29, 39, 49, 60, 69, 70)
(''new in 2.0.1'')
:;teamSize: Integer - Team size of the battlefields queue (2, 3, 5 or 0 if not an arena queue)
:;teamSize: Integer - This appears to be used for arena's and is the team size for the arena (2, 3, 5 or 0 if it's not an arena queue)
:;registeredMatch: Integer - Returns 1 if it's a registered arena queue, returns 0 if it's a skirimish or not an arena queue, use teamSize to check for arenas
----
----


=== Details ===
=== Details ===


Used for retrieving the status of the battlegrounds that the player is queued or inside of, if the player is not queued for all 3 battlegrounds at once then passing an index higher then they are queued for will return none for status and [[Eastern Kingdoms]] as a map name.
Used for retrieving the status of the battlefields that the player is queued or inside of. If the player is not queued for a battlefield you request it'll return a status of none, requesting an index above 3 will return nil, map name will either be the last battlefield this index was used for or nil you should always use status to verify if it's an an active queue/game.
Appears to return 0 for minlevel and maxlevel of Alterac Valley.


==== Status ====
==== Status ====
* queued - Waiting for a battlefield to become ready
* queued - Waiting for a battlefield to become ready, you're in the queue
* confirm - Ready to join a battlefield
* confirm - Ready to join a battlefield
* active - You're inside an active battlefield
* active - Inside an active battlefield
* none - Invalid index passed, not in queue for anything
* none - Not queued for anything in this index
* error - This should never happen
* error - This should never happen


----
----
=== Example ===
=== Example ===
Display a list of battlefield brackets and arena's you're currently queued for, pending confirmation, in, or just finished.
Display a list of battlefield brackets and arena's you're currently queued for, pending confirmation, in, or just finished.
Anonymous user