Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

API JoinBattlefield

From WoW Classic Wiki

Queues the player for a battleground

JoinBattlefield(index,joinAs)

Parameters

Arguments

index, joinAs
index
Integer - Which battlefield index to queue for ( 0 for the first available )
joinAs : Integer - Queue as a group or queue solo ( nil for solo; 1 for group )

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.


Example

Queue as a group if the battleground will allow it, which is currently everything except Alterac Valley.

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