RSS

Вторник, 16.04.2024, 19:57
Главная » WoW API » API Функции » Поля сражений »

GetBattlefieldStatData

[ править ]
Returns battleground-specific scoreboard information for a battleground participant.
[клоны]
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().

Signature:
Code
columnData = GetBattlefieldStatData(index, statIndex)

Arguments:
  • index - Index of a participant in the battleground/arena scoreboard (between 1 and GetNumBattlefieldScores()) (number)
  • statIndex - Index of a battleground-specific statistic (between 1 and GetNumBattlefieldStats()) (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

Также смотрите: Поля сражений , Battlefield functions
Ссылки: http://wowprogramming.com/docs/api/GetBattlefieldStatData