Code:
function SCTD:ParseCombat(arg1, timestamp, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, ...)
--custom search first
--if (db["SCTD_CUSTOMEVENTS"] and SCT:CustomEventSearch(arg1) == true) then
--return
--end
if not COMBAT_EVENTS[event] then return end
local toPlayer, fromPlayer, toPet, fromPet
if (sourceName and not CombatLog_Object_IsA(sourceFlags, COMBATLOG_OBJECT_NONE) ) then
fromPlayer = CombatLog_Object_IsA(sourceFlags, COMBATLOG_FILTER_MINE)
fromPet = CombatLog_Object_IsA(sourceFlags, COMBATLOG_FILTER_MY_PET)
end
--if not from player or pet, then end
if not fromPlayer and not fromPet then return end
local healtot, healamt, parent
local amount, school, resisted, blocked, absorbed, critical, glancing, crushing
local spellId, spellName, spellSchool, missType, powerType, extraAmount, environmentalType, extraSpellId, extraSpellName, extraSpellSchool
local text, texture, message, inout, color
------------damage----------------
if event == "SWING_DAMAGE" or event == "RANGE_DAMAGE" or event == "SPELL_DAMAGE" or event == "SPELL_PERIODIC_DAMAGE" or event == "DAMAGE_SHIELD" or event == "DAMAGE_SPLIT" then
if event == "SWING_DAMAGE" then
amount, school, resisted, blocked, absorbed, critical, glancing, crushing = select(1, ...)
else
spellId, spellName, spellSchool, amount, school, resisted, blocked, absorbed, critical, glancing, crushing = select(1, ...)
texture = select(3, GetSpellInfo(spellId))
end
text = tostring(amount)
if (amount < db["SCTD_DMGFILTER"]) then return end
if (crushing and db["SHOWGLANCE"]) then text = SCT.LOCALS.Crushchar..text..SCT.LOCALS.Crushchar end
if (glancing and db["SHOWGLANCE"]) then text = SCT.LOCALS.Glancechar..text..SCT.LOCALS.Glancechar end
if (blocked) then text = string_format("%s (%d)", text, blocked) end
if (absorbed) then text = string_format("%s (%d)", text, absorbed) end
if (event == "SWING_DAMAGE" or event == "RANGE_DAMAGE") and school == SCHOOL_MASK_PHYSICAL then
if fromPlayer then
self:DisplayText("SCTD_SHOWMELEE", text, critical, nil, nil, destName)
elseif fromPet then
self:DisplayText("SCTD_SHOWPET", text, critical, SCHOOL_STRINGS[school], resisted, destName, PET)
end
else
local etype
if fromPet then
etype = "SCTD_SHOWPET"
elseif event == "SPELL_PERIODIC_DAMAGE" then
etype = "SCTD_SHOWPERIODIC"
elseif event == "DAMAGE_SHIELD" then
etype = "SCTD_SHOWDMGSHIELD"
else
etype = "SCTD_SHOWSPELL"
end
self:DisplayText(etype, text, critical, SCHOOL_STRINGS[school], resisted, destName, spellName, texture)
end
------------misses----------------
elseif event == "SWING_MISSED" or event == "RANGE_MISSED" or event == "SPELL_MISSED" or event == "SPELL_PERIODIC_MISSED" or event == "DAMAGE_SHIELD_MISSED" then
local etype, miss
if event == "SWING_MISSED" or event == "RANGE_MISSED" then
missType = select(1, ...)
etype = "SCTD_SHOWMELEE"
else
spellId, spellName, spellSchool, missType = select(1, ...)
texture = select(3, GetSpellInfo(spellId))
etype = "SCTD_SHOWSPELL"
end
if fromPet then etype = "SCTD_SHOWPET" end
miss = getglobal(missType)
if miss then
self:DisplayText(etype, getglobal(missType), nil, nil, nil, destName, spellName, texture)
end
------------interrupts----------------
elseif event == "SPELL_INTERRUPT" then
spellId, spellName, spellSchool, extraSpellId, extraSpellName, extraSpellSchool = select(1, ...)
texture = select(3, GetSpellInfo(extraSpellId))
self:DisplayText("SCTD_SHOWINTERRUPT", SCT.LOCALS.Interrupted, nil, nil, nil, destName, extraSpellName, texture)
end
end
Lines 10-17 should be changeable to see your party pets, not sure if the events support it, but it prolly does
Connect With Us