COMBAT_LOG_EVENT

From Wowpedia
Jump to: navigation, search

Fires for combat events such as a player casting a spell or an NPC taking damage. The event payload is returned from CombatLogGetCurrentEventInfo().

COMBAT_LOG_EVENT and COMBAT_LOG_EVENT_UNFILTERED (CLEU) have identical parameters, the difference is that COMBAT_LOG_EVENT only reflects the user's actual combat log. This makes CLEU preferred for use by addons.

Base Parameters

1st Param 2nd Param 3rd Param 4th Param 5th Param 6th Param 7th Param 8th Param 9th Param 10th Param 11th Param
timestamp event hideCaster sourceGUID sourceName sourceFlags sourceRaidFlags destGUID destName destFlags destRaidFlags
timestamp 
number - Unix Time in seconds with milliseconds precision, for example 1555749627.861. Similar to time() and can be passed as the second argument of date().
hideCaster  
boolean - Returns true if the source unit should be hidden in the Blizzard combat log.
guid 
string - Globally unique identifier for units (NPCs, players, pets, etc), for example "Creature-0-3113-0-47-94-00003AD5D7".
flags 
number - Contains the flag bits for a unit's type, controller, reaction and affiliation. For example 68168 = 0x10A48: Unit is the current target, is an NPC, the controller is an NPC, reaction is hostile and affiliation is outsider.
raidFlags 
number - Contains the raid flag bits for a unit's raid target icon.


Events

How to specify full event strings: read prefix to suffix in order and use the parameter table as specified. Unused entries are nil. A blank cell means that there are no additional arguments for this prefix or suffix.

Prefixes

The Parameters listed with prefixes are numbered in the order they come after the 11 base parameters.

Prefix 1st Parameter (12th) 2nd Parameter (13th) 3rd Parameter (14th)
SWING
RANGE spellId spellName spellSchool
SPELL spellId spellName spellSchool
SPELL_PERIODIC spellId spellName spellSchool
SPELL_BUILDING spellId spellName spellSchool
ENVIRONMENTAL environmentalType
  • WoW Icon update.png Patch 1.13.2 (2019-08-26): (Classic) spellId and extraSpellId are always returned as 0, since they were only added to the combat log in patch 2.4

Suffixes

The Parameters listed with suffixes are numbered in the order they come after the prefix parameters.

  • Note that params for SWING_DAMAGE start at the 12th parameter; and for ENVIRONMENTAL_DAMAGE at the 13th parameter.
  • The parameters for critical, glancing, crushing, and isOffHand are true/false flags.
Suffix 1st Param (15th) 2nd Param (16th) 3rd Param (17th) 4th Param (18th) 5th Param (19th) 6th Param (20th) 7th Param (21st) 8th Param (22nd) 9th Param (23rd) 10th Param (24th)
_DAMAGE amount overkill school resisted blocked absorbed critical glancing crushing isOffHand
_MISSED missType isOffHand amountMissed
_HEAL amount overhealing absorbed critical
_ENERGIZE amount overEnergize powerType alternatePowerType
_DRAIN amount powerType extraAmount
_LEECH amount powerType extraAmount
_INTERRUPT extraSpellId extraSpellName extraSchool
_DISPEL extraSpellId extraSpellName extraSchool auraType
_DISPEL_FAILED extraSpellId extraSpellName extraSchool
_STOLEN extraSpellId extraSpellName extraSchool auraType
_EXTRA_ATTACKS amount
_AURA_APPLIED auraType amount
_AURA_REMOVED auraType amount
_AURA_APPLIED_DOSE auraType amount
_AURA_REMOVED_DOSE auraType amount
_AURA_REFRESH auraType amount
_AURA_BROKEN auraType
_AURA_BROKEN_SPELL extraSpellId extraSpellName extraSchool auraType
_CAST_START
_CAST_SUCCESS
_CAST_FAILED failedType
_INSTAKILL
_DURABILITY_DAMAGE
_DURABILITY_DAMAGE_ALL
_CREATE
_SUMMON
_RESURRECT
_ABSORBED WoW Icon update.png amount

Special Events

Event Prefix to use Suffix to use
DAMAGE_SHIELD SPELL _DAMAGE
DAMAGE_SPLIT SPELL _DAMAGE
DAMAGE_SHIELD_MISSED SPELL _MISSED
Event 1st Param (12th) 2nd Param (13th) 3rd Param (14th)
ENCHANT_APPLIED spellName itemID itemName
ENCHANT_REMOVED spellName itemID itemName
PARTY_KILL
UNIT_DIED recapID unconsciousOnDeath
UNIT_DESTROYED recapID unconsciousOnDeath
UNIT_DISSIPATES recapID unconsciousOnDeath
  • ENCHANT_APPLIED is triggered when a weapon's enchant changes, but before the API information is updated to reflect the change. It is possible for main-hand and off-hand wielded weapons to have the same itemID. When an enchant is reapplied the original is removed first, triggering an ENCHANT_REMOVED event before an ENCHANT_APPLIED event is triggered. A much better way of tracking temporary weapon enchants is to use the UNIT_INVENTORY_CHANGED event.

Warlords of Draenor Patch 6.1.0 (2015-02-24): Added two new parameters, recapID and unconsciousOnDeath to UNIT_DIED, UNIT_DESTROYED and UNIT_DISSIPATES. The recapID parameter should only return on the player's death.

Parameter Values

Spell School

Type
(bitmask)
Type
(decimal)
Name Combination
00000001
1
Physical #FFFF00 - 255, 255, 0
00000010
2
Holy #FFE680 - 255, 230, 128
00000100
4
Fire #FF8000 - 255, 128, 0
00001000
8
Nature #4DFF4D - 77, 255, 77
00010000
16
Frost #80FFFF - 128, 255, 255
00100000
32
Shadow #8080FF - 128, 128, 255
01000000
64
Arcane #FF80FF - 255, 128, 255
Double schools
00000011
3
Holystrike Holy + Physical
00000101
5
Flamestrike Fire + Physical
00000110
6
Holyfire (Radiant) Fire + Holy
00001001
9
Stormstrike Nature + Physical
00001010
10
Holystorm Nature + Holy
00001100
12
Firestorm Nature + Fire
00010001
17
Froststrike Frost + Physical
00010010
18
Holyfrost Frost + Holy
00010100
20
Frostfire Frost + Fire
00011000
24
Froststorm Frost + Nature
00100001
33
Shadowstrike Shadow + Physical
00100010
34
Shadowlight (Twilight) Shadow + Holy
00100100
36
Shadowflame Shadow + Fire
00101000
40
Shadowstorm (Plague) Shadow + Nature
00110000
48
Shadowfrost Shadow + Frost
01000001
65
Spellstrike Arcane + Physical
01000010
66
Divine Arcane + Holy
01000100
68
Spellfire Arcane + Fire
01001000
72
Spellstorm (Astral) Arcane + Nature
01010000
80
Spellfrost Arcane + Frost
01100000
96
Spellshadow Arcane + Shadow
Triple and multi schools
00011100
28
Elemental Frost + Nature + Fire
01111100
124
Chromatic (Chaos) Arcane + Shadow + Frost + Nature + Fire
01111110
126
Magic Arcane + Shadow + Frost + Nature + Fire + Holy
01111111
127
Chaos Arcane + Shadow + Frost + Nature + Fire + Holy + Physical

Power Type

Enum.PowerType
Value Type Description
-2
HealthCost
-1
None
0
Mana
1
Rage
2
Focus
3
Energy
4
ComboPoints
5
Runes
6
RunicPower
7
SoulShards
8
LunarPower
9
HolyPower
10
Alternate
11
Maelstrom
12
Chi
13
Insanity
14
Obsolete
15
Obsolete2
16
ArcaneCharges
17
Fury
18
Pain
19
NumPowerTypes

Miss type

  • "ABSORB"
  • "BLOCK"
  • "DEFLECT"
  • "DODGE"
  • "EVADE"
  • "IMMUNE"
  • "MISS"
  • "PARRY"
  • "REFLECT"
  • "RESIST"

Aura Type

  • "BUFF"
  • "DEBUFF"

Environmental Type

  • "Drowning"
  • "Falling"
  • "Fatigue"
  • "Fire"
  • "Lava"
  • "Slime"

Mists of Pandaria Patch 5.0.4 (2012-08-28): This value is now reporting non-localized proper case strings instead of capitalized strings (e.g. "Falling" instead "FALLING").

Failed Type

See the SPELL_FAILED GlobalStrings for a full list of failed types.

  • "A more powerful spell is already active"
  • "Another action is in progress"
  • "Can't do that while asleep"
  • "Can't do that while charmed"
  • "Can't do that while confused"
  • "Can't do that while fleeing"
  • "Can't do that while horrified"
  • "Can't do that while incapacitated"
  • "Can't do that while moving"
  • "Can't do that while silenced"
  • "Can't do that while stunned"
  • "Interrupted"
  • "Invalid target"
  • "No target"
  • "Not enough energy"
  • "Not enough mana"
  • "Not enough rage"
  • "Out of range"
  • "Target needs to be in front of you."
  • "Target not in line of sight"
  • "Target too close"
  • "You are dead"
  • "You are in combat"
  • "You are in shapeshift form"
  • "You are unable to move"
  • "You can't do that yet"
  • "You must be behind your target."

Examples

  • Prints all CLEU parameters.
local function OnEvent(self, event)
	print(CombatLogGetCurrentEventInfo())
end

local f = CreateFrame("Frame")
f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
f:SetScript("OnEvent", OnEvent)
  • Displays your spell or melee critical hits.
local playerGUID = UnitGUID("player")
local MSG_CRITICAL_HIT = "Your %s critically hit %s for %d damage!"

local f = CreateFrame("Frame")
f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
f:SetScript("OnEvent", function(self, event)
	-- pass a variable number of arguments
	self:OnEvent(event, CombatLogGetCurrentEventInfo())
end)

function f:OnEvent(event, ...)
	local timestamp, subevent, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = ...
	local spellId, spellName, spellSchool
	local amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing, isOffHand

	if subevent == "SWING_DAMAGE" then
		amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing, isOffHand = select(12, ...)
	elseif subevent == "SPELL_DAMAGE" then
		spellId, spellName, spellSchool, amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing, isOffHand = select(12, ...)
	end
	
	if critical and sourceGUID == playerGUID then
		local action = spellId and GetSpellLink(spellId) or "melee swing"
		print(MSG_CRITICAL_HIT:format(action, destName, amount))
	end
end

WoWCombatLog.txt

Combat log messages may be written to the World of Warcraft\_retail_\Logs\WoWCombatLog.txt file for external parsing purposes. This feature can be enabled with LoggingCombat(true) or toggled with the /combatlog slash command.

In version 10 there can be up to 38 parameters:

  • 9 base parameters from CLEU (event, source unit and dest unit)
  • 0-3 prefix params from CLEU (spell/environmental events)
  • 16 advanced parameters which require CVar advancedCombatLogging to be enabled for meaningful values.
  • 10 suffix params from CLEU

Example Data

6/11 17:09:36.127  COMBAT_LOG_VERSION,10,ADVANCED_LOG_ENABLED,0
6/11 17:09:47.745  SPELL_DAMAGE,Player-1598-0611966F,"Ketho-Boulderfist",0x511,0x0,Creature-0-3891-0-1-94-00007FC33E,"Cutpurse",0x10a48,0x0,585,"Smite",0x2,0000000000000000,0000000000000000,0,0,0,0,0,-1,0,0,0,0.00,0.00,37,0.0000,0,88633,88633,88265,2,0,0,0,nil,nil,nil
6/11 17:13:43.859  COMBAT_LOG_VERSION,10,ADVANCED_LOG_ENABLED,1
6/11 17:13:49.052  SPELL_DAMAGE,Player-1598-0611966F,"Ketho-Boulderfist",0x511,0x0,Creature-0-3891-0-1-94-00007FC4D6,"Cutpurse",0x10a48,0x0,585,"Smite",0x2,Creature-0-3891-0-1-94-00007FC4D6,0000000000000000,0,393,0,0,59,1,0,0,0,-9179.14,111.56,37,2.8178,5,88633,88633,88239,2,0,0,0,nil,nil,nil

Advanced parameters

These parameters contain advanced information about involved units and the map location.

1. unitGUID 
GUID
2. ownerGUID
3. currHp
4. maxHp
5. attackPower
6. spellPower
7. armor
8. resourceType 
Enum.PowerType. If there are multiple resource types they are delimited with a pipe char, e.g. "3|4" for Rogue Energy and ComboPoints.
9. currResource
10. maxResource
11. resourceCost
12. coord
13. coord
14. UiMapID 
UiMapID
15. facing 
GetPlayerFacing
16. itemLevel/level

Event Descriptions

Prefixes

