WoW:API AcceptBattlefieldPort: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 1: Line 1:
{{API/Uncategorized}}
<center>'''AcceptBattlefieldPort()''' - ''Documentation by weab''</center>
 
Confirms entry into a Battleground you are queued for that is ready.
 
AcceptBattlefieldPort(index, accept)
== Parameters ==
=== Arguments ===
 
:;index : Numeric - The battlefield in queue to enter.
:;accept : Boolean - Whether or not to accept entry to the battlefield.
 
=== Example ===
 
If the following code is called when the UPDATE_BATTLEFIELD_STATUS event is fired, it will automatically join a battleground when it becomes available.
 
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
 
 
----
__NOTOC__
{{Template:WoW API}}

Revision as of 09:32, 6 January 2006

AcceptBattlefieldPort() - Documentation by weab

Confirms entry into a Battleground you are queued for that is ready.

AcceptBattlefieldPort(index, accept)

Parameters

Arguments

index
Numeric - The battlefield in queue to enter.
accept
Boolean - Whether or not to accept entry to the battlefield.

Example

If the following code is called when the UPDATE_BATTLEFIELD_STATUS event is fired, it will automatically join a battleground when it becomes available.

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



Template:WoW API