Returns battleground-specific scoreboard information for a battleground participant. Battleground-specific statistics include flags captured in Warsong Gulch, towers assaulted in Alterac Valley, etc. For the name and icon associated with each statistic, see GetBattlefieldStatInfo(). For basic battleground score information, see GetBattlefieldScore().
See also Battlefield functions.
Signature:
columnData = GetBattlefieldStatData(index, statIndex)
Arguments:
index- Index of a participant in the battleground/arena scoreboard (between 1 andGetNumBattlefieldScores()) (number)statIndex- Index of a battleground-specific statistic (between 1 andGetNumBattlefieldStats()) (number)
Returns:
columnData- The participant's score for the statistic (number)
Examples:
-- Print out the player's battleground statistics
local playerName = UnitName("player")
for playerIndex = 1, GetNumBattlefieldStats() do
local name = GetBattlefieldScore(playerIndex)
if name == playerName then
local output = "Battleground stats for "..name..":\n"
for statIndex = 1, GetNumBattlefieldStats() do
output = output .. " " .. GetBattlefieldStatInfo(statIndex) .. ": " ..GetBattlefieldStatData(statIndex) .. "\n"
end
print(output)
break
end
end