Testable weakaura

mail@pastecode.io avatar
unknown
plain_text
2 months ago
513 B
1
Indexable
Never
function(event, ...)
    local timestamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = ...

    -- Check if the event is a melee auto-attack and you are the source
    if eventType == "SWING_DAMAGE" and sourceName == UnitName("player") then
        -- Play a chime sound (replace "INTERFACE\\AddOns\\MyAddon\\chime.mp3" with the path to your chime sound file)
        PlaySoundFile("INTERFACE\\AddOns\\MyAddon\\chime.mp3")
    end
end
Leave a Comment