local GetAchievementSubCategoryInfoFn = GetAchievementSubCategoryInfo GetAchievementSubCategoryInfo = function(categoryIndex, subCategoryIndex) local name, numAchievements, earnedPoints, totalPoints, hidesPoints = GetAchievementSubCategoryInfoFn(categoryIndex, subCategoryIndex) if categoryIndex == 4 then -- Alliance War if subCategoryIndex == 1 then -- Cyrodiil numAchievements = numAchievements + (select(2, GetAchievementSubCategoryInfoFn(categoryIndex, 2))) earnedPoints = earnedPoints + (select(3, GetAchievementSubCategoryInfoFn(categoryIndex, 2))) totalPoints = totalPoints + (select(4, GetAchievementSubCategoryInfoFn(categoryIndex, 2))) elseif subCategoryIndex == 2 then -- Imperial City numAchievements = 0 earnedPoints = 0 totalPoints = 0 end end return name, numAchievements, earnedPoints, totalPoints, hidesPoints end local GetAchievementIdFn = GetAchievementId GetAchievementId = function(categoryIndex, subCategoryIndex, achievementIndex) local vanillaCount = (select(2, GetAchievementSubCategoryInfoFn(categoryIndex, subCategoryIndex))) if categoryIndex == 4 and subCategoryIndex == 1 then if achievementIndex > vanillaCount then subCategoryIndex = 2 -- Imperial City achievementIndex = achievementIndex - vanillaCount end end return GetAchievementIdFn(categoryIndex, subCategoryIndex, achievementIndex) end