ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Bug Reports (https://www.esoui.com/forums/forumdisplay.php?f=187)
-   -   [fixed] Achievements Points Count Bug (https://www.esoui.com/forums/showthread.php?t=7272)

votan 08/05/17 08:26 AM

[fixed] Achievements Points Count Bug
 
Hi @Chip,

I found a prio 1 bug :D
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.

votan 08/05/17 08:47 AM

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

ZOS_ChipHilseberg 08/07/17 08:58 AM

Hmm, is there more to this? When switching between categories my progress bar is updating correctly.

votan 08/07/17 11:24 AM

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.

votan 08/08/17 09:07 AM

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.:(

Ayantir 08/08/17 10:23 AM


Rhyono 08/08/17 09:38 PM


ZOS_ChipHilseberg 08/09/17 07:59 AM

Looks like we were able to reproduce it.

votan 08/09/17 08:31 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 32222)
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

ZOS_ChipHilseberg 08/10/17 12:03 PM

It has been fixed.

votan 08/10/17 12:12 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 32263)
It has been fixed.

Awesome :banana:


All times are GMT -6. The time now is 10:08 PM.

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