container_segments 424 error: now it is ensuring to wipe the combatObject that got removed from containerSegments

This commit is contained in:
Tercio Jose
2023-06-06 17:36:13 -03:00
parent c7a1e06638
commit 0c397b5816
16 changed files with 97 additions and 71 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<Bindings>
<Binding name="DETAILS_RESET_SEGMENTS" description="Clear all segments." header="DETAILS_KEYBIND_SEGMENTCONTROL" category="Details!">
_detalhes.tabela_historico:resetar()
_detalhes.tabela_historico:ResetAllCombatData()
</Binding>
<Binding name="DETAILS_SCROLL_DOWN" description="Scroll down the window which you have the mouse over." header="DETAILS_KEYBIND_SCROLLING" category="Details!">
+17 -1
View File
@@ -19,8 +19,11 @@
---@class combat : table
---@field amountCasts {[string]: table<string, number>}
---@field instance_type string "raid" or "party" or "pvp" or "arena" or "none"
---@field end_time number
---@field start_time number
---@field is_trash boolean while in raid this is set to true if the combat isn't raid boss, in dungeon this is set to true if the combat isn't a boss or if the dungeon isn't a mythic+
---@field raid_roster table<string, string> [unitName] = unitGUID
---@field overall_added boolean is true when the combat got added into the overall combat
---@field is_mythic_dungeon_trash boolean
---@field is_mythic_dungeon_run_id number
@@ -35,6 +38,9 @@
---@field GetStartTime fun(combat: combat) : number
---@field SetStartTime fun(combat: combat, time: number)
---@field GetEndTime fun(combat: combat) : number
---@field GetDifficulty fun(combat: combat) : number return the dungeon or raid difficulty for boss fights
---@field GetEncounterCleuID fun(combat: combat) : number return the encounterId for boss fights, this number is gotten from the ENCOUNTER_START event
---@field GetBossInfo fun(combat: combat) : table a table containing many informations about the boss fight
---@field SetEndTime fun(combat: combat, time: number)
---@field CopyDeathsFrom fun(combat1: combat, combat2: combat, bMythicPlus: boolean) copy the deaths from combat2 to combat1, use true on bMythicPlus if the combat is from a mythic plus run
---@field GetContainer fun(combat: combat, containerType: number) : actorcontainer get an actor container, containerType can be 1 for damage, 2 heal, 3 energy, 4 utility
@@ -44,6 +50,12 @@
---@field GetSpellUptime fun(combat: combat, actorName: string, spellId: number, auraType: string|nil) : number get the uptime of a buff or debuff
---@field GetActor fun(combat: combat, attribute: number, playerName: string) : actor
---@field CreateAlternatePowerTable fun(combat: combat, actorName: string) : alternatepowertable
---@field GetCombatNumber fun(combat: combat) : number get a unique number representing the combatId, each combat has a unique number
---@field SetDate fun(combat: combat, startDate: string, endDate: string) set the start and end date of the combat, format: "H:M:S"
---@field GetDate fun(combat: combat) : string, string get the start and end date of the combat, format: "H:M:S"
---@field GetRoster fun(combat: combat) : table<string, string> get the roster of the combat, the table contains the names of the players in the combat
---@field InstanceType fun(combat: combat) : string get the instance type of the combat, can be "raid" or "party" or "pvp" or "arena" or "none"
---@field IsTrash fun(combat: combat) : boolean is true if the combat is a trash combat
---@class actorcontainer : table contains two tables _ActorTable and _NameIndexTable, the _ActorTable contains the actors, the _NameIndexTable contains the index of the actors in the _ActorTable, making quick to reorder them without causing overhead
---@field _ActorTable table array of actors
@@ -179,7 +191,6 @@
---@class actorutility : actor
---@field cc_break number amount of times the actor broke a cc
---@field dispell number amount of times the actor dispelled a buff or debuff
---@field interrupt number amount of times the actor interrupted a spell
---@field ress number amount of times the actor ressed a player
---@field dead number amount of times the actor died
@@ -189,6 +200,11 @@
---@field cc_done number amount of times the actor applyed a crowdcontrol on a target
---@field cc_done_targets table<string, number> [targetName] = amount of times the actor cc'd the target
---@field cc_done_spells spellcontainer
---@field dispell number amount of times the actor dispelled a buff or debuff
---@field dispell_spells spellcontainer
---@field dispell_targets table<string, number> [targetName] = amount
---@field dispell_oque table<number, number> [spellId] = amount, amount of times the actor dispelled the spellId
--interrupt_targets interrupt_spells interrompeu_oque
--cc_break_targets cc_break_spells cc_break_oque
+8 -8
View File
@@ -34,8 +34,8 @@
--local pointers
local ipairs = ipairs -- lua local
local pairs = pairs -- lua local
local _bit_band = bit.band -- lua local
local _date = date -- lua local
local bitBand = bit.band -- lua local
local date = date -- lua local
local tremove = table.remove -- lua local
local rawget = rawget
local _math_max = math.max
@@ -583,14 +583,14 @@ function classCombat:NovaTabela(bTimeStarted, overallCombatObject, combatId, ...
--try discover if is a pvp combat
local who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags = ...
if (who_serial) then --aqui ir identificar o boss ou o oponente
if (alvo_name and _bit_band (alvo_flags, REACTION_HOSTILE) ~= 0) then --tentando pegar o inimigo pelo alvo
if (alvo_name and bitBand (alvo_flags, REACTION_HOSTILE) ~= 0) then --tentando pegar o inimigo pelo alvo
combatObject.contra = alvo_name
if (_bit_band (alvo_flags, CONTROL_PLAYER) ~= 0) then
if (bitBand (alvo_flags, CONTROL_PLAYER) ~= 0) then
combatObject.pvp = true --o alvo da faco oposta ou foi dado mind control
end
elseif (who_name and _bit_band (who_flags, REACTION_HOSTILE) ~= 0) then --tentando pegar o inimigo pelo who caso o mob quem deu o primeiro hit
elseif (who_name and bitBand (who_flags, REACTION_HOSTILE) ~= 0) then --tentando pegar o inimigo pelo who caso o mob quem deu o primeiro hit
combatObject.contra = who_name
if (_bit_band (who_flags, CONTROL_PLAYER) ~= 0) then
if (bitBand (who_flags, CONTROL_PLAYER) ~= 0) then
combatObject.pvp = true --o who da faco oposta ou foi dado mind control
end
else
@@ -763,9 +763,9 @@ end
function classCombat:seta_data(tipo)
if (tipo == Details._detalhes_props.DATA_TYPE_START) then
self.data_inicio = _date("%H:%M:%S")
self.data_inicio = date("%H:%M:%S")
elseif (tipo == Details._detalhes_props.DATA_TYPE_END) then
self.data_fim = _date("%H:%M:%S")
self.data_fim = date("%H:%M:%S")
end
end
+1 -1
View File
@@ -6200,7 +6200,7 @@ end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--core functions
--limpa as tabelas temporrias ao resetar
--limpa as tabelas temporrias ao ResetAllCombatData
function damageClass:ClearTempTables()
for i = #ntable, 1, -1 do
ntable [i] = nil
+1 -1
View File
@@ -3733,7 +3733,7 @@ function _detalhes:envia_relatorio (linhas, custom)
end
--adicionar o tempo de luta
--add the combat time
local segmentTime = ""
if (combatObject) then
local combatTime = combatObject:GetCombatTime()
+33 -27
View File
@@ -11,18 +11,19 @@ local addonName, Details222 = ...
local combatClass = Details.combate
local segmentClass = Details.historico
local timeMachine = Details.timeMachine
local bitBand = bit.band
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--API
--reset only the overall data
function Details:ResetSegmentOverallData()
return segmentClass:resetar_overall()
return segmentClass:ResetOverallData()
end
--reset segments and overall data
function Details:ResetSegmentData()
return segmentClass:resetar()
return segmentClass:ResetAllCombatData()
end
--returns the current active segment
@@ -89,7 +90,7 @@ function segmentClass:adicionar_overall(combatObject)
for index, combat in ipairs(Details.tabela_historico.tabelas) do
combat.overall_added = false
end
segmentClass:resetar_overall()
segmentClass:ResetOverallData()
end
end
end
@@ -201,7 +202,7 @@ function Details:CanAddCombatToOverall (tabela)
end
--raid boss - flag 0x1
if (bit.band(Details.overall_flag, 0x1) ~= 0) then
if (bitBand(Details.overall_flag, 0x1) ~= 0) then
if (tabela.is_boss and tabela.instance_type == "raid" and not tabela.is_pvp) then
if (tabela:GetCombatTime() >= 30) then
return true
@@ -210,28 +211,28 @@ function Details:CanAddCombatToOverall (tabela)
end
--raid trash - flag 0x2
if (bit.band(Details.overall_flag, 0x2) ~= 0) then
if (bitBand(Details.overall_flag, 0x2) ~= 0) then
if (tabela.is_trash and tabela.instance_type == "raid") then
return true
end
end
--dungeon boss - flag 0x4
if (bit.band(Details.overall_flag, 0x4) ~= 0) then
if (bitBand(Details.overall_flag, 0x4) ~= 0) then
if (tabela.is_boss and tabela.instance_type == "party" and not tabela.is_pvp) then
return true
end
end
--dungeon trash - flag 0x8
if (bit.band(Details.overall_flag, 0x8) ~= 0) then
if (bitBand(Details.overall_flag, 0x8) ~= 0) then
if ((tabela.is_trash or tabela.is_mythic_dungeon_trash) and tabela.instance_type == "party") then
return true
end
end
--any combat
if (bit.band(Details.overall_flag, 0x10) ~= 0) then
if (bitBand(Details.overall_flag, 0x10) ~= 0) then
return true
end
@@ -245,7 +246,7 @@ end
---add the combat to the segment table, check adding to overall
---@param combatObject combat
function segmentClass:adicionar(combatObject)
function segmentClass:AddCombat(combatObject)
---@type combat[]
local segmentTable = self.tabelas
---@type number
@@ -263,7 +264,7 @@ function segmentClass:adicionar(combatObject)
end
--add to the first index of the segment table
tinsert(segmentTable, 1, combatObject)
table.insert(segmentTable, 1, combatObject)
--count boss tries
---@type string
@@ -354,9 +355,11 @@ function segmentClass:adicionar(combatObject)
end
--remove
thirdCombat = tremove(segmentTable, 3)
Details:DestroyCombat(thirdCombat)
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
local combatObjectRemoved = table.remove(segmentTable, 3)
if (combatObjectRemoved) then
Details:DestroyCombat(thirdCombat)
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
end
end
end
end
@@ -365,9 +368,9 @@ function segmentClass:adicionar(combatObject)
--check if the segment table is full
if (#segmentTable > maxSegmentsAllowed) then
---@type combat
local combatObjectRemoved
local combatObjectToBeRemoved
---@type number
local segmentIdRemoved
local segmentIdToBeRemoved
--verify if the last combat is a boss and if there's more bosses with the same bossId in the segment table
--then check which combat has the least amount of elapsed time and remove it
@@ -396,33 +399,36 @@ function segmentClass:adicionar(combatObject)
end
if (shorterCombatObject) then
combatObjectRemoved = shorterCombatObject
segmentIdRemoved = shorterSegmentId
combatObjectToBeRemoved = shorterCombatObject
segmentIdToBeRemoved = shorterSegmentId
end
end
--if couldn't find a boss to remove, then remove the oldest segment
if (not combatObjectRemoved) then
combatObjectRemoved = segmentTable[#segmentTable]
segmentIdRemoved = #segmentTable
if (not combatObjectToBeRemoved) then
combatObjectToBeRemoved = segmentTable[#segmentTable]
segmentIdToBeRemoved = #segmentTable
end
--check time machine
for _, actorObject in combatObjectRemoved:GetContainer(DETAILS_ATTRIBUTE_DAMAGE):ListActors() do
for _, actorObject in combatObjectToBeRemoved:GetContainer(DETAILS_ATTRIBUTE_DAMAGE):ListActors() do
if (actorObject.timeMachine) then
actorObject:DesregistrarNaTimeMachine()
end
end
for _, actorObject in combatObjectRemoved:GetContainer(DETAILS_ATTRIBUTE_HEAL):ListActors() do
for _, actorObject in combatObjectToBeRemoved:GetContainer(DETAILS_ATTRIBUTE_HEAL):ListActors() do
if (actorObject.timeMachine) then
actorObject:DesregistrarNaTimeMachine()
end
end
--remove it
combatObjectRemoved = tremove(segmentTable, segmentIdRemoved)
Details:DestroyCombat(combatObjectRemoved)
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
---@type combat
local combatObjectRemoved = table.remove(segmentTable, segmentIdToBeRemoved)
if (combatObjectRemoved) then
Details:DestroyCombat(combatObjectRemoved)
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
end
end
--update the combat shown on all instances
@@ -462,7 +468,7 @@ function Details:SetOverallResetOptions(resetOnNewBoss, resetOnNewChallenge, res
Details.overall_clear_pvp = resetOnNewPVP
end
function segmentClass:resetar_overall()
function segmentClass:ResetOverallData()
Details:CloseBreakdownWindow()
Details:DestroyCombat(Details.tabela_overall)
@@ -487,7 +493,7 @@ function segmentClass:resetar_overall()
Details:ClockPluginTickOnSegment()
end
function segmentClass:resetar()
function segmentClass:ResetAllCombatData()
if (Details.bosswindow) then
Details.bosswindow:Reset()
end
+5 -5
View File
@@ -761,7 +761,7 @@
local zoneName, zoneType = GetInstanceInfo()
if (not Details.tabela_vigente.discard_segment and (zoneType == "none" or tempo_do_combate >= Details.minimum_combat_time or not Details.tabela_historico.tabelas[1])) then
--combat accepted
Details.tabela_historico:adicionar(Details.tabela_vigente) --move a tabela atual para dentro do histrico
Details.tabela_historico:AddCombat(Details.tabela_vigente) --move a tabela atual para dentro do histrico
if (Details.tabela_vigente.is_boss) then
if (IsInRaid()) then
local cleuID = Details.tabela_vigente.is_boss.id
@@ -1933,7 +1933,7 @@
no:SetPoint("bottomleft", panel, "bottomleft", 30, 10)
no:InstallCustomTexture (nil, nil, nil, nil, true)
local yes = Details.gump:CreateButton(panel, function() panel:Hide(); Details.tabela_historico:resetar() end, 90, 20, Loc ["STRING_YES"])
local yes = Details.gump:CreateButton(panel, function() panel:Hide(); Details.tabela_historico:ResetAllCombatData() end, 90, 20, Loc ["STRING_YES"])
yes:SetPoint("bottomright", panel, "bottomright", -30, 10)
yes:InstallCustomTexture (nil, nil, nil, nil, true)
end
@@ -1943,14 +1943,14 @@
function Details:CheckForAutoErase (mapid)
if (Details.last_instance_id ~= mapid) then
Details.tabela_historico:resetar_overall()
Details.tabela_historico:ResetOverallData()
if (Details.segments_auto_erase == 2) then
--ask
Details:ScheduleTimer("AutoEraseConfirm", 1)
elseif (Details.segments_auto_erase == 3) then
--erase
Details.tabela_historico:resetar()
Details.tabela_historico:ResetAllCombatData()
end
else
if (_tempo > Details.last_instance_time + 21600) then --6 hours
@@ -1959,7 +1959,7 @@
Details:ScheduleTimer("AutoEraseConfirm", 1)
elseif (Details.segments_auto_erase == 3) then
--erase
Details.tabela_historico:resetar()
Details.tabela_historico:ResetAllCombatData()
end
end
end
+10 -10
View File
@@ -1001,7 +1001,7 @@
mob ["PARTIAL_ABSORB_AMT"] = mob ["PARTIAL_ABSORB_AMT"] + absorbed
mob ["ABSORB_AMT"] = mob ["ABSORB_AMT"] + absorbed
else
--adicionar aos hits sem absorbs
--add aos hits sem absorbs
overall ["FULL_HIT"] = overall ["FULL_HIT"] + 1
overall ["FULL_HIT_AMT"] = overall ["FULL_HIT_AMT"] + amount
mob ["FULL_HIT"] = mob ["FULL_HIT"] + 1
@@ -1428,7 +1428,7 @@
mob ["PARTIAL_ABSORB_AMT"] = mob ["PARTIAL_ABSORB_AMT"] + absorbed
mob ["ABSORB_AMT"] = mob ["ABSORB_AMT"] + absorbed
else
--adicionar aos hits sem absorbs
--add aos hits sem absorbs
overall ["FULL_HIT"] = overall ["FULL_HIT"] + 1
overall ["FULL_HIT_AMT"] = overall ["FULL_HIT_AMT"] + amount
mob ["FULL_HIT"] = mob ["FULL_HIT"] + 1
@@ -1976,7 +1976,7 @@
local este_jogador, meu_dono = healing_cache [who_serial]
if (not este_jogador) then --pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_heal_container:PegarCombatente (who_serial, who_name, who_flags, true)
if (not meu_dono and who_flags and who_serial ~= "") then --se no for um pet, adicionar no cache
if (not meu_dono and who_flags and who_serial ~= "") then --se no for um pet, add no cache
healing_cache [who_serial] = este_jogador
end
end
@@ -2379,7 +2379,7 @@
local este_jogador, meu_dono = healing_cache [who_serial]
if (not este_jogador) then --pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_heal_container:PegarCombatente (who_serial, who_name, who_flags, true)
if (not meu_dono and who_flags and who_serial ~= "") then --se no for um pet, adicionar no cache
if (not meu_dono and who_flags and who_serial ~= "") then --se no for um pet, add no cache
healing_cache [who_serial] = este_jogador
end
end
@@ -3788,7 +3788,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
local este_jogador, meu_dono = misc_cache [who_name]
if (not este_jogador) then --pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
if (not meu_dono) then --se no for um pet, adicionar no cache
if (not meu_dono) then --se no for um pet, add no cache
misc_cache [who_name] = este_jogador
end
end
@@ -3896,7 +3896,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
local este_jogador, meu_dono = misc_cache [who_name]
if (not este_jogador) then --pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
if (not meu_dono) then --se no for um pet, adicionar no cache
if (not meu_dono) then --se no for um pet, add no cache
misc_cache [who_name] = este_jogador
end
end
@@ -4115,7 +4115,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
local thisPlayer, meu_dono = misc_cache [targetName]
if (not thisPlayer) then --pode ser um desconhecido ou um pet
thisPlayer, meu_dono, sourceName = _current_misc_container:PegarCombatente (targetSerial, targetName, targetFlags, true)
if (not meu_dono) then --se no for um pet, adicionar no cache
if (not meu_dono) then --se no for um pet, add no cache
misc_cache [targetName] = thisPlayer
end
end
@@ -4825,7 +4825,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
if(not _detalhes.is_in_battleground and _detalhes.overall_clear_pvp) then
_detalhes.tabela_historico:resetar_overall()
_detalhes.tabela_historico:ResetOverallData()
end
_detalhes.is_in_battleground = true
@@ -4868,7 +4868,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (not _detalhes.is_in_arena) then
if (_detalhes.overall_clear_pvp) then
_detalhes.tabela_historico:resetar_overall()
_detalhes.tabela_historico:ResetOverallData()
end
--reset spec cache if broadcaster requested
if (_detalhes.streamer_config.reset_spec_cache) then
@@ -5340,7 +5340,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes:Msg("(debug) found schedule overall data clean up.")
end
_detalhes.schedule_remove_overall = false
_detalhes.tabela_historico:resetar_overall()
_detalhes.tabela_historico:ResetOverallData()
end
if (_detalhes.wipe_called and false) then --disabled
+4 -4
View File
@@ -1342,7 +1342,7 @@
--2 = reset data
elseif (Details.minimap.onclick_what_todo == 2) then
Details.tabela_historico:resetar()
Details.tabela_historico:ResetAllCombatData()
--3 = show hide windows
elseif (Details.minimap.onclick_what_todo == 3) then
@@ -1367,7 +1367,7 @@
GameCooltip:SetOption("TextSize", 10)
--reset
GameCooltip:AddMenu (1, Details.tabela_historico.resetar, true, nil, nil, Loc ["STRING_ERASE_DATA"], nil, true)
GameCooltip:AddMenu (1, Details.tabela_historico.ResetAllCombatData, true, nil, nil, Loc ["STRING_ERASE_DATA"], nil, true)
GameCooltip:AddIcon ([[Interface\COMMON\VOICECHAT-MUTED]], 1, 1, 14, 14)
GameCooltip:AddLine("$div")
@@ -1456,12 +1456,12 @@
end
elseif (Details.hotcorner_topleft.onclick_what_todo == 2) then
Details.tabela_historico:resetar()
Details.tabela_historico:ResetAllCombatData()
end
end
local quickclick_func1 = function(frame, button)
Details.tabela_historico:resetar()
Details.tabela_historico:ResetAllCombatData()
end
local quickclick_func2 = function(frame, button)
+2 -2
View File
@@ -1,5 +1,5 @@
--parei (20/11) declarando o header, precisa agora modificar a config do header quando atualizar
--fazer uma função para alterar a config header.columns para adicionar ou remover attributos
--fazer uma função para alterar a config header.columns para add ou remover attributos
--próximo: ao criar uma janela AllInOne, precisa criar uma nova instancia no Details!
--na tabela de configuração precisa dizer que é uma all in one e o details vai chamar esse arquivo pra atualizar
@@ -7,7 +7,7 @@
--(ainda aqui) parei atualizando o height da titlebar
--proximo passo: atualizar o resto das propriedade da title bar
--fazer as funcções para setar os valores na titleBar
--verificar se precisa adicionar funcções no mixin dos bottões como SetTexture, SetVertexColor
--verificar se precisa add funcções no mixin dos bottões como SetTexture, SetVertexColor
--tem que fazer a função de ShowWindow() e ToggleWindows()
--fazer a criação do header e fazer o header ser redirecionado (aumentar ou diminuir o tamanho by dragging)
+3 -3
View File
@@ -8981,13 +8981,13 @@ end
gameCooltip:AddLine(Loc["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, Details.font_sizes.menus, Details.font_faces.menus)
gameCooltip:AddIcon([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "orange")
gameCooltip:AddMenu(1, Details.tabela_historico.resetar_overall)
gameCooltip:AddMenu(1, Details.tabela_historico.ResetOverallData)
gameCooltip:AddLine("$div", nil, 1, nil, -5, -11)
gameCooltip:AddLine(Loc["STRING_ERASE_DATA"], nil, 1, "white", nil, Details.font_sizes.menus, Details.font_faces.menus)
gameCooltip:AddIcon([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red")
gameCooltip:AddMenu(1, Details.tabela_historico.resetar)
gameCooltip:AddMenu(1, Details.tabela_historico.ResetAllCombatData)
show_anti_overlap(self.instance, self, "top")
@@ -9720,7 +9720,7 @@ function gump:CriaCabecalho (baseframe, instancia)
end
else
if (not Details.disable_reset_button) then
Details.tabela_historico:resetar()
Details.tabela_historico:ResetAllCombatData()
else
Details:Msg(Loc["STRING_OPTIONS_DISABLED_RESET"])
end
+5 -5
View File
@@ -28,7 +28,7 @@ function _detalhes:OpenWelcomeWindow()
window:SetScript("OnMouseDown", function() window:StartMoving() end)
window:SetScript("OnMouseUp", function() window:StopMovingOrSizing() end)
window:SetScript("OnHide", function()
_detalhes.tabela_historico:resetar()
_detalhes.tabela_historico:ResetAllCombatData()
if (DetailsFramework.IsClassicWow()) then
local new_instance = Details:GetWindow (1)
@@ -321,7 +321,7 @@ local window_openned_at = time()
local instance1 = Details:GetInstance(1)
local instance2 = Details:GetInstance(2)
_detalhes.tabela_historico:resetar()
_detalhes.tabela_historico:ResetAllCombatData()
if (fixedParameter == 1) then --latin
if (instance1 and instance1:IsEnabled()) then
@@ -1043,7 +1043,7 @@ local window_openned_at = time()
local update_frame_alert = CreateFrame("frame", nil, window)
update_frame_alert:SetScript("OnShow", function()
_detalhes.tabela_historico:resetar()
_detalhes.tabela_historico:ResetAllCombatData()
created_test_bars = 0
_detalhes.zone_type = "pvp"
@@ -1297,7 +1297,7 @@ local window_openned_at = time()
local group_frame_alert = CreateFrame("frame", nil, window)
group_frame_alert:SetScript("OnShow", function()
_detalhes.tabela_historico:resetar()
_detalhes.tabela_historico:ResetAllCombatData()
created_test_bars = 0
end)
@@ -1342,7 +1342,7 @@ local window_openned_at = time()
local tooltip_frame = CreateFrame("frame", nil, window)
tooltip_frame:SetScript("OnShow", function(self)
_detalhes.tabela_historico:resetar()
_detalhes.tabela_historico:ResetAllCombatData()
created_test_bars = 0
local current_combat = _detalhes:GetCombat("current")
+4
View File
@@ -35,6 +35,10 @@ Details222.Mixins.ActorMixin = {
elseif (containerType == "crowdcontrol") then
---@cast actor actorutility
return actor.cc_done_spells
elseif (containerType == "dispel") then
---@cast actor actorutility
return actor.dispell_spells
end
end,
+1 -1
View File
@@ -673,7 +673,7 @@ function DetailsMythicPlusFrame.MythicDungeonStarted()
local name, groupType, difficultyID, difficult = GetInstanceInfo()
if (groupType == "party" and Details.overall_clear_newchallenge) then
Details.historico:resetar_overall()
Details.historico:ResetOverallData()
Details:Msg("overall data are now reset.")
if (Details.debug) then
+1 -1
View File
@@ -180,7 +180,7 @@ function SlashCmdList.DETAILS (msg, editbox)
Details:WipeConfig()
elseif (command == Loc ["STRING_SLASH_RESET"] or command == Loc ["STRING_SLASH_RESET_ALIAS1"] or command == "reset") then
Details.tabela_historico:resetar()
Details.tabela_historico:ResetAllCombatData()
elseif (command == Loc ["STRING_SLASH_DISABLE"] or command == "disable") then
Details:CaptureSet(false, "damage", true)
+1 -1
View File
@@ -593,7 +593,7 @@ function Details:StartMeUp()
torghastTracker:SetScript("OnEvent", function(self, event, level, towerType)
if (level == 1) then
if (Details.overall_clear_newtorghast) then
Details.historico:resetar_overall()
Details.historico:ResetOverallData()
Details:Msg("overall data are now reset.") --localize-me
end
end