ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   ACHIEVEMENTS:ShowAchievement(id) Bug (https://www.esoui.com/forums/showthread.php?t=4516)

votan 03/30/15 01:25 PM

ACHIEVEMENTS:ShowAchievement(id) Bug
 
Execute this in chat-window:
/script ACHIEVEMENTS:ShowAchievement(1201)

It should show achievement "Illicit Entrepreneur", but it crashes at line 992 of achievements.lua.
As you can see, the id is valid, because the correct category "Justice" is opened.

In-game script:
Code:

...
        local categoryIndex, subCategoryIndex, _, idOffset = GetCategoryInfoFromAchievementId(achievementId)

        if self:OpenCategory(categoryIndex, subCategoryIndex) then
            local parentAchievementIndex = achievementId - idOffset
            -- Reset filters if this achievement isn't showing
            if not self.achievements[parentAchievementIndex] then
                self:ResetFilters()
            end

            self.achievements[parentAchievementIndex]:Expand() -- line 992
...

It's because the parentAchievementIndex can not be found in the ACHIEVEMENTS:achievements after opening the category. (no filter)

parentAchievementIndex should be 1197, but is 1200. => idOffset should be 4, but is 1.
You can find the achievementId 1201 in ACHIEVEMENTS.achievements as value of key 1197
Lua Code:
  1. /script d(ACHIEVEMENTS.achievements[1197].achievementId)
  2. /script d(ACHIEVEMENTS.achievements[1197].title:GetText())

votan 03/31/15 12:07 AM

All achievements I found from ID 1-1600
 
The following achievements can not be opened with ACHIEVEMENTS:ShowAchievement:
"619 Anchor Demolisher"
"620 Anchor Decimater"
"621 Anchor Devastater"
"959 Grand Nightblade Slayer"
"960 Grand Sorcerer Slayer"
"961 Grand Templar Slayer"
"962 Grand Dragonknight Slayer"
"1201 Illicit Entrepreneur"
"1202 Black Market Mogul"
"1217 Champion of Last Seed"

Not a critical bug. Non of them have a reward color. So, without my Overview addon, nobody would never realize it.


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

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