If you don't want an entire addon just for a spell id, paste the following at
https://addon.bool.no
Lua Code:
local function spellid(self,unit,index,filter)
local _,id
if unit then
_,_,_,_,_,_,_,_,_,id=UnitAura(unit,index,filter)
else
_,id=self:GetSpell()
end
if id then self:AddLine("ID: "..id) end
self:Show()
end
hooksecurefunc(GameTooltip,"SetUnitAura",spellid)
hooksecurefunc(GameTooltip,"SetUnitBuff",spellid)
hooksecurefunc(GameTooltip,"SetUnitDebuff",spellid)
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.