It's been a long time since I've made a WoW addon, and I'm a bit stuck. Using a modified snippet from the wowwiki I came up with the following, which doesn't give any error but also doesn't print '... just critted!'.
Code:
local frame = CreateFrame("FRAME", "FooAddonFrame");
frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
function eventHandler(self, event, ...)
local timestamp, type, hideCaster, sourceGUID, sourceName, sourceFlags, sourceFlags2, destGUID, destName, destFlags, destFlags2 = select(1, ...);
if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
if (type == "SWING_DAMAGE") then
local amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = select(15, ...);
if (spellName == "Sinister Strike" and critical == true) then
print("Sinister Strike just critted!");
end
end
end
end
frame:SetScript("OnEvent", eventHandler);