Time Machine overhaul
This commit is contained in:
@@ -732,8 +732,8 @@ end
|
||||
if (self [1]) then
|
||||
for _, jogador in ipairs(self [1]._ActorTable) do --damage
|
||||
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
|
||||
jogador:TerminarTempo()
|
||||
jogador:Iniciar (false) --trava o dps do jogador
|
||||
Details222.TimeMachine.StopTime(jogador)
|
||||
jogador:Iniciar(false) --lock the actor timer
|
||||
else
|
||||
if (jogador.start_time == 0) then
|
||||
jogador.start_time = _tempo
|
||||
@@ -747,8 +747,8 @@ end
|
||||
if (self [2]) then
|
||||
for _, jogador in ipairs(self [2]._ActorTable) do --healing
|
||||
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
|
||||
jogador:TerminarTempo()
|
||||
jogador:Iniciar (false) --trava o dps do jogador
|
||||
Details222.TimeMachine.StopTime(jogador)
|
||||
jogador:Iniciar(false) --lock the actor timer
|
||||
else
|
||||
if (jogador.start_time == 0) then
|
||||
jogador.start_time = _tempo
|
||||
|
||||
@@ -4618,6 +4618,7 @@ function damageClass:MontaInfoDamageDone() --I guess this fills the list of spel
|
||||
local bkSpellData = {
|
||||
bIsActorHeader = true, --tag this spelltable as an actor header, when the actor is the header it will nest the spells use by this actor
|
||||
actorName = petName,
|
||||
npcId = petActor.aID,
|
||||
id = 0,
|
||||
spellschool = 0,
|
||||
bIsExpanded = Details222.BreakdownWindow.IsSpellExpanded(petName),
|
||||
@@ -4670,6 +4671,8 @@ function damageClass:MontaInfoDamageDone() --I guess this fills the list of spel
|
||||
---@type spelltableadv
|
||||
local bkSpellData = {
|
||||
id = spellId,
|
||||
actorName = petName,
|
||||
npcId = petActor.aID,
|
||||
spellschool = spellTable.spellschool,
|
||||
bIsExpanded = Details222.BreakdownWindow.IsSpellExpanded(spellId),
|
||||
bCanExpand = false,
|
||||
@@ -6146,10 +6149,10 @@ function damageClass:Iniciar (iniciar)
|
||||
return self.dps_started --retorna se o dps esta aberto ou fechado para este jogador
|
||||
elseif (iniciar) then
|
||||
self.dps_started = true
|
||||
self:RegistrarNaTimeMachine() --coloca ele da timeMachine
|
||||
Details222.TimeMachine.AddActor(self)
|
||||
else
|
||||
self.dps_started = false
|
||||
self:DesregistrarNaTimeMachine() --retira ele da timeMachine
|
||||
Details222.TimeMachine.RemoveActor(self)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -2071,6 +2071,7 @@ function healingClass:MontaInfoHealingDone()
|
||||
---@type spelltableadv
|
||||
local bkSpellData = {
|
||||
id = spellId,
|
||||
actorName = petName,
|
||||
spellschool = spellTable.spellschool,
|
||||
expanded = Details222.BreakdownWindow.IsSpellExpanded(spellId),
|
||||
bCanExpand = false,
|
||||
@@ -2772,10 +2773,10 @@ function healingClass:Iniciar (iniciar)
|
||||
return self.iniciar_hps --retorna se o dps esta aberto ou fechado para este jogador
|
||||
elseif (iniciar) then
|
||||
self.iniciar_hps = true
|
||||
self:RegistrarNaTimeMachine() --coloca ele da timeMachine
|
||||
Details222.TimeMachine.AddActor(self)
|
||||
else
|
||||
self.iniciar_hps = false
|
||||
self:DesregistrarNaTimeMachine() --retira ele da timeMachine
|
||||
Details222.TimeMachine.RemoveActor(self)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -309,22 +309,14 @@ function segmentClass:AddCombat(combatObject)
|
||||
---@cast actorObject actor
|
||||
--clear last events table
|
||||
actorObject.last_events_table = nil
|
||||
|
||||
--unregister from time machine
|
||||
if (actorObject.timeMachine) then
|
||||
actorObject:DesregistrarNaTimeMachine()
|
||||
end
|
||||
Details222.TimeMachine.RemoveActor(actorObject)
|
||||
end
|
||||
|
||||
for _, actorObject in containerHeal:ListActors() do
|
||||
---@cast actorObject actor
|
||||
--clear last events table
|
||||
actorObject.last_events_table = nil
|
||||
|
||||
--unregister from time machine
|
||||
if (actorObject.timeMachine) then
|
||||
actorObject:DesregistrarNaTimeMachine()
|
||||
end
|
||||
Details222.TimeMachine.RemoveActor(actorObject)
|
||||
end
|
||||
|
||||
if (Details.trash_auto_remove) then
|
||||
@@ -335,14 +327,10 @@ function segmentClass:AddCombat(combatObject)
|
||||
if ((thirdCombat.is_trash and not thirdCombat.is_boss) or(thirdCombat.is_temporary)) then
|
||||
--verify again the time machine
|
||||
for _, actorObject in thirdCombat:GetContainer(DETAILS_ATTRIBUTE_DAMAGE):ListActors() do
|
||||
if (actorObject.timeMachine) then
|
||||
actorObject:DesregistrarNaTimeMachine()
|
||||
end
|
||||
Details222.TimeMachine.RemoveActor(actorObject)
|
||||
end
|
||||
for _, actorObject in thirdCombat:GetContainer(DETAILS_ATTRIBUTE_HEAL):ListActors() do
|
||||
if (actorObject.timeMachine) then
|
||||
actorObject:DesregistrarNaTimeMachine()
|
||||
end
|
||||
Details222.TimeMachine.RemoveActor(actorObject)
|
||||
end
|
||||
|
||||
--remove
|
||||
@@ -403,14 +391,10 @@ function segmentClass:AddCombat(combatObject)
|
||||
|
||||
--check time machine
|
||||
for _, actorObject in combatObjectToBeRemoved:GetContainer(DETAILS_ATTRIBUTE_DAMAGE):ListActors() do
|
||||
if (actorObject.timeMachine) then
|
||||
actorObject:DesregistrarNaTimeMachine()
|
||||
end
|
||||
Details222.TimeMachine.RemoveActor(actorObject)
|
||||
end
|
||||
for _, actorObject in combatObjectToBeRemoved:GetContainer(DETAILS_ATTRIBUTE_HEAL):ListActors() do
|
||||
if (actorObject.timeMachine) then
|
||||
actorObject:DesregistrarNaTimeMachine()
|
||||
end
|
||||
Details222.TimeMachine.RemoveActor(actorObject)
|
||||
end
|
||||
|
||||
--remove it
|
||||
@@ -553,7 +537,7 @@ function segmentClass:ResetAllCombatData()
|
||||
Details:Destroy(Details.cache_healing_group)
|
||||
|
||||
--reinicia a time machine
|
||||
timeMachine:Reiniciar()
|
||||
Details222.TimeMachine.Restart()
|
||||
Details:UpdateParserGears()
|
||||
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat("player")) then
|
||||
@@ -605,14 +589,10 @@ end
|
||||
|
||||
--verificar novamente a time machine
|
||||
for _, jogador in ipairs(_terceiro_combate [1]._ActorTable) do --damage
|
||||
if (jogador.timeMachine) then
|
||||
jogador:DesregistrarNaTimeMachine()
|
||||
end
|
||||
Details222.TimeMachine.RemoveActor(jogador)
|
||||
end
|
||||
for _, jogador in ipairs(_terceiro_combate [2]._ActorTable) do --heal
|
||||
if (jogador.timeMachine) then
|
||||
jogador:DesregistrarNaTimeMachine()
|
||||
end
|
||||
Details222.TimeMachine.RemoveActor(jogador)
|
||||
end
|
||||
--remover
|
||||
_table_remove(self.tabelas, 3)
|
||||
|
||||
Reference in New Issue
Block a user