Quantcast
WoWInterface - View Single Post - Getting item details on hover
View Single Post
07-23-20, 03:10 AM   #3
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 130
Maybe something like this is what you're looking for?
It gets the itemLink from the item that is currently displayed on the tooltip and gets the itemID from the link.

Lua Code:
  1. local _, itemLink = GameTooltip:GetItem();
  2. if (itemLink) then
  3.     local itemID = tonumber(strmatch(itemLink, "item:(%d+):"));
  4. end

To add bindings to the default UI you can use bindings.xml:
https://wowwiki.fandom.com/wiki/Usin...for_your_addon
  Reply With Quote