From a506dcf7d20e913ba802aba7ed743c150fb310e3 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Wed, 28 Oct 2026 17:57:44 -0500 Subject: [PATCH] Parse combat events only from the ClassicAPI combat log The combat log detection flags started false and only flipped when the first matching combat log event arrived, so the first buff, hit, heal, DoT or kill of a session was shown twice: once from the CHAT_MSG text, once from the combat log. ClassicAPI is required, so drop the flags and every CHAT_MSG parser they gated, keeping chat parsing only for power losses, item buffs, honor, reputation, skill and XP. Keep every CHAT_MSG event registered for search pattern triggers, which re-registers CHAT_MSG_SPELL_AURA_GONE_SELF so buff fade triggers fire again. Delete the now-dead parsers, ParseForPartialActions and the stray global MikCEL_ParseForOutgoingHits. --- .../MikCombatEventHelper.lua | 2787 +---------------- README.md | 6 +- 2 files changed, 20 insertions(+), 2773 deletions(-) diff --git a/MikScrollingBattleText/MikCombatEventHelper.lua b/MikScrollingBattleText/MikCombatEventHelper.lua index 314f48e..6a54b1c 100644 --- a/MikScrollingBattleText/MikCombatEventHelper.lua +++ b/MikScrollingBattleText/MikCombatEventHelper.lua @@ -10,14 +10,14 @@ local MikCEH = {}; addonTable.MikCEH = MikCEH; -- Upvalue caches for frequently called functions. -local string_find, string_gsub = string.find, string.gsub +local string_find = string.find local string_len, string_sub, string_gfind = string.len, string.sub, string.gfind local table_insert, table_getn, table_wipe = table.insert, table.getn, table.wipe -local GetTime, UnitHealth, UnitHealthMax = GetTime, UnitHealth, UnitHealthMax +local UnitHealth, UnitHealthMax = UnitHealth, UnitHealthMax local UnitMana, UnitManaMax, UnitName = UnitMana, UnitManaMax, UnitName local UnitIsPlayer, UnitIsFriend, UnitExists = UnitIsPlayer, UnitIsFriend, UnitExists local GetNumRaidMembers, GetNumPartyMembers = GetNumRaidMembers, GetNumPartyMembers -local tonumber, type, pcall = tonumber, type, pcall +local tonumber, pcall = tonumber, pcall ------------------------------------------------------------------------------------- -- Public constants. @@ -147,8 +147,6 @@ local globalStringInfoArray = {}; local playerName; local playerClass; --- Cached pet name, updated once per event dispatch. -local cachedPetName; -- Tables to hold ordered/unordered captured data. local orderedCaptureData = {}; @@ -179,18 +177,6 @@ local lastFriendlyHealthPercentage = 0; local recentlySelectedPlayers = {}; local elapsedTime = 0; --- Runtime detection flags for ClassicAPI combat log events. --- These start false and flip true on first invocation of the corresponding handler, --- so CHAT_MSG parsing remains active until the combat log events actually fire. -local combatlogHealsActive = false -local combatlogAutoAttackActive = false -local combatlogEnergizeActive = false -local combatlogSpellDamageActive = false -local combatlogBuffsActive = false -local combatlogPetAutoAttackActive = false -local combatlogPetSpellDamageActive = false -local combatlogEnvActive = false -local combatlogDeathsActive = false -- Cached player GUID for combat log event handlers (set in Init via ClassicAPI's UnitGUID). local playerGUID = nil @@ -267,7 +253,9 @@ end -- Sets up the helper's events. Runs when this file loads. -- ********************************************************************************** function MikCEH.OnLoad() - -- Load up the listen events table with the events the helper is interested in. + -- Load up the listen events table with the events the helper is interested in. Combat events + -- are parsed from the ClassicAPI combat log; the chat messages feed search pattern triggers + -- and the few things the combat log lacks. table_insert(listenEvents, "CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS"); -- Incoming Melee Hits/Crits table_insert(listenEvents, "CHAT_MSG_COMBAT_HOSTILEPLAYER_HITS"); -- Incoming Melee Hits/Crits table_insert(listenEvents, "CHAT_MSG_COMBAT_PARTY_HITS"); -- Incoming Melee Hits/Crits @@ -305,7 +293,6 @@ function MikCEH.OnLoad() table_insert(listenEvents, "CHAT_MSG_SKILL"); -- Skill Gains table_insert(listenEvents, "CHAT_MSG_COMBAT_XP_GAIN"); -- Experience Gains table_insert(listenEvents, "CHAT_MSG_COMBAT_HOSTILE_DEATH"); -- Killing Blows --- table_insert(listenEvents, "CHAT_MSG_SYSTEM"); -- Created Items table_insert(listenEvents, "PLAYER_REGEN_ENABLED"); -- Leave Combat table_insert(listenEvents, "PLAYER_REGEN_DISABLED"); -- Enter Combat @@ -315,7 +302,7 @@ function MikCEH.OnLoad() table_insert(listenEvents, "RAID_ROSTER_UPDATE"); -- Roster cache invalidation. table_insert(listenEvents, "PARTY_MEMBERS_CHANGED"); -- Roster cache invalidation. - -- Set up ClassicAPI combat log events and filter redundant CHAT_MSG events. + -- Set up the ClassicAPI combat log events. MikCEH.SetupCombatLogEvents(); -- Register for the ADDON_LOADED event. @@ -442,158 +429,22 @@ end -- ********************************************************************************** local combatEventDispatch = {} --- Incoming Melee Hits/Crits (CombatLog: SWING_DAMAGE) -local function handleIncomingMeleeHits(msg) - if combatlogAutoAttackActive then return end - MikCEH.ParseForIncomingHits(msg) -end -combatEventDispatch["CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS"] = handleIncomingMeleeHits -combatEventDispatch["CHAT_MSG_COMBAT_HOSTILEPLAYER_HITS"] = handleIncomingMeleeHits -combatEventDispatch["CHAT_MSG_COMBAT_PARTY_HITS"] = handleIncomingMeleeHits - --- Incoming Melee Misses, Dodges, Parries, Blocks, Absorbs, Immunes (CombatLog: SWING_MISSED) -local function handleIncomingMeleeMisses(msg) - if combatlogAutoAttackActive then return end - MikCEH.ParseForIncomingMisses(msg) -end -combatEventDispatch["CHAT_MSG_COMBAT_CREATURE_VS_SELF_MISSES"] = handleIncomingMeleeMisses -combatEventDispatch["CHAT_MSG_COMBAT_HOSTILEPLAYER_MISSES"] = handleIncomingMeleeMisses -combatEventDispatch["CHAT_MSG_COMBAT_PARTY_MISSES"] = handleIncomingMeleeMisses - --- Incoming Spell/Ability Damage + Power Losses (CombatLog: SPELL_DAMAGE) -local function handleIncomingSpellDamage(msg) - if not combatlogSpellDamageActive then - MikCEH.ParseForIncomingSpellHitsAndMisses(msg) - end +-- Power losses have no combat log equivalent MSBT handles; combat events are parsed from the combat log. +local function handlePowerLosses(msg) MikCEH.ParseForPowerLosses(msg) end -combatEventDispatch["CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE"] = handleIncomingSpellDamage -combatEventDispatch["CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE"] = handleIncomingSpellDamage -combatEventDispatch["CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE"] = handleIncomingSpellDamage -combatEventDispatch["CHAT_MSG_SPELL_PARTY_DAMAGE"] = handleIncomingSpellDamage - --- Incoming damage from shields (CombatLog: DAMAGE_SHIELD) -combatEventDispatch["CHAT_MSG_SPELL_DAMAGESHIELDS_ON_OTHERS"] = function(msg) - if combatlogSpellDamageActive then return end - MikCEH.ParseForIncomingDamageShieldDamage(msg) -end - --- Incoming Heals (CombatLog: SPELL_HEAL) -local function handleIncomingSpellHeals(msg) - if combatlogHealsActive then return end - MikCEH.ParseForIncomingSpellHeals(msg) -end -combatEventDispatch["CHAT_MSG_SPELL_HOSTILEPLAYER_BUFF"] = handleIncomingSpellHeals -combatEventDispatch["CHAT_MSG_SPELL_CREATURE_VS_SELF_BUFF"] = handleIncomingSpellHeals - --- Incoming Debuffs, DoTs, Power Gains -combatEventDispatch["CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE"] = function(msg) - if not combatlogBuffsActive and not combatlogSpellDamageActive then - MikCEH.ParseForIncomingDebuffs(msg) - end - if not combatlogEnergizeActive then - MikCEH.ParseForPowerGains(msg) - end -end - --- Incoming Buffs, HoTs, Power Gains -combatEventDispatch["CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS"] = function(msg) - if not combatlogHealsActive then - if not MikCEH.ParseForIncomingSpellHeals(msg) then - if not combatlogBuffsActive and not combatlogSpellDamageActive then - MikCEH.ParseForIncomingBuffs(msg) - end - MikCEH.ParseForOutgoingHoTs(msg) - end - end -end - --- Outgoing Melee Hits/Crits, Environmental Damage (CombatLog: SWING_DAMAGE, ENVIRONMENTAL_DAMAGE) -combatEventDispatch["CHAT_MSG_COMBAT_SELF_HITS"] = function(msg) - if not combatlogEnvActive then - if MikCEH.ParseForEnvironmentalDamage(msg) then return end - end - if not combatlogAutoAttackActive then - MikCEH.ParseForOutgoingHits(msg) - end -end - --- Outgoing Melee Misses (CombatLog: SWING_MISSED) -combatEventDispatch["CHAT_MSG_COMBAT_SELF_MISSES"] = function(msg) - if combatlogAutoAttackActive then return end - MikCEH.ParseForOutgoingMisses(msg) -end - --- Outgoing Spell/Ability Damage (CombatLog: SPELL_DAMAGE) -combatEventDispatch["CHAT_MSG_SPELL_SELF_DAMAGE"] = function(msg) - if combatlogSpellDamageActive then return end - MikCEH.ParseForOutgoingSpellHitsAndMisses(msg) -end - --- Outgoing damage from shields (CombatLog: DAMAGE_SHIELD) -combatEventDispatch["CHAT_MSG_SPELL_DAMAGESHIELDS_ON_SELF"] = function(msg) - if combatlogSpellDamageActive then return end - MikCEH.ParseForOutgoingDamageShieldDamage(msg) -end - --- Outgoing Heals, Power Gains, Dispel/Purge Resists (CombatLog: SPELL_HEAL, SPELL_ENERGIZE) -combatEventDispatch["CHAT_MSG_SPELL_SELF_BUFF"] = function(msg) - if not combatlogEnergizeActive then - if MikCEH.ParseForPowerGains(msg) then return end - end - if not combatlogHealsActive then - MikCEH.ParseForOutgoingSpellHeals(msg) - MikCEH.ParseForOutgoingDispelResists(msg) - end -end - --- Outgoing HoTs (CombatLog: SPELL_HEAL) -local function handleOutgoingHoTs(msg) - if combatlogHealsActive then return end - MikCEH.ParseForOutgoingHoTs(msg) -end -combatEventDispatch["CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_BUFFS"] = handleOutgoingHoTs -combatEventDispatch["CHAT_MSG_SPELL_PERIODIC_PARTY_BUFFS"] = handleOutgoingHoTs -combatEventDispatch["CHAT_MSG_SPELL_PERIODIC_CREATURE_BUFFS"] = handleOutgoingHoTs - --- Outgoing DoTs, Power Losses (CombatLog: SPELL_PERIODIC_DAMAGE) -local function handleOutgoingDoTs(msg) - if not combatlogSpellDamageActive then - MikCEH.ParseForOutgoingDoTs(msg) - end - MikCEH.ParseForPowerLosses(msg) -end -combatEventDispatch["CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE"] = handleOutgoingDoTs -combatEventDispatch["CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE"] = handleOutgoingDoTs - --- Outgoing Pet Hits/Crits (CombatLog: SWING_DAMAGE with pet GUID) -combatEventDispatch["CHAT_MSG_COMBAT_PET_HITS"] = function(msg) - if combatlogPetAutoAttackActive then return end - MikCEH.ParseForOutgoingPetHits(msg) -end - --- Outgoing Pet Melee Misses (CombatLog: SWING_MISSED with pet GUID) -combatEventDispatch["CHAT_MSG_COMBAT_PET_MISSES"] = function(msg) - if combatlogPetAutoAttackActive then return end - MikCEH.ParseForOutgoingPetMisses(msg) -end - --- Outgoing Pet Spell/Ability Damage (CombatLog: SPELL_DAMAGE with pet GUID) -combatEventDispatch["CHAT_MSG_SPELL_PET_DAMAGE"] = function(msg) - if combatlogPetSpellDamageActive then return end - MikCEH.ParseForOutgoingPetSpellHitsAndMisses(msg) -end +combatEventDispatch["CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE"] = handlePowerLosses +combatEventDispatch["CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE"] = handlePowerLosses +combatEventDispatch["CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE"] = handlePowerLosses +combatEventDispatch["CHAT_MSG_SPELL_PARTY_DAMAGE"] = handlePowerLosses +combatEventDispatch["CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE"] = handlePowerLosses +combatEventDispatch["CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE"] = handlePowerLosses -- Item Buffs combatEventDispatch["CHAT_MSG_SPELL_ITEM_ENCHANTMENTS"] = function(msg) MikCEH.ParseForIncomingItemBuffs(msg) end --- Buff Fades -combatEventDispatch["CHAT_MSG_SPELL_AURA_GONE_SELF"] = function(msg) - MikCEH.ParseForBuffFades(msg) -end - -- Honor Gains combatEventDispatch["CHAT_MSG_COMBAT_HONOR_GAIN"] = function(msg) MikCEH.ParseForHonorGains(msg) @@ -614,19 +465,11 @@ combatEventDispatch["CHAT_MSG_COMBAT_XP_GAIN"] = function(msg) MikCEH.ParseForExperienceGains(msg) end --- Killing Blows -combatEventDispatch["CHAT_MSG_COMBAT_HOSTILE_DEATH"] = function(msg) - if not combatlogDeathsActive then - MikCEH.ParseForKillingBlows(msg) - end -end - -- ********************************************************************************** -- This function parses the chat message combat events using the dispatch table. -- ********************************************************************************** function MikCEH.ParseCombatEvents(event, combatMessage) - cachedPetName = UnitName("pet"); local handler = combatEventDispatch[event] if handler then handler(combatMessage) end end @@ -781,11 +624,9 @@ local function handleSpellDamage(isPeriodic) directionType = MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING displayName = destName end - combatlogSpellDamageActive = true elseif IsPetGUID(sourceGUID) then directionType = MikCEH.DIRECTIONTYPE_PET_OUTGOING displayName = destName - combatlogPetSpellDamageActive = true elseif IsPlayerGUID(destGUID) or IsPetGUID(destGUID) then if IsPlayerGUID(destGUID) then directionType = MikCEH.DIRECTIONTYPE_PLAYER_INCOMING @@ -793,7 +634,6 @@ local function handleSpellDamage(isPeriodic) directionType = MikCEH.DIRECTIONTYPE_PET_INCOMING end displayName = sourceName - combatlogSpellDamageActive = true else return -- Not involving the player or pet, ignore. end @@ -835,15 +675,12 @@ local function handleSwingDamage() if IsPlayerGUID(sourceGUID) then directionType = MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING displayName = arg9 - combatlogAutoAttackActive = true elseif IsPetGUID(sourceGUID) then directionType = MikCEH.DIRECTIONTYPE_PET_OUTGOING displayName = arg9 - combatlogPetAutoAttackActive = true elseif IsPlayerGUID(destGUID) then directionType = MikCEH.DIRECTIONTYPE_PLAYER_INCOMING displayName = arg5 - combatlogAutoAttackActive = true elseif IsPetGUID(destGUID) then directionType = MikCEH.DIRECTIONTYPE_PET_INCOMING displayName = arg5 @@ -882,15 +719,12 @@ combatLogHandlers["SWING_MISSED"] = function() if IsPlayerGUID(sourceGUID) then directionType = MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING displayName = arg9 - combatlogAutoAttackActive = true elseif IsPetGUID(sourceGUID) then directionType = MikCEH.DIRECTIONTYPE_PET_OUTGOING displayName = arg9 - combatlogPetAutoAttackActive = true elseif IsPlayerGUID(destGUID) then directionType = MikCEH.DIRECTIONTYPE_PLAYER_INCOMING displayName = arg5 - combatlogAutoAttackActive = true elseif IsPetGUID(destGUID) then directionType = MikCEH.DIRECTIONTYPE_PET_INCOMING displayName = arg5 @@ -923,19 +757,15 @@ local function handleSpellMiss() directionType = MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING displayName = arg9 end - combatlogSpellDamageActive = true elseif IsPetGUID(sourceGUID) then directionType = MikCEH.DIRECTIONTYPE_PET_OUTGOING displayName = arg9 - combatlogPetSpellDamageActive = true elseif IsPlayerGUID(destGUID) then directionType = MikCEH.DIRECTIONTYPE_PLAYER_INCOMING displayName = arg5 - combatlogSpellDamageActive = true elseif IsPetGUID(destGUID) then directionType = MikCEH.DIRECTIONTYPE_PET_INCOMING displayName = arg5 - combatlogSpellDamageActive = true else return -- Not involving the player or pet, ignore. end @@ -977,7 +807,6 @@ local function handleHeal(isPeriodic) -- Heals landing on the player. Skip anything else here; outgoing heals -- are handled below so self-heals are not shown twice. if IsPlayerGUID(destGUID) then - combatlogHealsActive = true local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, healType, amount, spellName, sourceName) if spellId and spellId ~= 0 then eventData.SpellId = spellId end @@ -991,7 +820,6 @@ local function handleHeal(isPeriodic) -- Heals cast by the player on others. if IsPlayerGUID(sourceGUID) then - combatlogHealsActive = true local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, healType, amount, spellName, destName) if spellId and spellId ~= 0 then eventData.SpellId = spellId end @@ -1016,8 +844,6 @@ local function handleEnergize() local powerTypeStr = combatLogPowerTypeToString[arg16] if not powerTypeStr then return end - combatlogEnergizeActive = true - local eventData = MikCEH.GetNotificationEventData(MikCEH.NOTIFICATIONTYPE_POWER_GAIN, arg15, powerTypeStr, arg13) if arg12 and arg12 ~= 0 then eventData.SpellId = arg12 end @@ -1035,8 +861,6 @@ combatLogHandlers["SPELL_AURA_APPLIED"] = function() -- Only auras on the player are shown. if not IsPlayerGUID(arg8) then return end - combatlogBuffsActive = true - local spellName = arg13 if not spellName then return end @@ -1080,8 +904,6 @@ combatLogHandlers["ENVIRONMENTAL_DAMAGE"] = function() local actionType = combatLogEnvToAction[arg12] if not actionType then return end - combatlogEnvActive = true - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, actionType, nil, MikCEH.DAMAGETYPE_PHYSICAL, arg13, nil, nil) MikCEH.SendEvent(eventData) end @@ -1097,8 +919,6 @@ combatLogHandlers["PARTY_KILL"] = function() local victimName = arg9 if not victimName then return end - combatlogDeathsActive = true - -- Hold the notification type. local notificationType = MikCEH.NOTIFICATIONTYPE_NPC_KILLING_BLOW; @@ -1122,43 +942,10 @@ end ------------------------------------------------------------------------------------- -- ********************************************************************************** --- Sets up the ClassicAPI combat log listener and removes redundant CHAT_MSG events. --- Called from OnLoad. ClassicAPI is a hard dependency (see the .toc), so the --- combat log is always available; the runtime detection flags above still keep --- CHAT_MSG parsing active until each combat log event actually fires. +-- Sets up the ClassicAPI combat log listener. Called from OnLoad. ClassicAPI is a hard +-- dependency (see the .toc), so the combat log is the only source for combat events. -- ********************************************************************************** function MikCEH.SetupCombatLogEvents() - -- Only CHAT_MSG_SPELL_AURA_GONE_SELF is fully covered (by SPELL_AURA_REMOVED). - local combatLogCoveredEvents = { - ["CHAT_MSG_SPELL_AURA_GONE_SELF"] = true, - } - - -- Events to keep despite the combat log — these have partial or no combat log equivalent. - -- CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE: Keep for power gains from sources 1.12 never puts in a packet - -- CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS: Keep for power gains (buff parsing gated by combatlogBuffsActive) - -- CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE: Keep for power losses (ParseForPowerLosses) - -- CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE: Keep for power losses - -- CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE: Keep for power losses - -- CHAT_MSG_SPELL_PARTY_DAMAGE: Keep for power losses - -- CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE: Keep for power losses - -- CHAT_MSG_SPELL_SELF_BUFF: Keep for dispel/purge resists (ParseForOutgoingDispelResists) - -- CHAT_MSG_SPELL_ITEM_ENCHANTMENTS, CHAT_MSG_COMBAT_HONOR_GAIN, etc.: No combat log equivalent - - -- Filter out covered events from listenEvents. - local filteredEvents = {} - for _, eventName in listenEvents do - if not combatLogCoveredEvents[eventName] then - table_insert(filteredEvents, eventName) - end - end - - -- Replace listenEvents with filtered list. - -- Clear and repopulate to maintain the same table reference. - table_wipe(listenEvents) - for _, eventName in filteredEvents do - table_insert(listenEvents, eventName) - end - -- Create the combat log event frame and register for the unfiltered log. -- MSBT does its own player/pet filtering, so the filtered variant buys nothing. combatLogEventFrame = CreateFrame("Frame") @@ -1172,1116 +959,6 @@ end ------------------------------------------------------------------------------------- --- ********************************************************************************** --- Parses the passed combat message for an incoming hit message. --- ********************************************************************************** -function MikCEH.ParseForIncomingHits(combatMessage) - -- Look for a normal hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITOTHERSELF", {"%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITCRITOTHERSELF", {"%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a normal hit from an elemental. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITSCHOOLOTHERSELF", {"%n", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, capturedData.DamageType, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a crit from an elemental. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITCRITSCHOOLOTHERSELF", {"%n", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, capturedData.DamageType, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a normal hit on your pet - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITOTHEROTHER", {"%n", "%s", "%a"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a crit on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITCRITOTHEROTHER", {"%n", "%s", "%a"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses the passed combat message for an incoming miss message. --- ********************************************************************************** -function MikCEH.ParseForIncomingMisses(combatMessage) - -- Look for a normal miss. - local capturedData = MikCEH.GetCapturedData(combatMessage, "MISSEDOTHERSELF", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_MISS, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a dodge. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSDODGEOTHERSELF", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_DODGE, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a parry. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSPARRYOTHERSELF", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_PARRY, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a block. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSBLOCKOTHERSELF", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_BLOCK, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for an absorb. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSABSORBOTHERSELF", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for an immune. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSIMMUNEOTHERSELF", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_IMMUNE, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a normal Pet miss. - local capturedData = MikCEH.GetCapturedData(combatMessage, "MISSEDOTHEROTHER", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_MISS, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a Pet dodge. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSDODGEOTHEROTHER", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_DODGE, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a Pet parry. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSPARRYOTHEROTHER", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_PARRY, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a Pet block. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSBLOCKOTHEROTHER", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_BLOCK, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for an Pet absorb. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSABSORBOTHEROTHER", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for an Pet immune. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSIMMUNEOTHEROTHER", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_IMMUNE, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses the passed combat message for an incoming spell hit/miss message. --- ********************************************************************************** -function MikCEH.ParseForIncomingSpellHitsAndMisses(combatMessage) - -- Look for an ability hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGOTHERSELF", {"%n", "%s", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an ability crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGCRITOTHERSELF", {"%n", "%s", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a spell hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGSCHOOLOTHERSELF", {"%n", "%s", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a spell crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGCRITSCHOOLOTHERSELF", {"%n", "%s", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a miss. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLMISSOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_MISS, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a dodge. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLDODGEDOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_DODGE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a parry. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLPARRIEDOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_PARRY, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a block. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLBLOCKEDOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_BLOCK, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a resist. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLRESISTOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_RESIST, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an absorb. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGABSORBOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an immune. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLIMMUNEOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_IMMUNE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a reflect. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLREFLECTOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_REFLECT, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for an ability hit on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGOTHEROTHER", {"%n", "%s", "%c", "%a"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an ability crit on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGCRITOTHEROTHER", {"%n", "%s", "%a"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a spell hit on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGSCHOOLOTHEROTHER", {"%n", "%s", "%c", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a spell crit on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGCRITSCHOOLOTHEROTHER", {"%n", "%s", "%c", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a miss on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLMISSOTHEROTHER", {"%n", "%s", "%c"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_MISS, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a dodge on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLDODGEDOTHEROTHER", {"%c", "%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_DODGE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a parry on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLPARRIEDOTHEROTHER", {"%c", "%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_PARRY, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a block on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLBLOCKEDOTHEROTHER", {"%c", "%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_BLOCK, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a resist on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLRESISTOTHEROTHER", {"%n", "%s", "%c"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_RESIST, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an absorb on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGABSORBOTHEROTHER", {"%n", "%s", "%c"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an immune on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLIMMUNEOTHEROTHER", {"%n", "%s", "%c"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.ACTIONTYPE_IMMUNE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parse the passed combat message for incoming damage shield damage. --- ********************************************************************************** -function MikCEH.ParseForIncomingDamageShieldDamage(combatMessage) - local capturedData = MikCEH.GetCapturedData(combatMessage, "DAMAGESHIELDOTHERSELF", {"%n", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, capturedData.DamageType, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a resist. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLRESISTOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_RESIST, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a miss. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLMISSOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_MISS, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a dodge. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLDODGEDOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_DODGE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a parry. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLPARRIEDOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_PARRY, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a block. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLBLOCKEDOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_BLOCK, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an absorb. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGABSORBOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an immune. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLIMMUNEOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_IMMUNE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a reflect. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLREFLECTOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_REFLECT, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses the passed combat message for incoming heal info. --- ********************************************************************************** -function MikCEH.ParseForIncomingSpellHeals(combatMessage) - -- Look for a critical heal from another player / creature. - local capturedData = MikCEH.GetCapturedData(combatMessage, "HEALEDCRITOTHERSELF", {"%n", "%s", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.HEALTYPE_CRIT, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Get overheal info. - eventData.Name = playerName - MikCEH.PopulateOverhealData(eventData); --athenne add - eventData.Name = capturedData.Name - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a heal from another player / creature. - local capturedData = MikCEH.GetCapturedData(combatMessage, "HEALEDOTHERSELF", {"%n", "%s", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.HEALTYPE_NORMAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Get overheal info. - eventData.Name = playerName - MikCEH.PopulateOverhealData(eventData); --athenne add - eventData.Name = capturedData.Name - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a HoT from someone else. - local capturedData = MikCEH.GetCapturedData(combatMessage, "PERIODICAURAHEALOTHERSELF", {"%a", "%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.HEALTYPE_OVER_TIME, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Get overheal info. - eventData.Name = playerName - if GetLocale() ~= "zhCN" then -- edge case for chinese client (unable to show overheal amount for hot casted on self by other) - MikCEH.PopulateOverhealData(eventData); -- athenne add - end - eventData.Name = capturedData.Name - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a HoT from yourself. - local capturedData = MikCEH.GetCapturedData(combatMessage, "PERIODICAURAHEALSELFSELF", {"%a", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.HEALTYPE_OVER_TIME, capturedData.Amount, capturedData.SpellName, playerName); - - -- Get overheal info. - MikCEH.PopulateOverhealData(eventData); --athenne add - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a critical heal from another player / creature on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "HEALEDCRITOTHEROTHER", {"%n", "%s", "%c", "%a"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.HEALTYPE_CRIT, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Get overheal info. - eventData.Name = cachedPetName - MikCEH.PopulateOverhealData(eventData); -- athenne add - eventData.Name = capturedData.Name - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a heal from another player / creature on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "HEALEDOTHEROTHER", {"%n", "%s", "%c", "%a"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.HEALTYPE_NORMAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Get overheal info. - eventData.Name = cachedPetName - MikCEH.PopulateOverhealData(eventData); -- athenne add - eventData.Name = capturedData.Name - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a HoT from someone else on your pet. - local capturedData = MikCEH.GetCapturedData(combatMessage, "PERIODICAURAHEALOTHEROTHER", {"%c", "%a", "%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil and cachedPetName and string_find(combatMessage, cachedPetName)) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PET_INCOMING, MikCEH.HEALTYPE_OVER_TIME, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Get overheal info. - eventData.Name = cachedPetName - if GetLocale() ~= "zhCN" then -- edge case for chinese client (unable to show overheal amount for hot casted on your pet by other) - MikCEH.PopulateOverhealData(eventData); -- athenne add - end - eventData.Name = capturedData.Name - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses the passed combat message for incoming debuff info. --- ********************************************************************************** -function MikCEH.ParseForIncomingDebuffs(combatMessage) - -- Look for a debuff. - local capturedData = MikCEH.GetCapturedData(combatMessage, "AURAADDEDSELFHARMFUL", {"%b"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetNotificationEventData(MikCEH.NOTIFICATIONTYPE_DEBUFF, capturedData.Amount, capturedData.BuffName); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for damage from a debuff. - if (GetLocale() == "frFR") then - capturedData = MikCEH.GetCapturedData(combatMessage, "PERIODICAURADAMAGEOTHERSELF", {"%t", "%a", "%s", "%n"}); - else - capturedData = MikCEH.GetCapturedData(combatMessage, "PERIODICAURADAMAGEOTHERSELF", {"%a", "%t", "%n", "%s"}); -end - - -- If a match was found. - if (capturedData ~= nil) then - - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_OVER_TIME, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - - -- Look for damage from a self debuff. - local capturedData = MikCEH.GetCapturedData(combatMessage, "PERIODICAURADAMAGESELFSELF", {"%a", "%t", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_OVER_TIME, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, nil); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for absorbed damage from a self debuff. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGABSORBSELFSELF", {"%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, capturedData.SpellName, nil); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for absorbed damage from a debuff. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGABSORBOTHERSELF", {"%n", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses for power gains. --- ********************************************************************************** -function MikCEH.ParseForPowerGains(combatMessage) - local capturedData = nil - - -- Look for power gains from others. - local capturedData = MikCEH.GetCapturedData(combatMessage, "POWERGAINOTHERSELF", {"%p", "%a", "%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - -- Make sure it's mana, rage, or energy. - if (capturedData.PowerType == MANA or capturedData.PowerType == RAGE or capturedData.PowerType == ENERGY) then - local eventData = MikCEH.GetNotificationEventData(MikCEH.NOTIFICATIONTYPE_POWER_GAIN, capturedData.Amount, capturedData.PowerType, capturedData.SpellName); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - end - - -- Look for self power gains. -if (GetLocale() == "frFR") then - capturedData = MikCEH.GetCapturedData(combatMessage, "POWERGAINSELFSELF", {"%p", "%s", "%a"}); -else - capturedData = MikCEH.GetCapturedData(combatMessage, "POWERGAINSELFSELF", {"%a", "%p", "%s"}); -end - - -- If a match was found. - if (capturedData ~= nil) then - -- Make sure it's mana, rage, or energy. - if (capturedData.PowerType == MANA or capturedData.PowerType == RAGE or capturedData.PowerType == ENERGY) then - local eventData = MikCEH.GetNotificationEventData(MikCEH.NOTIFICATIONTYPE_POWER_GAIN, capturedData.Amount, capturedData.PowerType, capturedData.SpellName); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - end - - -- Look for power gains from draining others. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLPOWERLEECHSELFOTHER", {"%s", "%a", "%p", "%n", "", "", ""}); - - -- If a match was found. - if (capturedData ~= nil) then - -- Make sure it's mana, rage, or energy. - if (capturedData.PowerType == MANA or capturedData.PowerType == RAGE or capturedData.PowerType == ENERGY) then - local eventData = MikCEH.GetNotificationEventData(MikCEH.NOTIFICATIONTYPE_POWER_GAIN, capturedData.Amount, capturedData.PowerType, capturedData.SpellName); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - end - - -- Return the parse was NOT successful. - return false; -end - - -- ********************************************************************************** -- Parses for power losses. -- ********************************************************************************** @@ -2320,1293 +997,6 @@ function MikCEH.ParseForPowerLosses(combatMessage) end --- ********************************************************************************** --- Parses the passed combat message for incoming buff and power gain info. --- ********************************************************************************** -function MikCEH.ParseForIncomingBuffs(combatMessage) - -- Parse for power gains. - if (MikCEH.ParseForPowerGains(combatMessage)) then - -- Return the parse was successful. - return true; - end - - -- Look for a buff. - local capturedData = MikCEH.GetCapturedData(combatMessage, "AURAADDEDSELFHELPFUL", {"%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetNotificationEventData(MikCEH.NOTIFICATIONTYPE_BUFF, nil, capturedData.SpellName); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a self mana drain. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLPOWERDRAINSELFSELF", {"%s", "%a", "%p"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetNotificationEventData(MikCEH.NOTIFICATIONTYPE_POWER_LOSS, capturedData.Amount, capturedData.PowerType, capturedData.SpellName); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses the passed combat message for environmental damage. --- ********************************************************************************** -function MikCEH.ParseForEnvironmentalDamage(combatMessage) - -- Look for drowning damage. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSENVIRONMENTALDAMAGE_DROWNING_SELF", {"%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_DROWNING, nil, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, nil); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for falling damage. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSENVIRONMENTALDAMAGE_FALLING_SELF", {"%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_FALLING, nil, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, nil); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for fatigue damage. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSENVIRONMENTALDAMAGE_FATIGUE_SELF", {"%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_FATIGUE, nil, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, nil); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for fire damage. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSENVIRONMENTALDAMAGE_FIRE_SELF", {"%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_FIRE, nil, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, nil); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for lava damage. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSENVIRONMENTALDAMAGE_LAVA_SELF", {"%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_LAVA, nil, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, nil); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for slime damage. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSENVIRONMENTALDAMAGE_SLIME_SELF", {"%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_SLIME, nil, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, nil); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses the passed combat message for outgoing hits. --- ********************************************************************************** -function MikCEH.ParseForOutgoingHits(combatMessage) - -- Look for a normal hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITSELFOTHER", {"%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITCRITSELFOTHER", {"%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses the passed combat message for outgoing hits. --- ********************************************************************************** -function MikCEL_ParseForOutgoingHits(combatMessage) - -- Look for a normal hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITSELFOTHER", {"%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITCRITSELFOTHER", {"%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parse the passed combat message for an outgoing miss message. --- ********************************************************************************** -function MikCEH.ParseForOutgoingMisses(combatMessage) - -- Look for a normal miss. - local capturedData = MikCEH.GetCapturedData(combatMessage, "MISSEDSELFOTHER", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_MISS, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a dodge. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSDODGESELFOTHER", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_DODGE, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a parry. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSPARRYSELFOTHER", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_PARRY, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a block. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSBLOCKSELFOTHER", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_BLOCK, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an absorb. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSABSORBSELFOTHER", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an immune. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSIMMUNESELFOTHER", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_IMMUNE, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an evade. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSEVADESELFOTHER", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_EVADE, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parse the passed combat message for outgoing spell/ability hits and misses. --- ********************************************************************************** -function MikCEH.ParseForOutgoingSpellHitsAndMisses(combatMessage) - -- Look for an ability crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGCRITSELFOTHER", {"%s", "%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an ability hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGSELFOTHER", {"%s", "%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a spell crit to yourself. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGCRITSCHOOLSELFSELF", {"%s", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, playerName); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a spell hit to yourself. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGSCHOOLSELFSELF", {"%s", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, playerName); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for spell crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGCRITSCHOOLSELFOTHER", {"%s", "%n", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a spell hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGSCHOOLSELFOTHER", {"%s", "%n", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a miss. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLMISSSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_MISS, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a dodge. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLDODGEDSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_DODGE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a parry. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLPARRIEDSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_PARRY, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a block. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLBLOCKEDSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_BLOCK, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a resist. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLRESISTSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_RESIST, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an absorb. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGABSORBSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an immune. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLIMMUNESELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_IMMUNE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a reflect. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLREFLECTSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_REFLECT, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an evade - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLEVADEDSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_EVADE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parse the passed combat message for outgoing damage shield damage. --- ********************************************************************************** -function MikCEH.ParseForOutgoingDamageShieldDamage(combatMessage) - local capturedData = MikCEH.GetCapturedData(combatMessage, "DAMAGESHIELDSELFOTHER", {"%a", "%t", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData - if capturedData.DamageType == 2 and capturedData.Amount == "20" then - eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, capturedData.DamageType, capturedData.Amount, "Aura de vindicte", capturedData.Name); - else - eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, capturedData.DamageType, capturedData.Amount, nil, capturedData.Name); - end - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a resist. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLRESISTSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_RESIST, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for an immune. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLIMMUNESELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_IMMUNE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for an evade - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLEVADEDSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_EVADE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a miss. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLMISSSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_MISS, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a dodge. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLDODGEDSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_DODGE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a parry. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLPARRIEDSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_PARRY, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a block. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLBLOCKEDSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_BLOCK, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parse the passed combat message for outgoing heal info. --- ********************************************************************************** -function MikCEH.ParseForOutgoingSpellHeals(combatMessage) - -- Look for a critical heal to yourself. - local capturedData = MikCEH.GetCapturedData(combatMessage, "HEALEDCRITSELFSELF", {"%s", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.HEALTYPE_CRIT, capturedData.Amount, capturedData.SpellName, playerName); - - -- Get overheal info. - MikCEH.PopulateOverhealData(eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a heal to yourself. - local capturedData = MikCEH.GetCapturedData(combatMessage, "HEALEDSELFSELF", {"%s", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_INCOMING, MikCEH.HEALTYPE_NORMAL, capturedData.Amount, capturedData.SpellName, playerName); - - -- Get overheal info. - MikCEH.PopulateOverhealData(eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a critical heal to someone else. - local capturedData = MikCEH.GetCapturedData(combatMessage, "HEALEDCRITSELFOTHER", {"%s", "%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.HEALTYPE_CRIT, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Get overheal info. - MikCEH.PopulateOverhealData(eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a heal to someone else. - local capturedData = MikCEH.GetCapturedData(combatMessage, "HEALEDSELFOTHER", {"%s", "%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.HEALTYPE_NORMAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Get overheal info. - MikCEH.PopulateOverhealData(eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses the passed combat message for outgoing dispel/purge resists. --- ********************************************************************************** -function MikCEH.ParseForOutgoingDispelResists(combatMessage) - -- Look for a resist. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLRESISTSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_RESIST, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses the passed combat message for outgoing Heals over time. --- ********************************************************************************** -function MikCEH.ParseForOutgoingHoTs(combatMessage) - -- Look for a HoT to someone else. - - local capturedData = MikCEH.GetCapturedData(combatMessage, "PERIODICAURAHEALSELFOTHER", {"%n", "%a", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetHealEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.HEALTYPE_OVER_TIME, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Get overheal info. - MikCEH.PopulateOverhealData(eventData); --athenne add - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parses the passed combat message for outgoing DoTs. --- ********************************************************************************** -function MikCEH.ParseForOutgoingDoTs(combatMessage) - -- Look for damage from a DoT. - local capturedData = MikCEH.GetCapturedData(combatMessage, "PERIODICAURADAMAGESELFOTHER", {"%n", "%a", "%t", "%s"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_OVER_TIME, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for absorbed damage from a DoT. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGABSORBSELFOTHER", {"%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PLAYER_OUTGOING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parse the passed combat message for outgoing pet hits. --- ********************************************************************************** -function MikCEH.ParseForOutgoingPetHits(combatMessage) - -- Look for a normal pet hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITOTHEROTHER", {"%c", "%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a pet crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITCRITOTHEROTHER", {"%c", "%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a pet elemental hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITSCHOOLOTHEROTHER", {"%c", "%n", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, capturedData.DamageType, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - -- Look for a pet elemental crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "COMBATHITCRITSCHOOLOTHEROTHER", {"%c", "%n", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, capturedData.DamageType, capturedData.Amount, nil, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parse the passed combat message for outgoing pet misses. --- ********************************************************************************** -function MikCEH.ParseForOutgoingPetMisses(combatMessage) - -- Look for a normal miss. - local capturedData = MikCEH.GetCapturedData(combatMessage, "MISSEDOTHEROTHER", {"%c", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_MISS, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a dodge. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSDODGEOTHEROTHER", {"%c", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_DODGE, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a parry. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSPARRYOTHEROTHER", {"%c", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_PARRY, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a block. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSBLOCKOTHEROTHER", {"%c", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_BLOCK, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an absorb. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSABSORBOTHEROTHER", {"%c", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an immune. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSIMMUNEOTHEROTHER", {"%c", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_IMMUNE, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an evade. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VSEVADEOTHEROTHER", {"%c", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_EVADE, nil, nil, nil, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parse the passed combat message for outgoing pet spell hits and misses. --- ********************************************************************************** -function MikCEH.ParseForOutgoingPetSpellHitsAndMisses(combatMessage) - -- Look for an ability hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGOTHEROTHER", {"%c", "%s", "%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an ability crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGCRITOTHEROTHER", {"%c", "%s", "%n", "%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, MikCEH.DAMAGETYPE_PHYSICAL, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a spell hit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGSCHOOLOTHEROTHER", {"%c", "%s", "%n", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_NORMAL, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for spell crit. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGCRITSCHOOLOTHEROTHER", {"%c", "%s", "%n", "%a", "%t"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_HIT, MikCEH.HITTYPE_CRIT, capturedData.DamageType, capturedData.Amount, capturedData.SpellName, capturedData.Name); - - -- Look for any partial actions and populate them into the event data. - MikCEH.ParseForPartialActions(combatMessage, eventData); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a miss. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLMISSOTHEROTHER", {"%c", "%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_MISS, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a dodge. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLDODGEDOTHEROTHER", {"%c", "%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_DODGE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a parry. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLPARRIEDOTHEROTHER", {"%c", "%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_PARRY, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a block. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLBLOCKEDOTHEROTHER", {"%c", "%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_BLOCK, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for a resist. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLRESISTOTHEROTHER", {"%c", "%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_RESIST, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an absorb. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLLOGABSORBOTHEROTHER", {"%c", "%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_ABSORB, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an immune. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLIMMUNEOTHEROTHER", {"%c", "%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_IMMUNE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Look for an evade - local capturedData = MikCEH.GetCapturedData(combatMessage, "SPELLEVADEDOTHEROTHER", {"%c", "%s", "%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetDamageEventData(MikCEH.DIRECTIONTYPE_PET_OUTGOING, MikCEH.ACTIONTYPE_EVADE, nil, nil, nil, capturedData.SpellName, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - -- ********************************************************************************** -- Parses the passed combat message for incoming item buff info. -- ********************************************************************************** @@ -3646,30 +1036,6 @@ function MikCEH.ParseForIncomingItemBuffs(combatMessage) end --- ********************************************************************************** --- Parses the passed combat message for buff fades. --- ********************************************************************************** -function MikCEH.ParseForBuffFades(combatMessage) - -- Look for a buff fade due to wearing off. - local capturedData = MikCEH.GetCapturedData(combatMessage, "AURAREMOVEDSELF", {"%b"}); - - -- If a match was found. - if (capturedData ~= nil) then - local eventData = MikCEH.GetNotificationEventData(MikCEH.NOTIFICATIONTYPE_BUFF_FADE, nil, capturedData.BuffName); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - -- ********************************************************************************** -- Parses the passed combat message for honor gains. -- ********************************************************************************** @@ -3794,125 +1160,6 @@ function MikCEH.ParseForExperienceGains(combatMessage) end --- ********************************************************************************** --- Parses the passed combat message for killing blows. --- ********************************************************************************** -function MikCEH.ParseForKillingBlows(combatMessage) - -- Look for a killing blow. - local capturedData = MikCEH.GetCapturedData(combatMessage, "SELFKILLOTHER", {"%n"}); - - -- If a match was found. - if (capturedData ~= nil) then - -- Hold the notification type. - local notificationType = MikCEH.NOTIFICATIONTYPE_NPC_KILLING_BLOW; - - -- Check if the current target is the slain enemy and is a player, or the slain target is on the recently - -- selected players list. - if ((UnitExists("target") and (UnitName("target") == capturedData.Name) and UnitIsPlayer("target")) or - (recentlySelectedPlayers[capturedData.Name] ~= nil)) then - notificationType = MikCEH.NOTIFICATIONTYPE_PC_KILLING_BLOW; - end - - -- Create the event. - local eventData = MikCEH.GetNotificationEventData(notificationType, nil, capturedData.Name); - - -- Send the event. - MikCEH.SendEvent(eventData); - - -- Return the parse was successful. - return true; - end - - - -- Return the parse was NOT successful. - return false; -end - - --- ********************************************************************************** --- Parse the passed combat message for partial actions and populate the info --- from any actions found into the passed event data. --- ********************************************************************************** -function MikCEH.ParseForPartialActions(combatMessage, eventData) - -- Look for a partial absorb. - local capturedData = MikCEH.GetCapturedData(combatMessage, "ABSORB_TRAILER", {"%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - eventData.PartialActionType = MikCEH.PARTIALACTIONTYPE_ABSORB; - eventData.PartialAmount = capturedData.Amount; - - -- Return that partial action information was found. - return true; - end - - - -- Look for a partial block. - local capturedData = MikCEH.GetCapturedData(combatMessage, "BLOCK_TRAILER", {"%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - eventData.PartialActionType = MikCEH.PARTIALACTIONTYPE_BLOCK; - eventData.PartialAmount = capturedData.Amount; - - -- Return that partial effect information was found. - return true; - end - - - -- Look for a partial resist. - local capturedData = MikCEH.GetCapturedData(combatMessage, "RESIST_TRAILER", {"%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - eventData.PartialActionType = MikCEH.PARTIALACTIONTYPE_RESIST; - eventData.PartialAmount = capturedData.Amount; - - -- Return that partial action information was found. - return true; - end - - - -- Look for a vulnerability bonus. - local capturedData = MikCEH.GetCapturedData(combatMessage, "VULNERABLE_TRAILER", {"%a"}); - - -- If a match was found. - if (capturedData ~= nil) then - eventData.PartialActionType = MikCEH.PARTIALACTIONTYPE_VULNERABLE; - eventData.PartialAmount = capturedData.Amount; - - -- Return that partial action information was found. - return true; - end - - - -- Look for a crushing blow. - local capturedData = MikCEH.GetCapturedData(combatMessage, "CRUSHING_TRAILER", {}); - -- If a match was found. - if (capturedData ~= nil) then - eventData.PartialActionType = MikCEH.PARTIALACTIONTYPE_CRUSHING; - - -- Return that partial action information was found. - return true; - end - - - -- Look for a glancing blow. - local capturedData = MikCEH.GetCapturedData(combatMessage, "GLANCING_TRAILER", {}); - -- If a match was found. - if (capturedData ~= nil) then - eventData.PartialActionType = MikCEH.PARTIALACTIONTYPE_GLANCING; - - -- Return that partial action information was found. - return true; - end - - - -- Return that no partial action information was found. - return false; -end - - ------------------------------------------------------------------------------------- -- Utility functions. ------------------------------------------------------------------------------------- diff --git a/README.md b/README.md index 77d5e61..06bfaf7 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ MSBT reads structured combat data from ClassicAPI's `COMBAT_LOG_EVENT_UNFILTERED ### What Changes -- **ClassicAPI combat log**: Registers for the unfiltered combat log (`SPELL_DAMAGE`, `SWING_DAMAGE`, `SPELL_HEAL`, `SPELL_ENERGIZE`, `SPELL_MISSED`, `SPELL_AURA_APPLIED`, `ENVIRONMENTAL_DAMAGE`, `PARTY_KILL`, etc.) which carries pre-parsed amounts, GUIDs, crit flags, miss types and spell info. Redundant `CHAT_MSG_*` events are unregistered to avoid duplicates. No opt-in CVars are needed. +- **ClassicAPI combat log**: Registers for the unfiltered combat log (`SPELL_DAMAGE`, `SWING_DAMAGE`, `SPELL_HEAL`, `SPELL_ENERGIZE`, `SPELL_MISSED`, `SPELL_AURA_APPLIED`, `ENVIRONMENTAL_DAMAGE`, `PARTY_KILL`, etc.) which carries pre-parsed amounts, GUIDs, crit flags, miss types and spell info. It is the only source for combat events. No opt-in CVars are needed. - **Spell icons**: combat log events resolve icons from their SpellId with ClassicAPI's `C_Spell.GetSpellTexture`. Events with only a name fall back to the player's auras, spellbook and items; each name is looked up once. ### Removed: SuperWoW / UnitXP SP3 / Nampower @@ -79,7 +79,7 @@ SuperWoW, UnitXP SP3 and Nampower integration has been removed in favor of Class ### Fallback -`CHAT_MSG_*` parsing stays registered for everything with no combat log equivalent (honor, reputation, skill, XP, item enchantments, some power gains/losses) and as a fallback until each combat log event actually fires. +`CHAT_MSG_*` messages are parsed only for what the combat log lacks (honor, reputation, skill, XP, item enchantments, power losses). All of them stay registered because search pattern triggers can match any of them. ## Performance Optimizations @@ -100,7 +100,7 @@ SuperWoW, UnitXP SP3 and Nampower integration has been removed in favor of Class ### Event Processing Pipeline ``` -WoW CHAT_MSG_* events (or ClassicAPI COMBAT_LOG_EVENT_UNFILTERED) +ClassicAPI COMBAT_LOG_EVENT_UNFILTERED (plus CHAT_MSG_* for triggers and non-combat notifications) -> MikCEH.OnEvent() / MikCEH.OnCombatLogEvent() -> ParseCombatEvents() dispatch table (or combat log handler) -> Creates CombatEventData tables