Added Mythic+ Overall's time types

This commit is contained in:
Tercio Jose
2023-12-01 12:30:19 -03:00
parent 0ff046b500
commit eb8c9894a5
6 changed files with 130 additions and 81 deletions
+39 -26
View File
@@ -2738,41 +2738,54 @@ function damageClass:RefreshLine(instanceObject, lineContainer, whichRowLine, ra
local currentCombat = Details:GetCurrentCombat()
--calculate the actor dps
if ((Details.time_type == 2 and self.grupo) or not Details:CaptureGet("damage") or instanceObject.segmento == -1 or Details.use_realtimedps) then
if (Details.use_realtimedps and Details.in_combat) then
local currentDps = self.last_dps_realtime
if (currentDps) then
dps = currentDps
end
if (currentCombat:GetCombatType() == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then
if (Details.mythic_plus.mythicrun_time_type == 1) then
--total time in combat, activity time
combatTime = currentCombat:GetCombatTime()
elseif (Details.mythic_plus.mythicrun_time_type == 2) then
--elapsed time of the run
combatTime = currentCombat:GetRunTime()
end
if (not dps) then
if (instanceObject.segmento == -1 and combatTime == 0) then
local actor = currentCombat(1, self.nome)
if (actor) then
local combatTime = actor:Tempo()
dps = damageTotal / combatTime
self.last_dps = dps
dps = damageTotal / combatTime
self.last_dps = dps
else
--calculate the actor dps
if ((Details.time_type == 2 and self.grupo) or not Details:CaptureGet("damage") or instanceObject.segmento == -1 or Details.use_realtimedps) then
if (Details.use_realtimedps and Details.in_combat) then
local currentDps = self.last_dps_realtime
if (currentDps) then
dps = currentDps
end
end
if (not dps) then
if (instanceObject.segmento == -1 and combatTime == 0) then
local actor = currentCombat(1, self.nome)
if (actor) then
local combatTime = actor:Tempo()
dps = damageTotal / combatTime
self.last_dps = dps
else
dps = damageTotal / combatTime
self.last_dps = dps
end
else
dps = damageTotal / combatTime
self.last_dps = dps
end
else
dps = damageTotal / combatTime
self.last_dps = dps
end
end
else
if (not self.on_hold) then
dps = damageTotal/self:Tempo() --calcula o dps deste objeto
self.last_dps = dps --salva o dps dele
else
if (self.last_dps == 0) then --no calculou o dps dele ainda mas entrou em standby
dps = damageTotal/self:Tempo()
self.last_dps = dps
if (not self.on_hold) then
dps = damageTotal/self:Tempo() --calcula o dps deste objeto
self.last_dps = dps --salva o dps dele
else
dps = self.last_dps
if (self.last_dps == 0) then --no calculou o dps dele ainda mas entrou em standby
dps = damageTotal/self:Tempo()
self.last_dps = dps
else
dps = self.last_dps
end
end
end
end