View Single Post
04/30/23, 11:49 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,999
Just skip the loot check, add an EVENT_INVENTORY_SINGLE_SLOT_UPDATE with filter on BagId = BAG_BAGPACK and isNew = true.
https://wiki.esoui.com/AddFilterForEvent
Looted items definately throw that event but I cannot say in what order.
But with the new AND bag filter it should only count for really new "looted" or "crafted" items.

Install merTorchbug or Zgoo addons and enable the event tracking (merTorchbug: /tb command, then press on the e at the title bar, or use /tbe to get to the events tab and then press the e button at the titlebar) and see what events fire as you do things.

Btw: please! use unique names for the events registered !!!
do not simply use SLOT_UPDATE, add your addon name in there ("MyUniqueAddonName_SlotUpdate") so it's not overwriting ZOs or other event handlers by accident!!!
This applies to ALL uniqueNames for events, callbacks, global function names & variabnles, and so on.

Last edited by Baertram : 04/30/23 at 11:52 AM.
  Reply With Quote