Originally Posted by paulharman
Hi,
I am trying to find out how to hook the Blizzard UI item pickup functions to my own. I need to get the ID of an item as it is picked up with the mouse, in order to use the ID in my addon. Does anyone know how this can be achieved?
Thanks,
Paul
|
A quote from my code:
Code:
-- XPerl_PickupContainerItem
local oldPickup, local PickupBag, PickupSlot
local function XPerl_PickupContainerItem(bagID, slot)
PickupBag, PickupSlot = bagID, slot
return oldPickup(bagID, slot)
end
if (not oldPickup) then
oldPickup = PickupContainerItem
PickupContainerItem = XPerl_PickupContainerItem
end
This will simply store the bag and slot for you to use. In my case, I have a screen area the user can click onto to drop an item into it. Then we can read the bag/slot for the item.
Works for bags and bank container items, but you'd need a seperate hook for worn items.