Quantcast
Help with COMBAT_LOG_EVENT_UNFILTERED (CLASSIC) - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-02-20, 12:40 PM   #1
kneeki
A Flamescale Wyrmkin
 
kneeki's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 134
Help with COMBAT_LOG_EVENT_UNFILTERED (CLASSIC)

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);
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Help with COMBAT_LOG_EVENT_UNFILTERED (CLASSIC)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off