ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Bug Reports (https://www.esoui.com/forums/forumdisplay.php?f=187)
-   -   [open] Fetching trial scores (https://www.esoui.com/forums/showthread.php?t=8522)

Aaxc 05/12/19 05:34 AM

[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?

Kyoma 05/12/19 05:46 AM

I believe you need to call QueryRaidLeaderboardData() to make sure it is updated. Not sure if that happens immediately or not.


All times are GMT -6. The time now is 05:05 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI