API GetQuestLogLeaderBoard

Returns information about a quest objective. description, objectiveType, isCompleted = GetQuestLogLeaderBoard(i, [questIndex])

Arguments

 * i : Number - Index of the quest objective to query, ascending from 1 to (questIndex).
 * questIndex : Optional Number - Index of the quest log entry to query, ascending from 1 to . If not provided or invalid, defaults to the currently selected quest (via )

Return values

 * description : String - Text description of the objective, e.g. "0/3 Monsters slain"
 * objectiveType : String - A token describing objective type, one of "item", "object", "monster", "reputation", "log", "event", "player", or "progressbar".
 * isCompleted : Boolean - true if sub-objective is completed, false otherwise

Example
The following function attempts to parse the description message to figure out exact progress towards the objective: function GetLeaderBoardDetails (boardIndex,questIndex) local description, objectiveType, isCompleted = GetQuestLogLeaderBoard (boardIndex,questIndex); local itemName, numItems, numNeeded = description:match("(.*):%s*([%d]+)%s*/%s*([%d]+)"); return objectiveType, itemName, numItems, numNeeded, isCompleted; end -- returns eg. "monster", "Young Nightsaber slain", 1, 7, nil

Details

 * The type "player" was added in WotLK, which is used by No Mercy! and probably other quests.
 * The type "log" was added sometime around patch 3.3.0, and seems to have replaced many instances of "event".
 * Only ever found one quest, The Thandol Span (3) that had an "object" objective.
 * The  return value can be incomplete under some circumstances, with localized item or NPC names missing from the text.