There are various ways to tell if a item is a quest item or not. This library will attempt to combine all different ways.

The library will only be able to tell a addon if a item is a quest item if the user have the item equipped, in a bag, on keyring or in bank when visiting.

Implemented so far:
-Scan for quest items in bags, keyring and equipped. Scanning using GetContainerItemQuestInfo() and looking at item type and subtype using GetItemInfo.
-Scan for quest items using the questlog using GetQuestLogSpecialItemInfo().
-Detects if items starts a quest and/or if the user is already on the quest the item belongs to.

API (so far):
GetQuestItems(forceRescan) -returns a table with itemIds and their properties.
IsQuestItem(itemId) -return true if quest item.
IsUsable(itemId) -return true if usable quest item.
StartsQuestId(itemId) -return the questId if item starts a quest.
IsQuestActive(itemId) -return true if user is on quest.

This is my first library so any constructive feedback is very welcome.

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of Nickenyfiken Nickenyfiken Aug 10, 2010 at 20:44 UTC - 0 likes

    Thanks for being so persistent Zidomo. I actually don't understand why LQI was showing absolute zero CPU when QIB was loaded. But you were right, LQI was bugged because of my stupidity. It wasn't doing any item scans but the OnUpdate was constantly running.

    Please try r14, if it isn't fixed I will jump off a bridge or something :-D

  • Avatar of Zidomo Zidomo Aug 10, 2010 at 19:48 UTC - 0 likes

    No, not with items showing. That's a different circumstance unrelated to what LibQuestItem-1.0 is doing on its own with QuestItemBar. Whether or not your secure action buttons use CPU or not, the issue here is what LibQuestItem-1.0 is doing on its own when no items are shown on the bar.

    QuestItemBar r45 - - with Ace3 disembedded, other libraries embedded (CallbackHandler-1.0, LibAboutPanel, LibGratuity-3.0, LibStub) - - uses 0.0 CPU/second when idle with no items showing as show in this screenshot. QuestItemBar's anchor button is shown immediately below the OptionHouse frame. Ace3 uses the same 0.775 CPU/second median that it does on its own with no mods that use it are loaded; QuestItemBar doesn't go through it.

  • Avatar of Nickenyfiken Nickenyfiken Aug 10, 2010 at 07:17 UTC - 0 likes

    Thanks for the screenshot. I will try with only these three addons loaded ASAP. I really want to fix this. :-)

    Hmm is old revisions of QuestItemBar really using 0 CPU when idle (with items showing)? As far as I can see a SecureActionButton is using about 0.4-0.7 CPU/s. For example Bartender4 is using like 130 CPU/s for me displaying about 60 buttons. Hide half of the buttons and the CPU usage drops with about 50%.

  • Avatar of Zidomo Zidomo Aug 10, 2010 at 03:43 UTC - 0 likes

    Odd. Well, here is a screenshot of OptionHouse with LibQuestItem-1.0 r13 standalone active with CPU profiling enabled so you can see what's happening here. I cut that section out of the original WoW screenshot with IrfanView.

    r13 is using identical CPU as r11 was. That CPU usage is continual, not occasional spiking. It never drops below 0.275 and never goes above 0.350. If wondering, the OptionHouse frame display has been distorted since WoW 3.3.3 (see comments on its WoWI page).

    QuestItemBar r45 using LibGratuity-3.0 (which you've eliminated in the latest alphas & added LibQuestItem-1.0) uses 0.0 CPU on idle. Still hope you can do something to improve this library. If not, GL with it & the mod.

  • Avatar of Nickenyfiken Nickenyfiken Aug 09, 2010 at 20:36 UTC - 0 likes

    Nope sorry, OptionHouse is telling me 0.000 CPU/Sec for LibQuestItem running standalone.

  • Avatar of Nickenyfiken Nickenyfiken Aug 09, 2010 at 08:38 UTC - 0 likes

    That is really weird. Using AddonProfiler I see no CPU usage at all except after a BAG_UPDATE. I will try OptionHouse tonight.

  • Avatar of Zidomo Zidomo Aug 08, 2010 at 05:10 UTC - 0 likes

    Unfortunately no, its not better. r11 is using much more CPU time than r10 did.

    Right now with just OptionHouse & LibQuestItem-1.0 (loaded via LOD through Option House) active, the library uses between 0.225-0.310 CPU/second on idle (averaging around 0.275).

  • Avatar of Nickenyfiken Nickenyfiken Aug 06, 2010 at 21:14 UTC - 0 likes

    Yeah I thought it could be helpful. Just need to set the APIs so it could be useful to any addon.

    I know what is causing the CPU usage.

    local total_elapsed = 0
    LibQuestItem.frame:SetScript("OnUpdate", function(self, elapsed)
    	total_elapsed = total_elapsed + elapsed
    	if total_elapsed < 1 then return end
    	total_elapsed = 0
    	if itemScanNeeded then

    I've changed the code to have the frame hidden until a BAG_UPDATE event occurs. Then hide it again after the item scan. Please let me know if it is better now.

  • Avatar of Zidomo Zidomo Aug 05, 2010 at 13:43 UTC - 0 likes

    Nice idea. Various quest mods (other than yours) moving from their own methods to perhaps this library might take some effort, but still, nice idea :).

    One thing noticed so far that could use some improvement, though. Loading this alone (LOD), it uses 0.100-0.110 CPU/second when a character is idle. Not much, but its still the only library/library system I've seen lately besides Ace3 that uses CPU when idle.


Date created
Jul 30, 2010
Last update
Oct 18, 2014
Development stage
  • enUS
MIT License
Curse link
Reverse relationships
Recent files
  • R: for 6.0.2 Oct 18, 2014
  • A: r37 for 6.0.2 Oct 18, 2014
  • R: for 5.4.0 Sep 11, 2013
  • A: r34 for 5.4.0 Sep 11, 2013
  • R: for 5.2.0 Mar 09, 2013



Embedded library