См. Параметр «количество» для SPELL_DAMAGE
в разделе https://wow.gamepedia.com/COMBAT_LOG_EVENT
local playerGUID = UnitGUID("player")
local MSG_SPELL_DAMAGE = "Your %s (%s) hit %s for %d damage!"
local f = CreateFrame("Frame")
f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
f:SetScript("OnEvent", function(self, event)
self:OnEvent(event, CombatLogGetCurrentEventInfo())
end)
function f:OnEvent(event, ...)
local timestamp, subevent, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = ...
local spellId, spellName, spellSchool
local amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing, isOffHand
if subevent == "SPELL_DAMAGE" then
spellId, spellName, spellSchool, amount = select(12, ...)
end
if amount and sourceGUID == playerGUID then
local spell = spellId and GetSpellLink(spellId)
print(MSG_SPELL_DAMAGE:format(spell, GetSchoolString(spellSchool), destName, amount))
end
end