Thread Tools Display Modes
08/05/17, 08:26 AM   #1
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
[fixed] Achievements Points Count Bug

Hi @Chip,

I found a prio 1 bug
The achievements sub-category progress-bar of "General" does not show the sub-category points, but the summary points.

As you can see, the sub-category progress-bar should be at zero.
 
08/05/17, 08:47 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
And this should correct it:
Lua Code:
  1. do
  2.     local orgGetCategoryInfoFromData = ACHIEVEMENTS.GetCategoryInfoFromData
  3.     function ACHIEVEMENTS.GetCategoryInfoFromData(self, data, parentData)
  4.         if not data.isFakedSubcategory and parentData then
  5.             return orgGetCategoryInfoFromData(self, data, parentData)
  6.         else
  7.             local numSubCategories, numAchievements, earnedPoints, totalPoints, hidesPoints = select(2, self:GetCategoryInfo(data.categoryIndex))
  8.             if parentData then
  9.                 for index = 1, numSubCategories do
  10.                     local subEarned, subTotal = select(3, self:GetSubCategoryInfo(parentData.categoryIndex, index))
  11.                     earnedPoints, totalPoints = earnedPoints - subEarned, totalPoints - subTotal
  12.                 end
  13.             end
  14.             return numAchievements, earnedPoints, totalPoints, hidesPoints
  15.         end
  16.     end
  17. end
 
08/07/17, 08:58 AM   #3
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Hmm, is there more to this? When switching between categories my progress bar is updating correctly.
 
08/07/17, 11:24 AM   #4
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
All this of course without any addon:

As you can see the progress bar of the PvP summary is the same as the progressbar of PvP General.
But the PvP General progressbar is expected to be zero, because the only 80 points shown in the summary belong to Alliance War.

Last edited by votan : 08/07/17 at 11:58 AM.
 
08/08/17, 09:07 AM   #5
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Whatever.

It is such a small issue nobody realized since ... ever. At least this was what I wanted to say with "prio 1 bug" with a smiley. If you did not understand it that way: Excuse me.
 
08/08/17, 10:23 AM   #6
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
 
08/08/17, 09:38 PM   #7
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
 
08/09/17, 07:59 AM   #8
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Looks like we were able to reproduce it.
 
08/09/17, 08:31 AM   #9
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by ZOS_ChipHilseberg View Post
Looks like we were able to reproduce it.
Thanks @Chip.

I already took a look into the issue and may save you time.
The problem is distributed across two source files. At the end the code for the summary and the code for the sub-category are calling the same function: self:GetCategoryInfo(categoryIndex)
To get the correct values for what you call yourself a faked sub-category=General, is to substract all real sub-category values from the summary values.
Like this:
Lua Code:
  1. do
  2.     local orgGetCategoryInfoFromData = ACHIEVEMENTS.GetCategoryInfoFromData
  3.     function ACHIEVEMENTS.GetCategoryInfoFromData(self, data, parentData)
  4.         if not data.isFakedSubcategory and parentData then
  5.             return orgGetCategoryInfoFromData(self, data, parentData)
  6.         else
  7.             local numSubCategories, numAchievements, earnedPoints, totalPoints, hidesPoints = select(2, self:GetCategoryInfo(data.categoryIndex))
  8.             if parentData then
  9.                 for index = 1, numSubCategories do
  10.                     local subEarned, subTotal = select(3, self:GetSubCategoryInfo(parentData.categoryIndex, index))
  11.                     earnedPoints, totalPoints = earnedPoints - subEarned, totalPoints - subTotal
  12.                 end
  13.             end
  14.             return numAchievements, earnedPoints, totalPoints, hidesPoints
  15.         end
  16.     end
  17. end
 
08/10/17, 12:03 PM   #10
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
It has been fixed.
 
08/10/17, 12:12 PM   #11
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by ZOS_ChipHilseberg View Post
It has been fixed.
Awesome
 

ESOUI » Developer Discussions » Bug Reports » [fixed] Achievements Points Count 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