Renamed teamType to teamSize
m (Slightly better example) |
(Renamed teamType to teamSize) |
||
| Line 15: | Line 15: | ||
:;map : String - Localized battlefield name ([[Warsong Gulch]], [[Arathi Basin]], [[Alterac Valley]] or [[Eastern Kingdoms]]) | :;map : String - Localized battlefield name ([[Warsong Gulch]], [[Arathi Basin]], [[Alterac Valley]] or [[Eastern Kingdoms]]) | ||
:;instanceID : Integer - Battlefield instance (returns 0 until you are inside an active battlefield) | :;instanceID : Integer - Battlefield instance (returns 0 until you are inside an active battlefield) | ||
:;lowestLevel : Integer - Lowest level in the battleground that will be joining (10, 20, 30, 40, 51 or 60) | |||
:;highestLevel : Integer - Highest level in the battleground that will be joining (19, 29, 39, 49 or 60) | |||
:;lowestLevel : Integer - | (''new in 2.0.1'') | ||
:;highestLevel : Integer - | :;teamSize: Integer - This appears to be used for arena's and is the team size for the arena (2, 3, 5 or 0 if it's not an arena queue) | ||
---- | ---- | ||
| Line 36: | Line 35: | ||
---- | ---- | ||
=== Example === | === Example === | ||
Display a list of battlefield brackets you're currently queued for, pending confirmation, in, or just finished. | Display a list of battlefield brackets and arena's you're currently queued for, pending confirmation, in, or just finished. | ||
local status, mapName, instanceID, minlevel, maxlevel; | local status, mapName, instanceID, minlevel, maxlevel; | ||
for i=1, MAX_BATTLEFIELD_QUEUES do | for i=1, MAX_BATTLEFIELD_QUEUES do | ||
status, mapName, instanceID, minlevel, maxlevel = GetBattlefieldStatus(i); | status, mapName, instanceID, minlevel, maxlevel, teamSize = GetBattlefieldStatus(i); | ||
DEFAULT_CHAT_FRAME:AddMessage(mapName .. string.format(" (%d-%d): ", minlevel, maxlevel) ..status); | if( teamSize > 0 ) then | ||
DEFAULT_CHAT_FRAME:AddMessage(mapName .. string.format("%dvs%d (%d-%d): ", minlevel, maxlevel, teamType, teamType) ..status); | |||
else | |||
DEFAULT_CHAT_FRAME:AddMessage(mapName .. string.format(" (%d-%d): ", minlevel, maxlevel) ..status); | |||
end | |||