View Single Post
08-30-19, 08:59 AM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
The code snippet is showing you how you can access the tooltip information on mouseover.

You should be able to just copy that code block into your addon file and whenever you mouseover it should allow you to access that spell's spellID and then do what you need to do within that code block.


Lua Code:
  1. GameTooltip:HookScript("OnTooltipSetSpell", function(self)
  2.     local name, id = self:GetSpell()
  3.     if id then
  4.        -- Work with the spell ID you now have access to
  5.     end
  6. end)
__________________
  Reply With Quote