Changed the health on death logs to be live percent (health % at hit moment), was before health amount divided by default character life amount
This commit is contained in:
@@ -940,6 +940,25 @@ local segmentTypeToString = {
|
||||
end
|
||||
end
|
||||
|
||||
function classCombat:CutDeathByTime(time)
|
||||
local deathsTable = self:GetDeaths()
|
||||
for i = #deathsTable, 1, -1 do
|
||||
local deathTable = deathsTable[i]
|
||||
local playerName, playerClass, deathTime, deathCombatTime, deathTimeString, playerMaxHealth, deathEvents, lastCooldown, spec = Details:UnpackDeathTable(deathTable)
|
||||
for evIndex = 1, #deathEvents do
|
||||
local event = deathEvents[evIndex]
|
||||
local evType = event[1]
|
||||
if (type(evType) == "boolean") then
|
||||
local eventTime = event[4]
|
||||
print(eventTime, deathTime)
|
||||
if (eventTime+10 < deathTime) then
|
||||
print("this event is ignored, and should be removed", event[1])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--return the total of a specific attribute
|
||||
local power_table = {0, 1, 3, 6, 0, "alternatepower"}
|
||||
|
||||
|
||||
@@ -205,8 +205,9 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
|
||||
|
||||
--death parser
|
||||
for i, event in ipairs(events) do
|
||||
local currentHP = event[5]
|
||||
local healthPercent = floor(currentHP / maxHP * 100)
|
||||
--local currentHP = event[5] * 100
|
||||
--local healthPercent = floor(currentHP / maxHP * 100)
|
||||
local healthPercent = floor(event[5] * 100)
|
||||
if (healthPercent > 100) then
|
||||
healthPercent = 100
|
||||
end
|
||||
@@ -226,7 +227,7 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
|
||||
local eventTime = event[4]
|
||||
local source = Details:GetOnlyName(event[6] or "")
|
||||
|
||||
if (eventTime + 12 > timeOfDeath) then
|
||||
if (eventTime + 10 > timeOfDeath) then
|
||||
if (type(evType) == "boolean") then
|
||||
--is damage or heal?
|
||||
if (evType) then --bool true
|
||||
|
||||
Reference in New Issue
Block a user