Thread Tools Display Modes
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
05/12/19, 05:46 AM   #2
Kyoma
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 125
I believe you need to call QueryRaidLeaderboardData() to make sure it is updated. Not sure if that happens immediately or not.

Last edited by Kyoma : 05/12/19 at 05:53 AM.
  Reply With Quote

ESOUI » Developer Discussions » Bug Reports » [open] Fetching trial scores

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off