Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:API JoinBattlefield
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} __NOTOC__ Queues the player, or the player's group, for a battlefield instance. JoinBattlefield(index[, asGroup[, isRated]]) == Arguments == ;index : Number - Which battlefield instance to queue for (0 for first available), or which arena bracket to queue for. ;asGroup : Boolean - If true-equivalent, the player's group is queued for the battlefield, otherwise, only the player is queued. ;isRated : Boolean - If true-equivalent, and queueing for an arena bracket, the group is queued for a rated match as opposed to a skirmish. == Details == The function requests the player to be added to a queue for a particular instance of the currently selected battleground type, as set by {{api|RequestBattlegroundInstanceInfo}}(index). You CANNOT queue immediately after a {{api|RequestBattlegroundInstanceInfo}} call, and must instead capture the event that indicates that the instance list is available. == Example == The following code creates a utility function, JoinBattlegroundType, which allows you to queue for the first available instance of a specific battleground type. do local f, aG, iR = CreateFrame("FRAME"); f:SetScript("OnEvent", function(self, event) JoinBattlefield(0, aG, iR); self:UnregisterEvent("PVPQUEUE_ANYWHERE_SHOW"); end); function JoinBattlegroundType(index, asGroup, isRated) if f:IsEventRegistered("PVPQUEUE_ANYWHERE_SHOW") then error("A join battleground request is already being processed"); end f:RegisterEvent("PVPQUEUE_ANYWHERE_SHOW"); aG, iR = asGroup, isRated; RequestBattlegroundInstanceInfo(index); end end The following will queue you for Skirmish 2v2 if not in a group. /script JoinBattlefield(1) == Notes == * When the Arena Battlemaster window is open, index 1 is 2vs2, index 2 is 3vs3 and index 3 is 5vs5. == See Also == * {{api|CanJoinBattlefieldAsGroup}}
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Api
(
edit
)
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)