Originally Posted by ZOS_ChipHilseberg
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:
do
local orgGetCategoryInfoFromData = ACHIEVEMENTS.GetCategoryInfoFromData
function ACHIEVEMENTS.GetCategoryInfoFromData(self, data, parentData)
if not data.isFakedSubcategory and parentData then
return orgGetCategoryInfoFromData(self, data, parentData)
else
local numSubCategories, numAchievements, earnedPoints, totalPoints, hidesPoints = select(2, self:GetCategoryInfo(data.categoryIndex))
if parentData then
for index = 1, numSubCategories do
local subEarned, subTotal = select(3, self:GetSubCategoryInfo(parentData.categoryIndex, index))
earnedPoints, totalPoints = earnedPoints - subEarned, totalPoints - subTotal
end
end
return numAchievements, earnedPoints, totalPoints, hidesPoints
end
end
end