Attempt to fix priest spirit of redemption triggering before some damage taken by the priest

This commit is contained in:
Tercio Jose
2022-12-25 18:59:07 -03:00
parent 6dd148c438
commit 875d2befe3
4 changed files with 60 additions and 10 deletions
+16 -8
View File
@@ -213,6 +213,8 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
local damageAmountColor = "FFFFFFFF"
local healingAmountColor = "FF988EA0"
local lineHeight = Details.deathlog_line_height
gameCooltip:Reset()
gameCooltip:SetType("tooltipbar")
@@ -260,7 +262,7 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|c" .. damageSourceColor .. source .. "|r)", "|c" .. damageAmountColor .. "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
end
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
gameCooltip:AddIcon(spellIcon, nil, nil, lineHeight, lineHeight, .1, .9, .1, .9)
if (event[9]) then
--friendly fire
@@ -275,12 +277,12 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
if (combatObject.is_arena) then
if (amount > Details.deathlog_healingdone_min_arena) then
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|c" .. healingSourceColor .. source .. "|r)", "|c" .. healingAmountColor .. "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
gameCooltip:AddIcon(spellIcon, nil, nil, lineHeight, lineHeight, .1, .9, .1, .9)
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, showSpark, statusBarBackgroundTable_ForDeathTooltip)
end
else
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|c" .. healingSourceColor .. source .. "|r)", "|c" .. healingAmountColor .. "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
gameCooltip:AddIcon(spellIcon, nil, nil, lineHeight, lineHeight, .1, .9, .1, .9)
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, showSpark, statusBarBackgroundTable_ForDeathTooltip)
end
end
@@ -290,7 +292,7 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
if (evType == 1) then
--cooldown
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
gameCooltip:AddIcon(spellIcon, nil, nil, lineHeight, lineHeight, .1, .9, .1, .9)
gameCooltip:AddStatusBar(100, 1, barTypeColors.cooldown, showSpark)
elseif (evType == 2 and not battleress) then
@@ -304,8 +306,14 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
elseif (evType == 4) then
--debuff
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "x" .. amount .. " " .. AURA_TYPE_DEBUFF .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon)
gameCooltip:AddIcon(spellIcon, nil, nil, lineHeight, lineHeight, .1, .9, .1, .9)
gameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, showSpark)
elseif (evType == 5) then
--buff
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "x" .. amount .. " " .. AURA_TYPE_BUFF .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon, nil, nil, lineHeight, lineHeight, .1, .9, .1, .9)
gameCooltip:AddStatusBar(100, 1, barTypeColors.buff, showSpark)
end
end
end
@@ -318,7 +326,7 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
if (battleress) then
local spellName, _, spellIcon = _GetSpellInfo(battleress[2])
gameCooltip:AddLine("+" .. format("%.1f", battleress[4] - timeOfDeath) .. "s " .. spellName .. " (" .. battleress[6] .. ")", "", 1, "white")
gameCooltip:AddIcon("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
gameCooltip:AddIcon("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, lineHeight, lineHeight, .75, 1, 0, 1)
gameCooltip:AddStatusBar(0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
end
@@ -326,7 +334,7 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
if (lastcooldown[3] == 1) then
local spellName, _, spellIcon = _GetSpellInfo(lastcooldown[2])
gameCooltip:AddLine(format("%.1f", lastcooldown[4] - timeOfDeath) .. "s " .. spellName .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
gameCooltip:AddIcon(spellIcon)
gameCooltip:AddIcon(spellIcon, 1, 1, lineHeight, lineHeight, .1, .9, .1, .9)
else
gameCooltip:AddLine(Loc ["STRING_NOLAST_COOLDOWN"])
gameCooltip:AddIcon([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]], 1, 1, 18, 18)
@@ -382,7 +390,7 @@ local function RefreshBarraMorte (morte, barra, instancia)
atributo_misc:DeadAtualizarBarra (morte, morte.minha_barra, barra.colocacao, instancia)
end
--objeto death:
--object death:
--[1] tabela [2] time [3] nome [4] classe [5] maxhealth [6] time of death
--[1] true damage/ false heal [2] spellid [3] amount [4] time [5] current health [6] source
+33 -2
View File
@@ -2752,10 +2752,41 @@
cacheAnything.paladin_vivaldi_blessings[alvo_serial] = {who_serial, who_name, who_flags}
elseif (spellid == 27827) then --spirit of redemption (holy ~priest) ~spirit
--C_Timer.After(0.1, function()
local deathLog = last_events_cache[alvo_name]
if (not deathLog) then
deathLog = _current_combat:CreateLastEventsTable(alvo_name)
end
local i = deathLog.n
local thisEvent = deathLog[i]
if (not thisEvent) then
return print("Parser Event Error -> Set to 16 DeathLogs and /reload", i, _death_event_amt)
end
thisEvent[1] = 5 --5 = buff aplication
thisEvent[2] = spellid --spellid
thisEvent[3] = 1
thisEvent[4] = time --parser time
thisEvent[5] = UnitHealth(alvo_name) --current unit heal
thisEvent[6] = who_name --source name
thisEvent[7] = false
thisEvent[8] = false
thisEvent[9] = false
thisEvent[10] = false
i = i + 1
if (i == _death_event_amt+1) then
deathLog.n = 1
else
deathLog.n = i
end
C_Timer.After(0.05, function() --25/12/2022: enabled the delay to wait the combatlog dump damage events which will happen after the buff is applied
parser:dead ("UNIT_DIED", time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
ignore_death [who_name] = true
--end)
end)
return
elseif (spellid == SPELLID_MONK_GUARD) then
+9
View File
@@ -182,6 +182,15 @@ function Details:OpenClassColorsConfig()
name = "Debuff",
desc = "Debuff",
},
{--buff
type = "select",
get = function() return Details.death_log_colors.buff end,
values = function()
return buildColorList("buff")
end,
name = "Buff",
desc = "Buff",
},
}
--templates
+2
View File
@@ -865,6 +865,7 @@ local default_profile = {
friendlyfire = "darkorange",
cooldown = "yellow",
debuff = "purple",
buff = "silver",
},
fade_speed = 0.15,
@@ -1475,6 +1476,7 @@ local default_global_data = {
--min health done on the death report
deathlog_healingdone_min = 1,
deathlog_healingdone_min_arena = 400,
deathlog_line_height = 16,
--mythic plus config
mythic_plus = {