View Single Post
05/12/19, 05:34 AM   #1
Aaxc
 
Aaxc's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2019
Posts: 19
[open] Fetching trial scores

Hey, I want to gather raid scores for my addon, so I'm using `GetRaidLeaderboardLocalPlayerInfo(RAID_CATEGORY_TRIAL, raidIndex)` method to fetch the data, but, it behaves really strange:

1. I have these lines in my addon:
Code:
    mainData.Trials = {}
    for raidIndex, raidName in ipairs(raidCategories) do
        local currentScore, maxScore = GetRaidLeaderboardLocalPlayerInfo(RAID_CATEGORY_TRIAL, raidIndex)
        mainData.Trials[raidIndex] = maxScore
    end
2. Now this seems to be correct, but they always return 0, 0 unless, I do a script call in-game from chat:
`/script d(GetRaidLeaderboardLocalPlayerInfo(RAID_CATEGORY_TRIAL, 1))`. Doesn't even matter what index. I don't even need to call them all, just once.

3. Now, if I reload UI the API call returns all the correct data. But once I logout and log back in, I need to do a local call again or the `GetRaidLeaderboardLocalPlayerInfo` calls always return zeros.

Anyone know what is going on here?
  Reply With Quote