WoW API: GetBattlefieldStatData

From AddOn Studio
Revision as of 04:45, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GetBattlefieldStatData to API GetBattlefieldStatData without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Get data from the custom battlefield scoreboard columns

GetBattlefieldStatData(playerIndex,slotIndex)

Parameters[edit]

Arguments[edit]

playerIndex
Integer - Player you want to grab the data for
slotIndex
Integer - Column you want to grab the data from

Details[edit]

Used to retrieve data from battleground specific scoreboard columns like flag captures in Warsong Gulch. If you want to make sure you have the most recent data you will have to call RequestBattlefieldScoreData and then wait for UPDATE_BATTLEFIELD_SCORE.


Example[edit]

Get how many flags captures and returns a player has inside Warsong Gulch.

for i=1, GetNumBattlefieldScores() do
	local playerName = GetBattlefieldScore(i);
	local flagCaptures = GetBattlefieldStatData(i, 1);
	local flagReturns = GetBattlefieldStatData(i, 2);
end

WoW API < GetBattlefieldStatData