Probably instead of a name string, you'd want to store the achievemement and critera IDs, and then use GetAchievementCriteriaInfoByID to get the localized name. This would also give you the "completed" states for hiding the icons for already-visited areas. Wowhead doesn't list criteria IDs as far as I can see, but it's easy enough to pull them out of the game. The API will also give you an "asset ID" for each criteria... maybe you can map that to something in the DBC data?
This will give you a nice list of all the exploration achievement criteria:
Code:
local categories = {
14777, -- Eastern Kingdoms
14778, -- Kalimdor
14779, -- Outland
14780, -- Northrend
15069, -- Cataclysm
15113, -- Pandaria
}
local data = { { "achivementID", "achievementName", "criteriaID", "criteriaName", "assetID" } }
YOUR_SAVED_VAR_HERE = data
for i = 1, #categories do
local categoryID = categories[i]
for j = 1, GetCategoryNumAchievements(categoryID) do
local achievementID, achievementName = GetAchievementInfo(categoryID, j)
for k = 1, GetAchievementNumCriteria(achievementID) do
local criteriaName,criteriaType,_,_,_,_,_,assetID,_,criteriaID = GetAchievementCriteriaInfo(achievementID, k)
if criteriaType == 43 then
tinsert(data, { achievementID, achievementName, criteriaID, criteriaName, assetID })
end
end
end
end