Thread Tools Display Modes
03/30/15, 01:25 PM   #1
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
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())

Last edited by votan : 03/30/15 at 01:40 PM.
  Reply With Quote
03/31/15, 12:07 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
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.

Last edited by votan : 03/31/15 at 12:30 PM. Reason: Test completed
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » ACHIEVEMENTS:ShowAchievement(id) Bug

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