API GetFilteredAchievementID

From Wowpedia
Jump to: navigation, search

Returns the ID of a filtered achievement, resulting from a call to SetAchievementSearchString.

achievementID = GetFilteredAchievementID(index)

Arguments

index
Number - The index of the filtered achievement to return the ID of, between 1 and GetNumFilteredAchievements().

Returns

achievementID
Number - The ID of an achievement.

Example

The following snippet lists the names of all achievements containing the word 'flame':

SetAchievementSearchString("flame");
local numFiltered = GetNumFilteredAchievements();

for idx = 1, numFiltered do
  local achievementID = GetFilteredAchievementID(idx);
  local _, achievementName = GetAchievementInfo(achievementID);
  print(achievementName);
end

Patch changes

See also