WoW:API GetQuestLogTitle: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API GetQuestLogTitle to API GetQuestLogTitle without leaving a redirect)
 
(15 intermediate revisions by 14 users not shown)
Line 1: Line 1:
<center>'''GetQuestLogTitle''' ''-Documentation by AlexanderYoshi-''</center>
{{wowapi}} __NOTOC__
Returns information about a quest in your quest log.
*title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle(questLogID);


Returns the string and other information which is associated with the specific QuestLog Title in the game.
==Parameters==
===Arguments===
:;questLogID
:: Integer - The index of the quest you wish to get information about, between 1 and [[API_GetNumQuestLogEntries|GetNumQuestLogEntries()]]'s first return value. (This is not the ID as used in [[QuestString]]s.)


GetQuestLogTitle(questID);
===Returns===
:;title
:: String - The title of the quest, or nil if the index is out of range.
:;level
:: Integer - The level of the quest
:;suggestedGroup
:: Integer - if questTag is GROUP, the positive number of players suggested for the quest or nil (added in 2.0.3)
:;isHeader
:: Boolean - 1 if the entry is not a quest, but a header, eg. "Mulgore" nil otherwise.
:;isCollapsed
:: Boolean - 1 if the entry is a collapsed header, nil otherwise.
:;isComplete
:: Integer - -1 if quest is (FAILED), +1 if quest is (COMPLETED), nil otherwise.
:;frequency
:;questID
:: Integer - The quest identification number. This is the number found in GetQuestsCompleted() after it has been completed. It is also the number used to identify quests on sites such as Wowhead.com (Example: [http://www.wowhead.com/?quest=2158 Rest and Relaxation]) (added in 3.3.0)
:;startEvent
:;displayQuestID
:;isOnMap
:;hasLocalPOI
:;isTask
:;isStory


----
==Example==
;''Arguments''
  local i = 1
 
  while GetQuestLogTitle(i) do
:(Number questID)
  local title, level, suggestedGroup, isHeader, isCollapsed, isComplete,
 
  frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI,
:;questID : The quest number to get the title of
  isTask, isStory = GetQuestLogTitle(i);
 
  if ( not isHeader ) then
----
    DEFAULT_CHAT_FRAME:AddMessage(title.. " [" .. level .. "] " .. questID)
;''Returns''
  end
 
  i = i + 1
:;questTitle(String) : The title of the quest
  end
:;level(Number) : The level of the quest
===Result===
:;questTag(String) : Should be "Elite" if it's an elite quest and nil otherwise
Prints the name, level, and Quest ID of all quests in your quest log.
:;isHeader(boolean) : True if this quest is a header.
==Before patch 6.0.1:==
:;isCollapsed(boolean) : True if this quest is a header and is collapsed.
  questTitle, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily, questID = GetQuestLogTitle(questLogID);
:;isComplete(boolean) : True if this quest is not a header and is complete.
;===Deprecated Returns:===
 
;
----
;questTag
;''Example''
: String - Should be "Elite", "Dungeon", "PVP", "Raid", "Group", "Heroic" or nil (return value is [[#questTag]]). Removed in 6.0.1
local questTitle = GetQuestLogTitle(1);
;
 
;isDaily
;''Result''
: Integer - 1 if the quest is daily. (Added in 2.1.0). If questTag is not nil and isDaily is true, then the quest tag in the QuestLogFrame will be displayed using DAILY_QUEST_TAG_TEMPLATE. Removed in 6.0.1
"Leprechaun Assault"
;
 
: questTag localization:
;''Example from QuestLogFrame.lua''
: while the value of questTag is localized, it is stored in GlobalStrings.lua as ELITE, LFG_TYPE_DUNGEON, PVP, RAID, GROUP and PLAYER_DIFFICULTY2 respectively.
  local questLogTitleText, level, questTag, isHeader, isCollapsed, isComplete = GetQuestLogTitle(questIndex);
 
----
;''Description''
 
: Returns the string which is associated with the specific QuestLog Title in the game. Also returns other information about a given quest such as what it's level is, completion status, whether it's a header and if so if it is collapsed.  
 
----
{{Template:WoW API}}
[[Category:API Functions|GetQuestLogTitle]]
[[Category:API Quest Functions|GetQuestLogTitle]]

Latest revision as of 04:46, 15 August 2023

WoW API < GetQuestLogTitle

Returns information about a quest in your quest log.

  • title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle(questLogID);

Parameters[edit]

Arguments[edit]

questLogID
Integer - The index of the quest you wish to get information about, between 1 and GetNumQuestLogEntries()'s first return value. (This is not the ID as used in QuestStrings.)

Returns[edit]

title
String - The title of the quest, or nil if the index is out of range.
level
Integer - The level of the quest
suggestedGroup
Integer - if questTag is GROUP, the positive number of players suggested for the quest or nil (added in 2.0.3)
isHeader
Boolean - 1 if the entry is not a quest, but a header, eg. "Mulgore" nil otherwise.
isCollapsed
Boolean - 1 if the entry is a collapsed header, nil otherwise.
isComplete
Integer - -1 if quest is (FAILED), +1 if quest is (COMPLETED), nil otherwise.
frequency
questID
Integer - The quest identification number. This is the number found in GetQuestsCompleted() after it has been completed. It is also the number used to identify quests on sites such as Wowhead.com (Example: Rest and Relaxation) (added in 3.3.0)
startEvent
displayQuestID
isOnMap
hasLocalPOI
isTask
isStory

Example[edit]

 local i = 1
 while GetQuestLogTitle(i) do
  local title, level, suggestedGroup, isHeader, isCollapsed, isComplete,
  frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI,
  isTask, isStory = GetQuestLogTitle(i);
  if ( not isHeader ) then
   DEFAULT_CHAT_FRAME:AddMessage(title.. " [" .. level .. "] " .. questID)
  end
  i = i + 1
 end

Result[edit]

Prints the name, level, and Quest ID of all quests in your quest log.

Before patch 6.0.1:[edit]

questTitle, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily, questID = GetQuestLogTitle(questLogID);
===Deprecated Returns
===
questTag
String - Should be "Elite", "Dungeon", "PVP", "Raid", "Group", "Heroic" or nil (return value is #questTag). Removed in 6.0.1
isDaily
Integer - 1 if the quest is daily. (Added in 2.1.0). If questTag is not nil and isDaily is true, then the quest tag in the QuestLogFrame will be displayed using DAILY_QUEST_TAG_TEMPLATE. Removed in 6.0.1
questTag localization:
while the value of questTag is localized, it is stored in GlobalStrings.lua as ELITE, LFG_TYPE_DUNGEON, PVP, RAID, GROUP and PLAYER_DIFFICULTY2 respectively.