Code:
IAT = {}
IAT.frame = CreateFrame("frame")
IAT.frame:Hide()
IAT.frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
IAT.frame:SetScript("OnEvent", function (self, event, ...) IAT.handler(event, ...) end)
function IAT.handler(event, ...)
local event_type = select(2,...)
if (event_type == "SPELL_INTERRUPT") then
local source = select(4, ...)
local target = select(7, ...)
local source_spell = select(10, ...)
local target_spell = select(13, ...)
ChatFrame1:AddMessage(string.format("IAT: event - %s, event type - %s, source - %s, target - %s, interrupting spell - %s, interrupted spell - %s",
event, event_type, source, target, source_spell, target_spell), 0, 1, 0.4)
end
end
Problem: sometimes when a spell is interrupted, the message isn't shown. Just now I Counterspelled Overlook Spirit's Shadow Weave and the message wasn't shown. Earlier I Counterspelled Shadow Weaves of other Overlook Spirits and the message was shown. When the message isn't shown, "Zhiva's Counterspell interrupts Overlook Spirit's Shadow Weave" message is also missing from combat log tab.
It looks like sometimes SPELL_INTERRUPT event fails to fire. Is this a known bug? I tried this code on live and PTR servers, same results.