GameTooltip SetBagItem() not working for bank slots
My Bagnon plugin relys on scanning item tooltips.
However, it seems that SetBagItem(self:GetBag(), self:GetID()) does have no effect for items in bank slots (self:GetBag() == -1). I am using this SetHyperlink() workaround, but is there really no proper way? (Sorry for not providing a minimum working example that would run without Bagnon. Maybe someone can tell me how to hook OnEnter for item slots in general?) Code:
-- Tooltip used for scanning. |
Lua Code:
Where slotID is 40-67. https://wow.gamepedia.com/API_GameTo...tInventoryItem https://wow.gamepedia.com/InventorySlotId |
Thanks for the quick reply!
I tried Code:
-- Set the tooltip to current item. |
Try explicitly calling :Show() on the tooltip before attempting to read it.
|
Thanks again for your help!
It turned out that the error was something else: Apparently, the slotIDs for bank are now 48-75. When I changed the line in my code above to Code:
scannerTooltip:SetInventoryItem('player', self:GetID()+47) |
As of 8.3 you need to do
Code:
scannerTooltip:SetInventoryItem('player', itemSlot:GetID()+51) |
I typically use BankButtonIDToInvSlotID() to get the offset.
|
Quote:
|
All times are GMT -6. The time now is 06:00 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI