View Single Post
12-09-20, 01:32 PM   #2
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
You are referencing arg1 when it should be spellID and you are checking the wrong events. Give this a shot:
Lua Code:
  1. local SPELL_ID = 24275  -- Hammer of Wrath
  2.  
  3. local frame = CreateFrame("Frame")
  4. frame:SetScript("OnEvent", function(self, event, spellID)
  5.     if event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW" then
  6.         if spellID == SPELL_ID then
  7.             print("Hello, WoW!")
  8.         end
  9.     elseif event == "SPELL_ACTIVATION_OVERLAY_GLOW_HIDE" then
  10.         if spellID == SPELL_ID then
  11.             print("Bye")
  12.         end
  13.     end
  14. end)
  15. frame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW")
  16. frame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE")
  Reply With Quote