View Single Post
05/05/22, 03:00 PM   #4
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
Intuitively that is what I would have thought as well. However I noticed LootDrop was passing bagId and slotId from EVENT_INVENTORY_SINGLE_SLOT_UPDATE to EVENT_LOOT_RECEIVED by setting a "last item" variable and so decided to check.

So far it does indeed appear that EVENT_INVENTORY_SINGLE_SLOT_UPDATE always occurs first. In fact, it seems to occur TWICE for each loot item (probably with different 'updateReason') after which EVENT_LOOT_RECEIVED registers.

You can test it by registering for both events then creating a simple print of the event name and loot name. I haven't encountered any situation where EVENT_LOOT_RECEIVED happens before or without EVENT_INVENTORY_SINGLE_SLOT_UPDATE occurring, but I just wanted to ask in case maybe someone knows for sure how these are coded internally.
  Reply With Quote