WoW:API GetQuestLogItemLink: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Initial documentation.)
 
m (Move page script moved page API GetQuestLogItemLink to API GetQuestLogItemLink without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}}
 
[[itemLink]] = GetQuestLogItemLink("type", index)
 
The function returns the [[itemLink]] of the selected quest reward for the current active quest.
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
{{Code/Begin}}
[[itemLink]] = GetQuestLogItemLink("type", index)
{{Code/End}}
 


== Arguments ==
== Arguments ==
Line 16: Line 9:
== Returns ==
== Returns ==
;[[itemLink]] : String - The link to the quest item specified
;[[itemLink]] : String - The link to the quest item specified
:or nil, if the type and/or index is invalid or there is no active quest at the moment.
:or nil, if the type and/or index is invalid, there is no active quest at the moment or if the server did not transmit the item information until the timeout (which can happen, if the item is not in the local item cache yet)




Line 22: Line 15:
: The active quest is being set when browsing the quest log. The quest log must not be open for this function to work, but a quest must be active.
: The active quest is being set when browsing the quest log. The quest log must not be open for this function to work, but a quest must be active.


:The different types refere to the different item lists, a quest can contain.
:The different types refer to the different item lists, a quest can contain.
:"reward" is the list of items which will be granted upon finishing the quest.
:"reward" is the list of items which will be granted upon finishing the quest.
:"choice" is the list of items the player can choose from, once the quest is finished.
:"choice" is the list of items the player can choose from, once the quest is finished.
:"required" should be the list of items which have to be handed in for the quest to be finished (this has not been verified)
:"required" should be the list of items which have to be handed in for the quest to be finished (this has not been verified)

Latest revision as of 04:46, 15 August 2023

WoW API < GetQuestLogItemLink

itemLink = GetQuestLogItemLink("type", index)

Arguments[edit]

type
String - "required", "reward" or "choice"
index
Table - Integer - Quest reward item index (starts with 1).


Returns[edit]

itemLink
String - The link to the quest item specified
or nil, if the type and/or index is invalid, there is no active quest at the moment or if the server did not transmit the item information until the timeout (which can happen, if the item is not in the local item cache yet)


Details[edit]

The active quest is being set when browsing the quest log. The quest log must not be open for this function to work, but a quest must be active.
The different types refer to the different item lists, a quest can contain.
"reward" is the list of items which will be granted upon finishing the quest.
"choice" is the list of items the player can choose from, once the quest is finished.
"required" should be the list of items which have to be handed in for the quest to be finished (this has not been verified)