WoW:API GetBattlefieldStatus: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
  status, mapName, instanceID = GetBattlefieldStatus();
  status, mapName, instanceID = GetBattlefieldStatus(index);


Get status on a battlefield
Get status on a battlefield
Value of index appears to be the Battlefield queue index. Changed from null argument to index in 1.9


----
----
Line 11: Line 13:
:;instanceID : Integer - The number of the Battlefield instance
:;instanceID : Integer - The number of the Battlefield instance


  for i=1, MAX_BATTLEFIELD_QUEUES do
    status, mapName, instanceID = GetBattlefieldStatus(i);
    if ( instanceID ~= 0 ) then
        mapName = mapName.." "..instanceID;
    end
    ...


[[Category:API Functions|GetBattlefieldStatus]]
[[Category:API Functions|GetBattlefieldStatus]]
[[Category:API Battlefield Functions|GetBattlefieldStatus]]
[[Category:API Battlefield Functions|GetBattlefieldStatus]]

Revision as of 12:15, 25 November 2005

status, mapName, instanceID = GetBattlefieldStatus(index);

Get status on a battlefield

Value of index appears to be the Battlefield queue index. Changed from null argument to index in 1.9


Returns
status, mapName, instanceID
status
String - The player's Battlefield status ('none', 'queued', 'confirm', 'active', 'error')
mapName
String - The queued Battlefield's name ('Alterac Valley', etc.)
instanceID
Integer - The number of the Battlefield instance


 for i=1, MAX_BATTLEFIELD_QUEUES do
   status, mapName, instanceID = GetBattlefieldStatus(i);
   if ( instanceID ~= 0 ) then
       mapName = mapName.." "..instanceID;
   end
   ...