View Single Post
07/22/22, 11:25 PM   #32
pithka
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 5
Leaderboard changes from Update 34

Catching up after being away for a few patches and am a bit confused by some of the API changes. Previously, to get all of a characters top scores for each trial and arena, I would

1. Call QueryRaidLeaderboardData()
2. Wait for the event EVENT_RAID_LEADERBOARD_DATA_CHANGED
3. Loop through GetRaidLeaderboardLocalPlayerInfo(RAID_CATEGORY_TRIAL, raidId) for all trials
4. Loop through GetRaidLeaderboardLocalPlayerInfo(RAID_CATEGORY_CHALLENGE, arenaId) for all arena

This doesn't work anymore. Here is the section of the API patch notes that I think are relevant

Code:
Changed
* QueryRaidLeaderboardData()
* QueryBattlegroundLeaderboardData()
* QueryCampaignLeaderboardData()
to
* QueryRaidLeaderboardData(*[RaidCategory|#RaidCategory]* _raidCategory_, *integer* _raidId_, *integer* _classId_)
** _Returns:_ *[LeaderboardDataReadyState|#LeaderboardDataReadyState]* _readyState_
* QueryBattlegroundLeaderboardData(*[BattlegroundLeaderboardType|#BattlegroundLeaderboardType]* _battlegroundType_)
** _Returns:_ *[LeaderboardDataReadyState|#LeaderboardDataReadyState]* _readyState_
* QueryCampaignLeaderboardData(*[Alliance|#Alliance]* _alliance_)
** _Returns:_ *[LeaderboardDataReadyState|#LeaderboardDataReadyState]* _readyState_


Changed to _raidId_
* GetRaidLeaderboardLocalPlayerInfo(*integer* _raidId_)
* GetNumTrialLeaderboardEntries(*integer* _raidId_)
* GetNumChallengeLeaderboardEntries(*integer* _raidId_, *integer* _classId_)
* GetTrialLeaderboardEntryInfo(*integer* _raidId_, *luaindex* _entryIndex_)
* GetChallengeLeaderboardEntryInfo(*integer* _raidId_, *integer* _classId_, *luaindex* _entryIndex_)
* GetPlayerRaidParticipationInfo(*integer* _raidId_)
* GetPlayerRaidProgressInfo(*integer* _raidId_)


I'm not entirely sure how to read these patch notes. A couple of quick questions.
  • Does this mean now I should call QueryRaidLeaderboardData(raidId) multiple times, once for each raidId?
  • what is *[RaidCategory|#RaidCategory]* _raidCategory_, is this the RAID_CATEGORY_TRIAL and RAID_CATEGORY_CHALLENGE enums?
Thanks
  Reply With Quote