WoW:API JoinBattlefield: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
Queues the player for a battleground
Queues the player, or the players group for a battlefield.
 
  JoinBattlefield(index,joinAs)
  JoinBattlefield(index, joinAs, isRated)


== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
:index, joinAs  
:index, joinAs, isRated


:;index : Integer - Which battlefield index to queue for ( 0 for the first available )
:;index : Integer - Which battlefield instance to queue for (0 for first available), or which arena bracket to queue for
;:joinAs : Integer - Queue as a group or queue solo ( nil for solo; 1 for group )
:;joinAs : Integer - Queue as a group
:;isRated : Integer - Queues for a rated arena


----
----
=== Details ===
=== Details ===
Queue the player for the current battleground instance list you are viewing, if a window isn't opened it will use the last one you had opened.
Queues the player for the current battlefield they have open. When the Arena Battlemaster window is open, index 1 is 2vs2, index 2 is 3vs3 and index 3 is 5vs5, if you pass the "isRated" flag it'll queue for a rated arena, if you don't it'll queue for a Skirmish arena.
 
[[Patch 2.0.3]] You can no longer queue a group for Alterac Valley, and if the battlefield window is closed it won't queue you for the last opened battlefield. Because of this, it's possible to do send a JoinBattlefield request and then not be queued if you jump away too quickly and close the window.


[[Patch 2.4.0]] Queuing for Alterac Valley as a group is back
----
----
=== Example ===
=== Example ===
Queue as a group if the battleground will allow it, which is currently everything except [[Alterac Valley]].
Queue the players group for the battlefield window open.


  if( CanJoinBattlefieldAsGroup() ) then
  if( CanJoinBattlefieldAsGroup() ) then
Line 26: Line 31:
   JoinBattlefield(0);
   JoinBattlefield(0);
  end
  end
Queue the players group for a rated 3vs3 arena.


'''NOTE: As of 2.0.3 you can no longer use this command to sign up your group for Alterac Valley'''
JoinBattlefield(2, 1, 1);


__NOTOC__
__NOTOC__

Revision as of 18:59, 12 March 2008

WoW API < JoinBattlefield

Queues the player, or the players group for a battlefield.

JoinBattlefield(index, joinAs, isRated)

Parameters

Arguments

index, joinAs, isRated
index
Integer - Which battlefield instance to queue for (0 for first available), or which arena bracket to queue for
joinAs
Integer - Queue as a group
isRated
Integer - Queues for a rated arena

Details

Queues the player for the current battlefield they have open. When the Arena Battlemaster window is open, index 1 is 2vs2, index 2 is 3vs3 and index 3 is 5vs5, if you pass the "isRated" flag it'll queue for a rated arena, if you don't it'll queue for a Skirmish arena.

Patch 2.0.3 You can no longer queue a group for Alterac Valley, and if the battlefield window is closed it won't queue you for the last opened battlefield. Because of this, it's possible to do send a JoinBattlefield request and then not be queued if you jump away too quickly and close the window.

Patch 2.4.0 Queuing for Alterac Valley as a group is back


Example

Queue the players group for the battlefield window open.

if( CanJoinBattlefieldAsGroup() ) then
  -- Queue as a group for the first available battleground
  JoinBattlefield(0, 1);
else
  -- Solo queue for the first available battleground
  JoinBattlefield(0);
end


Queue the players group for a rated 3vs3 arena.

JoinBattlefield(2, 1, 1);