WoW:API AcceptBattlefieldPort: Difference between revisions
Jump to navigation
Jump to search
m (→Result: wrong word) |
m (Move page script moved page API AcceptBattlefieldPort to API AcceptBattlefieldPort without leaving a redirect) |
||
(One intermediate revision by one other user not shown) | |||
Line 10: | Line 10: | ||
=== Details === | === Details === | ||
Passing 0 or nil as an accept argument will cause you to leave the queue for the battlefield, if you are inside a battlefield you will leave it regardless if it's ended or not. | Passing 0 or nil as an accept argument will cause you to leave the queue for the battlefield, if you are inside a battlefield you will leave it regardless if it's ended or not. | ||
Requires a hardware event if the second parameter is true or 1 to enter a battlefield. For leaving the battlefield no hardware event is required. | |||
== Example == | == Example == |
Latest revision as of 04:44, 15 August 2023
← WoW API < AcceptBattlefieldPort
Confirms entry into a Battleground you are queued for that is ready.
AcceptBattlefieldPort(index, accept)
Parameters[edit]
Arguments[edit]
- index
- Numeric - The battlefield in queue to enter.
- accept
- Boolean - Whether or not to accept entry to the battlefield.
Details[edit]
Passing 0 or nil as an accept argument will cause you to leave the queue for the battlefield, if you are inside a battlefield you will leave it regardless if it's ended or not.
Requires a hardware event if the second parameter is true or 1 to enter a battlefield. For leaving the battlefield no hardware event is required.
Example[edit]
for i=1, MAX_BATTLEFIELD_QUEUES do status, mapName, instanceID = GetBattlefieldStatus(i) if status == "confirm" then AcceptBattlefieldPort(i,1) StaticPopup_Hide("CONFIRM_BATTLEFIELD_ENTRY") end end
Result[edit]
If the preceding code is called when the UPDATE_BATTLEFIELD_STATUS event is fired, it will automatically join a battleground when it becomes available.