LibQuestItem-1.0

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.

There was a span of about 10 minutes between when the error happened (and repeated 7 times) and when I noticed the BugSack LDB display, so can't be certain what triggered the error.

May have occurred when picking up quest item drops off mobs for a certain quest...you get up to 5 copies of the same item (shows them stacked in QuestItemBar) to be "used on" other items. Or it came from a quest item that could "summon" a friendly NPC when used (its only usage). Will link the quests later if it will help debug.

As to CPU usage, in addition to r45 of QuestItemBar using 0 CPU/second when idle, the following similar mod also uses 0 on idle: QuestClicks.

Thanks very much for replies and hope you get this working perfectly soon :D.

The lib should be pretty solid now. It spikes a bit when scanning for items but it's not that bad i think. It should never ever make a scan during combat. It is listening to the BAG_UPDATE event which fires if you loot during combat, but it will only set a var to true to indicate a update is needed. Then on PLAYER_REGEN_ENABLED the OnUpdate frame is shown and will initiate a update if needed, then it will be hidden again.

Parties should not be a problem, BAG_UPDATE is only firing for the player itself as far as i know.

Revision number is fixed.

Mmm yeah I have to dissect QuestItemBar as it seems to be using CPU for me unknown reasons. Though it should not do anything except when the lib fires its its item update callback and some cooldown updates on the buttons when a ACTIONBAR_UPDATE_COOLDOWN fires.

Finally, with r14 this library uses 0 CPU when idle. Nice work. Had to switch to testing with the following mods to see what CPU was used on looting, as OptionHouse closes when you loot: AddonProfiler & AddonManager (both more inconvenient to see ongoing CPU, though).

It does spike a bit when you loot, but nomoreso than other mods that update on bag content changes. And appears to spike to substantially lower heights than QuestItemBar r45 does itself + through Ace3 when you loot something.

The big thing will be to see if it actually causes lag when looting in parties. Which is a potential hazard when doing OnUpdates non-optimally (and I've seen testing another mod called Broker Garbage before it was recoded).

Looking better so far, though.

EDIT: one small thing, the library revision number (14 currently) isn't seen in its LUA file as it should be, even though you have a revision line at the top.

EDIT#2: one bigger thing: tested QuestItemBar v0.6-beta1 with this library embedded (Ace3 still disembedded). For some reason, the mod appears to use a small amount of CPU in combat (0.01 in AddonProfiler when not looting) with a larger than expected spike immediately after the end of combat for 2 ticks/seconds (0.15-0.25 in AddonProfiler and again, not looting). No quest items were on the bar or being used.

The mod should shut totally off (in effect) during combat, other than letting you click quest items that may be on the bar. That increased use immediately after combat is over for 2 seconds seems odd if nothing in your packs or the bar has changed.

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

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.

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%.