Quantcast
WoWInterface - View Single Post - Get ItemID on hover
View Single Post
12-31-20, 07:47 PM   #2
Vrul
An Onyxian Warder
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 397
Lua Code:
  1. function ADDITEMTOLISTFUNCTION()
  2.     if GameTooltip:IsShown() then
  3.         local _, itemLink = GameTooltip:GetItem()
  4.         if itemLink then
  5.             local itemID = GetItemInfoFromHyperlink(itemLink)
  6.             if itemID then
  7.                 addItemToList(tableOfItems, itemID)
  8.                 print(itemLink, "added to list")
  9.             end
  10.         end
  11.     end
  12. end
  Reply With Quote