View Single Post
01-12-19, 12:14 PM   #4
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
If you don't want an entire addon just for a spell id, paste the following at https://addon.bool.no

Lua Code:
  1. local function spellid(self,unit,index,filter)
  2.     local _,id
  3.     if unit then
  4.         _,_,_,_,_,_,_,_,_,id=UnitAura(unit,index,filter)
  5.     else
  6.         _,id=self:GetSpell()
  7.     end
  8.     if id then self:AddLine("ID: "..id) end
  9.     self:Show()
  10. end
  11. hooksecurefunc(GameTooltip,"SetUnitAura",spellid)
  12. hooksecurefunc(GameTooltip,"SetUnitBuff",spellid)
  13. hooksecurefunc(GameTooltip,"SetUnitDebuff",spellid)
  14. GameTooltip:HookScript("OnTooltipSetSpell",spellid)


If you want the line a certain color, change the AddLine part to this:

if id then self:AddLine("|cff789ABCID: "..id.."|r") end

Replace 789ABC with an appropriate hex value.
  Reply With Quote