I'd like to determine the attributes of a quest (i.e., information provided by functions such as QuestIsDaily and IsQuestCompletable) before the player clicks on the quest detail.

I'm trying to write an add-on that handles accepting and completing of daily quests with a single click on the NPC, but I'm running into a problem whereby I can't find out anything about a given quest unless the quest text is currently being displayed, defeating the purpose of the add-on. Other add-ons of this nature seem to be getting around this limitation by hard-coding information about quests, an approach I don't much like as it requires constant maintenance.

It seems to me that this information must be available somehow, as the game itself can properly figure out which icon to display over the head of the NPC without player interaction. The only question is, are add-on authors allowed access to this information? If so, how?

EDIT: What I originally left out was that the situations I'm trying to address are when:

  1. An NPC has multiple quests
  2. The quest detail is not the first thing that shows up upon right-click

Otherwise, the situation is much simpler, as I have the information I need provided immediately.


1 Answer 1


GetGossipAvailableQuests allows you to get available quests from the NPC once you have triggered the GOSSIP_SHOW event and allows you to determine if it is a daily quest. GetGossipActiveQuests allows you to get active quests from the NPC under the same condition and returns a value for each one that indicates whether or not it is complete. Assuming the "one click" is a right-click within range of the NPC, this would work.

If you're looking for something that's available via a left-click at any range, I'm unfamiliar with such an API function.

  • \$\begingroup\$ I just realized what I left out of that original question - this approach works when the NPC has only one quest, but not when multiple quests are available. When multiple quests are available, the IsQuestCompletable function does not return anything because no quest detail is shown upon the first click. \$\endgroup\$
    – Matt DiTrolio
    Commented Feb 3, 2011 at 15:44
  • \$\begingroup\$ This solution should still work even with your edited case. In fact, it fits your criteria perfectly: GetGossipAvailableQuests triggers after GOSSIP_SHOW, which means the quest detail does not have to be the first thing that shows up. Furthermore, it returns details about more than one quest. GetNumGossipAvailableQuests will tell you how many to expect, and also is available after GOSSIP_SHOW. \$\endgroup\$
    – Shaun
    Commented Feb 3, 2011 at 16:10
  • \$\begingroup\$ So you're saying that I should be able to call IsQuestCompletable while I loop through the list of quests? \$\endgroup\$
    – Matt DiTrolio
    Commented Feb 3, 2011 at 17:23
  • \$\begingroup\$ Ah, I missed that part of your edit. IsQuestCompletable only works against the quest being showed in the quest window. GetGossipActiveQuests shows you whether a quest is complete. Updated my answer. \$\endgroup\$
    – Shaun
    Commented Feb 3, 2011 at 17:42
  • \$\begingroup\$ @MattDiTrolio: Did this work for you? \$\endgroup\$
    – Shaun
    Commented Feb 8, 2011 at 16:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .