Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
m (→‎Spell School: Added Froststorm)
(→‎Spell School: Added Shadowstorm)
Line 159: Line 159:
 
|0x20||32||shadow
 
|0x20||32||shadow
 
|-
 
|-
  +
|0x28||40||shadowstorm
  +
|-class="alt"
 
|0x40||64||arcane
 
|0x40||64||arcane
 
|}
 
|}

Revision as of 18:40, 27 October 2008

COMBAT_LOG_EVENT_UNFILTERED redirects to this page, but most add-on developers will want to use it in preference to COMBAT_LOG_EVENT, because the events provided by the latter will only reflect the user's actual combat log.
Note: COMBAT_LOG_EVENT and COMBAT_LOG_EVENT_UNFILTERED have identical parameters. All information provided here applies to both events.

Base Parameters

1st Param 2nd Param 3rd Param 4th Param 5th Param 6th Param 7th Param 8th Param
timestamp event sourceGUID sourceName sourceFlags destGUID destName destFlags

The timestamp parameter has almost the same format as the return value of the time() function. You can use it as the second parameter to date(). The only difference is that time() returns an integer (the unit is seconds), while the timestamp parameter has three decimal places (milliseconds). That means (timestamp-floor(timestamp))*1000 is the number of milliseconds of the timestamp.

GUIDs are internally unsigned 64-bit integers, and they are supplied to addons and combat logs in the form of a 'C' hexadecimal constant.

According to a post by Slouken on GUID bit-masks indicating unit types:

If you perform a bit-wise AND on the GUID with the mask 0x00F0000000000000:

Result Unit Type
0x0000000000000000 Player
0x0030000000000000 NPC
0x0040000000000000 Pet

From observation:

  • Player GUIDs appear to be truly global, and persist through restarts, etc,
  • NPC GUIDs consist of two numbers combined:
  1. a 'type' integer within the mask 0x000FFFFFFF000000 (all npcs with this type have the same name), and
  2. another number within the mask 0x0000000000FFFFFF identifying the actual unit (this appears to increment with each spawn and reset to 0 after a server restart),
  • Pet GUIDs seem to have some encoding similar to NPC GUIDs, though further investigation is required. The upper bytes appear to be persistent between summoning, but it doesn't appear to have a direct relationship with either the pet type, nor the pet owner, so identification of its owner, or type will need to be through other means. e.g.: All voidwalkers summoned by my warlock (GUID 0x000000000143C64A) will have the same upper bytes (0xF1404E98F4000000), but her succubus will differ (0xF1404F1232000000), and succubi from other warlocks will differ again (0x0000000000A5031D -> 0xF1403A9822000000).

Events

How to get 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 pre- or suffix.

Prefixes

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

Prefix 1st Parameter 2nd Paramater 3rd Parameter
SWING
RANGE spellId spellName spellSchool
SPELL spellId spellName spellSchool
SPELL_PERIODIC spellId spellName spellSchool
SPELL_BUILDING spellId spellName spellSchool
ENVIRONMENTAL environmentalType

Suffixes

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

Suffix 1st Param 2nd Param 3rd Param 4th Param 5th Param 6th Param 7th Param 8th Param 9th Param
_DAMAGE amount overkill school resisted blocked absorbed critical (1 or nil) glancing (1 or nil) crushing (1 or nil)
_MISSED missType amountMissed
_HEAL amount overhealing critical
_ENERGIZE amount powerType
_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
_AURA_REMOVED auraType
_AURA_APPLIED_DOSE auraType amount
_AURA_REMOVED_DOSE auraType amount
_AURA_REFRESH auraType
_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

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 2nd Param 3rd Param
ENCHANT_APPLIED spellName itemID itemName
ENCHANT_REMOVED spellName itemID itemName
PARTY_KILL
UNIT_DIED
UNIT_DESTROYED

Parameter Values

Spell School

spellSchool school Type
0x01 1 physical
0x02 2 holy
0x04 4 fire
0x08 8 nature
0x10 16 frost
0x18 20 frostfire
0x14 24 froststorm
0x20 32 shadow
0x28 40 shadowstorm
0x40 64 arcane

Power Type

powerType Type
-2 health
0 mana
1 rage
2 focus
3 energy
4 pet happiness
5 runes
6 runic power

Miss type

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

Aura Type

  • "BUFF"
  • "DEBUFF"

Environmental Type

  • "DROWNING"
  • "FALLING"
  • "FATIGUE"
  • "FIRE"
  • "LAVA"
  • "SLIME"
  • More possible but currently unconfirmed

Failed Type

  • "A more powerful spell is already active"
  • "Another action is in progress"
  • "Can only use outside"
  • "Can only use while swimming"
  • "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"
  • "Item is not ready yet"
  • "Must be in Bear Form, Dire Bear Form"
  • "Must have a Ranged Weapon equipped"
  • "No path available"
  • "No target"
  • "Not enough energy"
  • "Not enough mana"
  • "Not enough rage"
  • "Not yet recovered"
  • "Nothing to dispel"
  • "Out of range"
  • "Target is friendly"
  • "Target is hostile"
  • "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."
  • "Your target is dead"
  • More possible but currently unconfirmed

Examples

Introduction

I wanted to post some info about what I have learned about using this event. I think the description of how the work arguments is confusing. Hopefully this provides some clarity.

There are always at least 8 arguments. (arg1 through arg8) Depending on the Prefix there will be 0, 1, or 3 more arguments. These will be numbered starting with 9 and going up to 11 if necessary. Depending on the Suffex there will be 0-8 more arguments. These will be numbered starting from the last Prefix argument (IE 9, 10, or 12).

Sample Arguments Example

Example: The following 2 examples show the parameters used for a SPELL_MISS event and a SWING_DAMAGE events

Event Type Arg1 Arg2 Arg3 Arg4 Arg5 Arg6 Arg7 Arg8 Arg9 Arg10 Arg11 Arg12 Arg13 Arg14 Arg15 Arg16 Arg17
SPELL_MISS timestamp event sourceGUID sourceName sourceFlags destGUID destName destFlags spellId spellName spellSchool missType amountMissed
SWING_DAMAGE timestamp event sourceGUID sourceName sourceFlags destGUID destName destFlags amount overkill school resisted blocked absorbed critical glancing crushing

Simple Function Example

Example the following function would display a message whenever a Mind Blast crits.

Foo.xml

<Frame name="Foo_Frame">
  <Scripts>
     <OnLoad>
        Foo_OnLoad();
     </OnLoad>
     <OnEvent>
        Foo_OnEvent(self, event, ...); -- The ... parameter passes all arguments that would otherwise be implicitly sent prior to 3.0.
                                       -- As of 3.0, you will need to explicitly send these arguments (as done here).  
     </OnEvent>
  </Scripts>
</Frame>

Foo.lua

Function Foo_OnLoad()
  this:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
end

Function Foo_OnEvent(self, event, ...)

  local timestamp, type, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...)
  -- Note, for this example, you could just use 'local type = select(2, ...)'.  The others are included so that it's clear what's available.

  if (event=="COMBAT_LOG_EVENT_UNFILTERED")
    if (type=="SPELL_DAMAGE") then

      local spellId, spellName, spellSchool = select(9, ...)
      -- Use the following line in game version 3.0 or higher, for previous versions use the line after
      local amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = select(12, ...)

      if (spellName=="Mind Blast" and critical==true) then -- ==true for clarity only.  Not needed.
        DEFAULT_CHAT_FRAME:AddMessage("Mind Blast Just Critted!");
      end
    end
  end
end


Event Descriptions

Summary Of what I have learned about when events fire and when they don't: (Preliminary)

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 Spell_PERIODIC Only the effects that are periodic start with this PREFIX. IE: Successfully casting a DoT only happens once therefor 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 SPELL_BUILDING New in WotLK, assumed to be damage that can affect destructable buildings.

Suffixes

Event Prefix Description
_DAMAGE Triggered on damage to health. Nothing Special
_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 energy/mana. 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 energy/mana. Caused by enemies.
_LEECH Same as _DRAIN, but the source unit will simultaneously receive the same kind of energy (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.
_DISPEL_FAILED A failed attempt to dispel a buff or debuff, most likely due to immunity.
_AURA_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.
_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
_AURA_BROKEN_SPELL A buff or debuff is being removed by spell damage (specified in extraSpell...)
_CAST_START Triggered when a spell begins casting. Instant Cast and channeled spells don't invoke this event. They trigger _CAST_SUCCESS, _MISS instead.
_CAST_SUCCESS Triggered when channeled spells begin or when instant cast spells are cast. This (obviously) isn't triggered when this spell misses. On a miss SPELL_MISS will be triggered instead. Also, spells that invoke _CAST_START don't trigger this event when they are done casting. Use _SPELL_MISS or _SPELL_DAMAGE or _SPELL_AURA_APPLIED to see when they were cast
_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.