--COMBAT_LOG_EVENT_UNFILTERED UPDATE_TAUNT_GOD
function(...)
    local e = select(1, ...)
    if e == "COMBAT_LOG_EVENT_UNFILTERED" then
        local spellName = select(14, ...)
        if (spellName == "Taunt"
            or spellName == "Provoke"
            or spellName == "Dark Command"
            or spellName == "Torment"
            or spellName == "Hand of Reckoning"
            or spellName == "Growl")
            and subEvent == "SPELL_CAST_SUCCESS" then
                local target = select(10, ...)
                local source = select(6, ...)
                local subEvent = select(3, ...)
                aura_env.spellName = spellName
                aura_env.caster = source
                aura_env.target = target
                aura_env.cast_time = GetTime()
                if aura_env.ticker then aura_env.ticker:Cancel() end
                if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE_TAUNT_GOD") end)
                return true
            else
                return false
            end
        end
    elseif e == "UPDATE_TAUNT_GOD" then
        return true
    end
end

--DISPLAY
function()
    local source_class = UnitClass(aura_env.caster)
    local source_class_color = "|cFFFFFFFF"
    local time_color = "|cFFFFFFFF"
    local target_color = "|cFFFFFFFF"
    if aura_env.spellName == "Taunt"
    or aura_env.spellName == "Provoke"
    or aura_env.spellName == "Hand of Reckoning"
    or aura_env.spellName == "Dark Command"
    or aura_env.spellName == "Torment"
    or aura_env.spellName == "Growl"
    then cooldown_time = aura_env.cast_time + 8 else cooldown_time = 0 end
    if (cooldown_time / GetTime()) < 1 then time_color = "|cFF00FF00" else time_color = "|cFFFF0000" end
    if source_class == "Death Knight" then source_class_color = "|cFFC41F3B"
    elseif source_class == "Demon Hunter" then source_class_color = "|cFFA330C9"
    elseif source_class == "Druid" then source_class_color = "|cFFFF7D0A"
    elseif source_class == "Hunter" then source_class_color = "|cFFABD473"
    elseif source_class == "Mage" then source_class_color = "|cFF40C7EB"
    elseif source_class == "Monk" then source_class_color = "|cFF00FF96"
    elseif source_class == "Paladin" then source_class_color = "|cFFF58CBA"
    elseif source_class == "Priest" then source_class_color = "|cFFFFFFFF"
    elseif source_class == "Rogue" then source_class_color = "|cFFFFF569"
    elseif source_class == "Shaman" then source_class_color = "|cFF0070DE"
    elseif source_class == "Warlock" then source_class_color = "|cFF8787ED"
    elseif source_class == "Warrior" then source_class_color = "|cFFC79C6E" end
    if aura_env.target == UnitName("target") then target_color = "|cFF00FF00" else target_color = "|cFFFF0000" end
    return source_class_color .. aura_env.caster .. "\n" .. target_color .. aura_env.target .. "\n" .. source_class_color .. aura_env.spellName .. "\n" .. time_color .. math.floor(GetTime() - aura_env.cast_time)
end
