I am running into a little bit of a problem getting the game to detect when the "SPELL_AURA_APPLIED" event has been triggered for an add-on that I am working on. I am pretty sure that the "SPELL_AURA_APPLIED" event is the correct event as that is how the event is written to the "World of Warcraft\Logs\CombatLog.txt" file when combat logging has been turned on. I am thinking that the problem is either an event detection issue or a chat window settings issue. I am considering changing tactics and switching to a combat log parsing technique even though I would prefer the event hook method. Any though, comments, suggestions, advice would be much appreciated.
The chat windows setting issue is a long shot but it is something I have been looking into owing to the fact that I found out the hard way that guild officer chat is hidden by default with the 3.3.5 Blizzard chat frame changes. Shortly after 3.3.5 was release a few friends and I left the guild we were in to start another guild and as officers in the new guild we weren't seeing the officer chat channel; a quick look through the chat frame options revealed that the guild officer channel was not checked, and therefore not being displayed in the chat frame. So I am thinking that there could be an obscure chat channel that the DEFAULT_CHAT_FRAME:AddMessage() output is being directed to that has been disabled similarly to the guild officer channel.
Code:
--[[
Sample debugging code.
--]]
local addon = CreateFrame"Frame"
local _G = getfenv(0)
DEFAULT_CHAT_FRAME:AddMessage("debugger")
addon:SetScript("OnEvent", function()
if(event=="SPELL_AURA_APPLIED") then
DEFAULT_CHAT_FRAME:AddMessage("event detected")
end
end)
addon:RegisterEvent"SPELL_AURA_APPLIED"