View Single Post
05/06/16, 10:36 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
I don't think there is an event for the keys.

Maybe you can use the event here to see if an item is locked (happens on drag/drop or double click if I remember right, hopefully if a keybind is used or a chest opened and a key consumed too?!):
EVENT_INVENTORY_SLOT_LOCKED (integer eventCode, integer bagId, integer slotId)
EVENT_INVENTORY_SLOT_UNLOCKED (integer eventCode, integer bagId, integer slotId)

Check if it's a key somehow and then react on it with this event:
EVENT_INVENTORY_ITEM_USED (integer eventCode, integer itemSoundCategory)

Another possibility could be to check with this event here:
EVENT_INVENTORY_FULL_UPDATE (integer eventCode)

Should fire after the chest is closed and you got new items from it.
Save the silver and gold keys before opening the chest and check if they decreased.


Or have a look at the standard game code if there is a global function that you can hook, if the undaunted chest is opened.
  Reply With Quote