WoWInterface - View Single Post - Getting item details on hover
View Single Post
07-23-20, 03:10 AM   #3
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 134
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:
  Reply With Quote