Originally Posted by OUGHT
Thank you. But what if I do not have the quest ID, only the item name? How do I get which questID to query?
And is there any way that I can just get this information whenever I want without subscribing to events?
|
It all depends on what you are aiming to do and when and why.
https://wow.gamepedia.com/API_GetQuestID
This is likely to trigger when a quest is added or removed from the Watch List.
QUEST_WATCH_LIST_CHANGED: questID, added
Payload
# Name Type
1 questID number?
2 added boolean?
This is how you would get the questID
The previous suggestions are also worth using .. put them in a simple addon and see if they trigger on their own ..
This one in particular also returns the QuestID.
QUEST_LOG_CRITERIA_UPDATE: questID, specificTreeID, "description", numFulfilled, numRequired
Payload
# Name Type
1 questID number
2 specificTreeID number
3 description string
4 numFulfilled number
5 numRequired number
As long as one of these events trigger when you either pick up the quest or fulfill a part of the quest it will give you access to the questID and thus the rest of the questID related functions ..
If this still doesn't help you .. find an addon that does something similar to what you want and see how they are doing it and see how you would need to add that type of code to your addon.