Overview
Combat log event triggers monitor the COMBAT_LOG_EVENT_UNFILTERED event, providing detailed information about damage, healing, spell casts, and other combat activities.
Combat log triggers fire for every matching combat event, making them ideal for proc tracking and combat analysis.
Basic Combat Event Trigger
{
type = "event" ,
event = "COMBAT_LOG_EVENT_UNFILTERED" ,
subeventPrefix = "SPELL_CAST_SUCCESS" ,
sourceUnit = "player" ,
spellIds = { "12345" }
}
Combat Log Subevents
The combat log uses specific subevent prefixes:
Spell Events
Cast Events
Aura Events
Damage Events
Heal Events
{
subeventPrefix = "SPELL_CAST_START" , -- Cast begins
subeventPrefix = "SPELL_CAST_SUCCESS" , -- Cast completes
subeventPrefix = "SPELL_CAST_FAILED" -- Cast fails
}
{
subeventPrefix = "SPELL_AURA_APPLIED" , -- Aura gained
subeventPrefix = "SPELL_AURA_REMOVED" , -- Aura lost
subeventPrefix = "SPELL_AURA_APPLIED_DOSE" , -- Stacks gained
subeventPrefix = "SPELL_AURA_REMOVED_DOSE" , -- Stacks lost
subeventPrefix = "SPELL_AURA_REFRESH" -- Aura refreshed
}
{
subeventPrefix = "SPELL_DAMAGE" , -- Spell damage
subeventPrefix = "SWING_DAMAGE" , -- Melee damage
subeventPrefix = "RANGE_DAMAGE" , -- Ranged damage
subeventPrefix = "SPELL_PERIODIC_DAMAGE" -- DoT tick
}
{
subeventPrefix = "SPELL_HEAL" , -- Direct heal
subeventPrefix = "SPELL_PERIODIC_HEAL" -- HoT tick
}
Event Filtering
Source Unit Filter
Player Actions
Target Actions
Any Ally
{
sourceUnit = "player" -- Only player's actions
}
Destination Unit Filter
{
destUnit = "player" , -- Events affecting player
destUnit = "target" , -- Events affecting target
destUnit = "boss" -- Events affecting any boss
}
Spell Filter
Spell IDs
Spell Names
Spell School
{
use_spellId = true ,
spellIds = {
"48068" , -- Renew
"48066" -- Power Word: Shield
}
}
{
use_spellName = true ,
spellName = "Fireball"
}
{
use_spellschool = true ,
spellschool = {
[ 2 ] = true , -- Holy
[ 4 ] = true -- Fire
}
}
Damage and Healing Filters
Amount Thresholds
{
subeventPrefix = "SPELL_DAMAGE" ,
use_amount = true ,
amount = "1000" ,
amount_operator = ">="
}
Crit Detection
{
subeventPrefix = "SPELL_DAMAGE" ,
use_critical = true ,
critical = true -- Only crits
}
Overkill Tracking
{
subeventPrefix = "SPELL_DAMAGE" ,
use_overkill = true ,
overkill = "0" ,
overkill_operator = ">" -- Overkill occurred
}
Absorb and Block
{
use_absorbed = true ,
absorbed = "0" ,
absorbed_operator = ">" , -- Some damage absorbed
use_blocked = true ,
blocked = "0" ,
blocked_operator = ">" -- Some damage blocked
}
Advanced Filters
Power Type
{
subeventPrefix = "SPELL_ENERGIZE" ,
use_powertype = true ,
powertype = 0 -- Mana
}
Power Types:
0 - Mana
1 - Rage
2 - Focus
3 - Energy
6 - Runic Power
{
use_extraSpellId = true ,
extraSpellId = "12345" -- Proc spell ID
}
Miss Type
{
subeventPrefix = "SPELL_MISSED" ,
use_missType = true ,
missType = "RESIST" -- Only resists
}
Miss Types: MISS, DODGE, PARRY, BLOCK, RESIST, IMMUNE, EVADE, DEFLECT, ABSORB
Event Counter
Count occurrences of combat events:
{
event = "COMBAT_LOG_EVENT_UNFILTERED" ,
use_count = true ,
count = "3" , -- Every 3rd event
count_operator = "=="
}
Event counters persist until manually reset, useful for proc tracking.
Event Arguments
Combat log events provide extensive information:
function ( event , timestamp , subevent , hideCaster ,
sourceGUID , sourceName , sourceFlags , sourceRaidFlags ,
destGUID , destName , destFlags , destRaidFlags ,
... -- Additional args based on subevent
)
Damage Event Args
-- After standard args:
spellId , spellName , spellSchool ,
amount , overkill , school , resisted , blocked , absorbed , critical
Heal Event Args
-- After standard args:
spellId , spellName , spellSchool ,
amount , overhealing , absorbed , critical
Aura Event Args
-- After standard args:
spellId , spellName , spellSchool ,
auraType , amount -- amount is stack count
Custom Event Processing
Process combat events with custom logic:
function ( event , timestamp , subevent , ...)
local args = { ... }
-- Extract common fields
local sourceGUID = args [ 1 ]
local sourceName = args [ 2 ]
local destGUID = args [ 5 ]
local destName = args [ 6 ]
-- Damage events have these fields
if subevent : match ( "_DAMAGE$" ) then
local spellId = args [ 9 ]
local amount = args [ 12 ]
local critical = args [ 18 ]
return critical and amount > 10000
end
return false
end
Combat log generates massive event volume in raids: -- Good: Specific filtering
{
sourceUnit = "player" ,
spellIds = { "12345" },
subeventPrefix = "SPELL_CAST_SUCCESS"
}
-- Bad: No filtering
{
event = "COMBAT_LOG_EVENT_UNFILTERED"
-- Processes EVERY combat event!
}
Always specify subeventPrefix to reduce processing: {
subeventPrefix = "SPELL_" , -- Only spell events
-- Much faster than checking every event
}
Filter by source/dest units early: {
sourceUnit = "player" , -- Filter before custom code
-- Prevents running code for non-player events
}
Common Patterns
Proc Detection
{
type = "event" ,
event = "COMBAT_LOG_EVENT_UNFILTERED" ,
subeventPrefix = "SPELL_AURA_APPLIED" ,
sourceUnit = "player" ,
spellIds = { "12345" }, -- Proc buff ID
duration = 10 -- Show for 10 seconds
}
Damage Tracker
{
type = "event" ,
event = "COMBAT_LOG_EVENT_UNFILTERED" ,
subeventPrefix = "SPELL_DAMAGE" ,
sourceUnit = "player" ,
use_amount = true ,
amount = "5000" ,
amount_operator = ">=" ,
use_critical = true ,
critical = true
}
Interrupt Monitor
{
type = "event" ,
event = "COMBAT_LOG_EVENT_UNFILTERED" ,
subeventPrefix = "SPELL_INTERRUPT" ,
sourceUnit = "group" , -- Track all party interrupts
duration = 5
}
Dispel Tracker
{
type = "event" ,
event = "COMBAT_LOG_EVENT_UNFILTERED" ,
subeventPrefix = "SPELL_DISPEL" ,
sourceUnit = "player" ,
use_extraSpellId = true -- Track what was dispelled
}
Death Detection
{
type = "event" ,
event = "COMBAT_LOG_EVENT_UNFILTERED" ,
subeventPrefix = "UNIT_DIED" ,
destUnit = "player" -- Player death
}
Combining with Other Triggers
Combat events work well in multi-trigger setups:
{
disjunctive = "all" ,
triggers = {
[ 1 ] = {
-- Trigger 1: In combat
type = "status" ,
event = "Conditions" ,
use_incombat = true
},
[ 2 ] = {
-- Trigger 2: Damage spike
type = "event" ,
event = "COMBAT_LOG_EVENT_UNFILTERED" ,
subeventPrefix = "SPELL_DAMAGE" ,
destUnit = "player" ,
use_amount = true ,
amount = "10000" ,
amount_operator = ">="
}
}
}
Spell School Reference
Multiple schools are bitwise OR: Frostfire = 16 | 4 = 20
Troubleshooting
Verify subeventPrefix matches exactly
Check source/dest unit filters
Ensure you’re in combat range
Use /combatlog to verify events are generated
Add more specific filters (spell ID, unit)
Use subeventPrefix to filter early
Consider using aura2 triggers for buffs instead
Best Practices
Buff/Debuff Triggers More efficient aura tracking
Custom Lua Advanced event processing
Trigger Overview Trigger system fundamentals