Event Prefix Description
SPELL_ Spell is the prefix for most effects even if the spell is a DoT or channeled. IE when the spell begins to be cast, SPELL_CAST_START is fired and not SPELL_PERIODIC_CAST_START. This is the same with _MISS, _FAILED, etc.
SPELL_PERIODIC Only the effects that are periodic start with this PREFIX. IE: Successfully casting a DoT only happens once therefore even though the spell is periodic use the SPELL_ prefix. However, the damage is periodic so it will start with SPELL_PERIODIC_. 90% of the time you will only care about _DAMAGE or _HEAL.
SPELL_BUILDING Wrath of the Lich King damage or healing that can affect destructable buildings.
ENVIRONMENTAL

Suffixes

Event Prefix Description
_DAMAGE Triggered on damage to health. Nothing Special. (overkill returns a number greater than or equal to zero)
_MISSED Triggered When Effect isn't applied but mana/energy is used IE: ABSORB BLOCK DEFLECT DODGE EVADE IMMUNE MISS PARRY REFLECT RESIST
_HEAL Triggered when a unit is healed
_ENERGIZE Any effect that restores power. Spell/trinket/item set bonuses can trigger this event. IE: Vampiric Touch, or Mark of Defiance (Trinket)
_DRAIN Same as _ENERGIZE but this time you are losing power. Caused by enemies.
_LEECH Same as _DRAIN, but the source unit will simultaneously receive the same kind of power (specified in extraAmount)
_INTERRUPT Spellcasting being interrupted by an ability such as Kick or Pummel.
_DISPEL A buff or debuff being actively dispelled by a spell like Remove Curse or Dispel Magic. The source is the caster of the aura that was dispelled, and the destination is the target which was dispelled (needs verifying).
_DISPEL_FAILED A failed attempt to dispel a buff or debuff, most likely due to immunity.
_STOLEN A buff being transferred from the destination unit to the source unit (i.e. mages' Spellsteal).
_EXTRA_ATTACKS Unit gains extra melee attacks due to an ability (like Sword Sepcialization or Windfury). These attacks usually happen in brief succession 100-200ms following this event.
_AURA_APPLIED Triggered When Buffs/Debuffs are Applied. Note: This event doesn't fire if a debuff is applied twice without being removed. IE: casting Vampiric Embrace twice in a row only triggers this event once. This can make it difficult to track whether a debuff was successfully reapplied to the target. However, for instant cast spells, SPELL_CAST_SUCCESS can be used.
_AURA_REMOVED Triggered When Buffs/Debuffs expire. The souce is the caster of the aura which faded, and the destination is the target from which the aura faded (needs verifying).
_AURA_APPLIED_DOSE Triggered by stacking Debuffs if the debuff is already applied to a target. IE: If you cast Mind Flay twice it causes 2 doses of shadow vunerability, the first time it will trigger, SPELL_AURA_APPLIED (arg10 = shadow vulnerability), and SPELL_AURA_APPLIED_DOSE (arg10 = shadow vunerability) the second. The last argument reflects the new number of doses on the unit.
_AURA_REMOVED_DOSE The opposite of _AURA_APPLIED_DOSE, reducing the amount of doses on a buff/debuff on the unit.
_AURA_REFRESH Resets the expiration timer of a buff/debuff on the unit.
_AURA_BROKEN A buff or debuff is being removed by melee damage. The source is the name of the caster of the aura that was broken, and the destination is the target which the aura broke off of (needs verifying).
_AURA_BROKEN_SPELL A buff or debuff is being removed by spell damage (specified in extraSpell...). Source and destination is the same as the above.
_CAST_START Triggered when a spell begins casting. Instant spells don't invoke this event. They trigger _CAST_SUCCESS, _FAILED instead.
_CAST_SUCCESS Triggered when an instant spell is cast or when a spellcast finishes and doesn't fail. This isn't triggered when the spell misses. On a miss SPELL_MISS will be triggered instead.
_CAST_FAILED If the cast fails before it starts (IE invalid target), then _CAST_START never triggers. However it is possible for a cast to fail after beginning. (IE you jump, move, hit escape etc.)
_INSTAKILL Immediately kills the destination unit (usually happens when warlocks sacrifice their minions).
_DURABILITY_DAMAGE
_DURABILITY_DAMAGE_ALL
_CREATE Creates an object (as opposed to an NPC who are 'summoned') like a hunter's trap or a mage's portal.
_SUMMON Summmons an NPC such as a pet or totem.
_DISSIPATES Fires when Gas Clouds are being extracted with Zapthrottle Mote Extractor

Special Events

Event Description
UNIT_DIED destGUID and destName refer to the unit that died.
PARTY_KILL includes both sourceGUID and destGUID, but only reports for you (not in a party) or your other 4 party members (not raid members)

References