From 627ab9b91cb747a3924e6280eaa2871161c08fc1 Mon Sep 17 00:00:00 2001 From: Tercio Date: Tue, 5 Nov 2013 18:47:19 -0200 Subject: [PATCH] - Added debuff uptime at misc attribute. - Added API: instance:InstanceMsg (text, _, textcolor, icontexture, iconcoords). - Added API: container:ActorCallFunction (func, args) run func for all actors. - Added member .diff on combat.is_boss table, represent the dificult of raid. - Disabled captures on Attribute menu now have darkness effect. - Fixed some tainted which were triggered when dragging a windows. - Started of major code cleanup. --- boot.lua | 6 +- classes/classe_combate.lua | 154 ++-- classes/classe_damage.lua | 66 ++ classes/classe_energy.lua | 56 ++ classes/classe_heal.lua | 59 ++ classes/classe_instancia.lua | 36 +- classes/classe_others.lua | 412 ++++++++++ classes/classe_others_habilidade.lua | 46 +- classes/container_combatentes.lua | 8 + core/control.lua | 13 +- core/meta.lua | 1089 ++++++++++---------------- core/parser.lua | 221 ++++-- core/util.lua | 1 + framework/framework.lua | 9 + functions/attributes.lua | 37 +- gumps/janela_principal.lua | 185 +++-- images/atributos_icones_misc.tga | Bin 27083 -> 30961 bytes locales/Details-enUS.lua | 4 +- locales/Details-ptBR.lua | 4 +- startup.lua | 4 +- 20 files changed, 1507 insertions(+), 903 deletions(-) diff --git a/boot.lua b/boot.lua index e141bda4..2cfad589 100644 --- a/boot.lua +++ b/boot.lua @@ -8,9 +8,9 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.userversion = "v1.5.3" - _detalhes.version = "Alpha 009" - _detalhes.realversion = 9 + _detalhes.userversion = "v1.6.0" + _detalhes.version = "Alpha 010" + _detalhes.realversion = 10 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> initialization stuff diff --git a/classes/classe_combate.lua b/classes/classe_combate.lua index 9051c9be..49360e0d 100644 --- a/classes/classe_combate.lua +++ b/classes/classe_combate.lua @@ -135,7 +135,8 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...) dispell = 0, --> armazena quantos dispell esta pessoa recebeu dead = 0, --> armazena quantas vezes essa pessia morreu cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou - buff_uptime = 0 --> armazena quantos cooldowns a raid usou + buff_uptime = 0, --> armazena quantos cooldowns a raid usou + debuff_uptime = 0 --> armazena quantos cooldowns a raid usou } } @@ -155,7 +156,8 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...) dispell = 0, --> armazena quantos dispell esta pessoa recebeu dead = 0, --> armazena quantas vezes essa oessia morreu cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou - buff_uptime = 0 + buff_uptime = 0, + debuff_uptime = 0 } } @@ -266,94 +268,31 @@ function _detalhes.clear:c_combate (tabela_combate) tabela_combate.shadow = nil end -combate.__add = function (combate1, combate2) - --> add dano - for index, actor_T2 in _ipairs (combate2[1]._ActorTable) do - local actor_T1 = combate1[1]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true) - actor_T1 = actor_T1 + actor_T2 - end - --> add heal - for index, actor_T2 in _ipairs (combate2[2]._ActorTable) do - local actor_T1 = combate1[2]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true) - actor_T1 = actor_T1 + actor_T2 - end - --> add energy - for index, actor_T2 in _ipairs (combate2[3]._ActorTable) do - local actor_T1 = combate1[3]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true) - actor_T1 = actor_T1 + actor_T2 - end - --> add misc - for index, actor_T2 in _ipairs (combate2[4]._ActorTable) do - local actor_T1 = combate1[4]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true) - actor_T1 = actor_T1 + actor_T2 - end - --> aumenta o total - combate1.totals[1] = combate1.totals[1] - combate2.totals[1] - combate1.totals[2] = combate1.totals[2] - combate2.totals[2] - - combate1.totals[3].mana = combate1.totals[3].mana - combate2.totals[3].mana - combate1.totals[3].e_rage = combate1.totals[3].e_rage - combate2.totals[3].e_rage - combate1.totals[3].e_energy = combate1.totals[3].e_energy - combate2.totals[3].e_energy - combate1.totals[3].runepower = combate1.totals[3].runepower - combate2.totals[3].runepower - - combate1.totals[4].cc_break = combate1.totals[4].cc_break - combate2.totals[4].cc_break - combate1.totals[4].ress = combate1.totals[4].ress - combate2.totals[4].ress - combate1.totals[4].interrupt = combate1.totals[4].interrupt - combate2.totals[4].interrupt - combate1.totals[4].dispell = combate1.totals[4].dispell - combate2.totals[4].dispell - combate1.totals[4].dead = combate1.totals[4].dead - combate2.totals[4].dead - combate1.totals[4].cooldowns_defensive = combate1.totals[4].cooldowns_defensive - combate2.totals[4].cooldowns_defensive - - combate1.totals_grupo[1] = combate1.totals_grupo[1] - combate2.totals_grupo[1] - combate1.totals_grupo[2] = combate1.totals_grupo[2] - combate2.totals_grupo[2] - - combate1.totals_grupo[3].mana = combate1.totals_grupo[3].mana - combate2.totals_grupo[3].mana - combate1.totals_grupo[3].e_rage = combate1.totals_grupo[3].e_rage - combate2.totals_grupo[3].e_rage - combate1.totals_grupo[3].e_energy = combate1.totals_grupo[3].e_energy - combate2.totals_grupo[3].e_energy - combate1.totals_grupo[3].runepower = combate1.totals_grupo[3].runepower - combate2.totals_grupo[3].runepower - - combate1.totals_grupo[4].cc_break = combate1.totals_grupo[4].cc_break - combate2.totals_grupo[4].cc_break - combate1.totals_grupo[4].ress = combate1.totals_grupo[4].ress - combate2.totals_grupo[4].ress - combate1.totals_grupo[4].interrupt = combate1.totals_grupo[4].interrupt - combate2.totals_grupo[4].interrupt - combate1.totals_grupo[4].dispell = combate1.totals_grupo[4].dispell - combate2.totals_grupo[4].dispell - combate1.totals_grupo[4].dead = combate1.totals_grupo[4].dead - combate2.totals_grupo[4].dead - combate1.totals_grupo[4].cooldowns_defensive = combate1.totals_grupo[4].cooldowns_defensive - combate2.totals_grupo[4].cooldowns_defensive - --> aumenta o tempo - combate1.start_time = combate1.start_time - (combate2.end_time - combate2.start_time) - --> frags - for fragName, fragAmount in pairs (combate2.frags) do - if (fragAmount) then - if (combate1.frags [fragName]) then - combate1.frags [fragName] = combate1.frags [fragName] + fragAmount - else - combate1.frags [fragName] = fragAmount - end - end - end - combate1.frags_need_refresh = true - - return combate1 - -end - combate.__sub = function (overall, combate) - --> foreach no dano - for index, classe_damage in _ipairs (combate[1]._ActorTable) do + --> subtrai no damage + for index, classe_damage in _ipairs (combate [1]._ActorTable) do + local nome = classe_damage.nome local no_overall = overall[1]._ActorTable [overall[1]._NameIndexTable [nome]] + + --> ator do damage no_overall = no_overall - classe_damage + --> alvos local alvos = classe_damage.targets for index, alvo in _ipairs (alvos._ActorTable) do local alvo_overall = no_overall.targets._ActorTable [no_overall.targets._NameIndexTable [alvo.nome]] alvo_overall = alvo_overall - alvo end + --> habilidades local habilidades = classe_damage.spell_tables for _spellid, habilidade in _pairs (habilidades._ActorTable) do local habilidade_overall = no_overall.spell_tables._ActorTable [_spellid] habilidade_overall = habilidade_overall - habilidade + --> alvos das habilidades local alvos = habilidade.targets for index, alvo in _ipairs (alvos._ActorTable) do local alvo_overall = habilidade_overall.targets._ActorTable [habilidade_overall.targets._NameIndexTable [alvo.nome]] @@ -566,6 +505,75 @@ combate.__sub = function (overall, combate) return overall end +combate.__add = function (combate1, combate2) + --> add dano + for index, actor_T2 in _ipairs (combate2[1]._ActorTable) do + local actor_T1 = combate1[1]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true) + actor_T1 = actor_T1 + actor_T2 + end + --> add heal + for index, actor_T2 in _ipairs (combate2[2]._ActorTable) do + local actor_T1 = combate1[2]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true) + actor_T1 = actor_T1 + actor_T2 + end + --> add energy + for index, actor_T2 in _ipairs (combate2[3]._ActorTable) do + local actor_T1 = combate1[3]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true) + actor_T1 = actor_T1 + actor_T2 + end + --> add misc + for index, actor_T2 in _ipairs (combate2[4]._ActorTable) do + local actor_T1 = combate1[4]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true) + actor_T1 = actor_T1 + actor_T2 + end + --> aumenta o total + combate1.totals[1] = combate1.totals[1] - combate2.totals[1] + combate1.totals[2] = combate1.totals[2] - combate2.totals[2] + + combate1.totals[3].mana = combate1.totals[3].mana - combate2.totals[3].mana + combate1.totals[3].e_rage = combate1.totals[3].e_rage - combate2.totals[3].e_rage + combate1.totals[3].e_energy = combate1.totals[3].e_energy - combate2.totals[3].e_energy + combate1.totals[3].runepower = combate1.totals[3].runepower - combate2.totals[3].runepower + + combate1.totals[4].cc_break = combate1.totals[4].cc_break - combate2.totals[4].cc_break + combate1.totals[4].ress = combate1.totals[4].ress - combate2.totals[4].ress + combate1.totals[4].interrupt = combate1.totals[4].interrupt - combate2.totals[4].interrupt + combate1.totals[4].dispell = combate1.totals[4].dispell - combate2.totals[4].dispell + combate1.totals[4].dead = combate1.totals[4].dead - combate2.totals[4].dead + combate1.totals[4].cooldowns_defensive = combate1.totals[4].cooldowns_defensive - combate2.totals[4].cooldowns_defensive + + combate1.totals_grupo[1] = combate1.totals_grupo[1] - combate2.totals_grupo[1] + combate1.totals_grupo[2] = combate1.totals_grupo[2] - combate2.totals_grupo[2] + + combate1.totals_grupo[3].mana = combate1.totals_grupo[3].mana - combate2.totals_grupo[3].mana + combate1.totals_grupo[3].e_rage = combate1.totals_grupo[3].e_rage - combate2.totals_grupo[3].e_rage + combate1.totals_grupo[3].e_energy = combate1.totals_grupo[3].e_energy - combate2.totals_grupo[3].e_energy + combate1.totals_grupo[3].runepower = combate1.totals_grupo[3].runepower - combate2.totals_grupo[3].runepower + + combate1.totals_grupo[4].cc_break = combate1.totals_grupo[4].cc_break - combate2.totals_grupo[4].cc_break + combate1.totals_grupo[4].ress = combate1.totals_grupo[4].ress - combate2.totals_grupo[4].ress + combate1.totals_grupo[4].interrupt = combate1.totals_grupo[4].interrupt - combate2.totals_grupo[4].interrupt + combate1.totals_grupo[4].dispell = combate1.totals_grupo[4].dispell - combate2.totals_grupo[4].dispell + combate1.totals_grupo[4].dead = combate1.totals_grupo[4].dead - combate2.totals_grupo[4].dead + combate1.totals_grupo[4].cooldowns_defensive = combate1.totals_grupo[4].cooldowns_defensive - combate2.totals_grupo[4].cooldowns_defensive + --> aumenta o tempo + combate1.start_time = combate1.start_time - (combate2.end_time - combate2.start_time) + --> frags + for fragName, fragAmount in pairs (combate2.frags) do + if (fragAmount) then + if (combate1.frags [fragName]) then + combate1.frags [fragName] = combate1.frags [fragName] + fragAmount + else + combate1.frags [fragName] = fragAmount + end + end + end + combate1.frags_need_refresh = true + + return combate1 + +end + function _detalhes:UpdateCombat() _tempo = _detalhes._tempo end diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 24db20c2..b38324c6 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -2205,6 +2205,72 @@ function atributo_damage:Iniciar (iniciar) end end +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> core functions + + --> diminui o total das tabelas do combate + function atributo_damage:subtract_total (combat_table) + combat_table.totals [class_type] = combat_table.totals [class_type] - self.total + if (self.grupo) then + combat_table.totals_grupo [class_type] = combat_table.totals_grupo [class_type] - self.total + end + end + + --> restaura a tabela de last event + function atributo_damage:r_last_events_table (actor) + if (not actor) then + actor = self + end + actor.last_events_table = _detalhes:CreateActorLastEventTable() + end + + --> restaura e liga o ator com a sua shadow durante a inicialização + function atributo_damage:r_connect_shadow (actor) + + if (not actor) then + actor = self + end + + local overall_dano = _detalhes.tabela_overall [1] + local shadow = overall_dano._ActorTable [overall_dano._NameIndexTable [actor.nome]] + + --> constroi a shadow se não tiver uma + if (not shadow) then + shadow = overall_dano:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true) + shadow.classe = actor.classe + shadow.start_time = time() + shadow.end_time = time() + end + + --> reconstruir o container do friendly fire shadow + for index, friendlyfire in _ipairs (actor.friendlyfire._ActorTable) do + local ff_shadow = shadow.friendlyfire:PegarCombatente (friendlyfire.serial, friendlyfire.nome, friendlyfire.flag_original, true) + friendlyfire.shadow = ff_shadow + --nao reconstroi as habilidades aqui + end + + --> aplica a meta e indexes + _detalhes.refresh:r_atributo_damage (actor, shadow) + + --> soma os valores + shadow = shadow + actor + + --> reconstroi o container de alvos + for index, alvo in _ipairs (actor.targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets) + end + + --> reconstroi o container de habilidades + for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do + _detalhes.refresh:r_habilidade_dano (habilidade, shadow.spell_tables) + for index, alvo in _ipairs (habilidade.targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade.targets.shadow) + end + end + + return shadow + end + function atributo_damage:FF_funcao_de_criacao (_, _, link) local tabela = _setmetatable ({}, _detalhes) --> mudei de _detalhes para atributo_damage tabela.total = 0 diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index 55f01aa8..0c3d993f 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -858,6 +858,62 @@ function atributo_energy:Iniciar (iniciar) return false --retorna se o dps esta aberto ou fechado para este jogador end +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> core functions + + --> subtract total from a combat table + function atributo_energy:subtract_total (combat_table) + combat_table.totals [class_type].mana = combat_table.totals [class_type].mana - self.mana + combat_table.totals [class_type].e_rage = combat_table.totals [class_type].e_rage - self.e_rage + combat_table.totals [class_type].e_energy = combat_table.totals [class_type].e_energy - self.e_energy + combat_table.totals [class_type].runepower = combat_table.totals [class_type].runepower - self.runepower + + if (self.grupo) then + combat_table.totals_grupo [class_type].mana = combat_table.totals_grupo [class_type].mana - self.mana + combat_table.totals_grupo [class_type].e_rage = combat_table.totals_grupo [class_type].e_rage - self.e_rage + combat_table.totals_grupo [class_type].e_energy = combat_table.totals_grupo [class_type].e_energy - self.e_energy + combat_table.totals_grupo [class_type].runepower = combat_table.totals_grupo [class_type].runepower - self.runepower + end + end + + --> restaura e liga o ator com a sua shadow durante a inicialização + function atributo_energy:r_connect_shadow (actor) + + if (not actor) then + actor = self + end + + local overall_energy = _detalhes.tabela_overall [3] + local shadow = overall_energy._ActorTable [overall_energy._NameIndexTable [actor.nome]] + + --> constroi a shadow se não tiver uma + if (not shadow) then + shadow = overall_energy:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true) + shadow.classe = actor.classe + end + + --> aplica a meta e indexes + _detalhes.refresh:r_atributo_energy (actor, shadow) + + --> soma os valores + shadow = shadow + actor + + --> reconstroi o container de alvos + for index, alvo in _ipairs (actor.targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets) + end + + --> reconstroi o container de habilidades + for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do + _detalhes.refresh:r_habilidade_e_energy (habilidade, shadow.spell_tables) + for index, alvo in _ipairs (habilidade.targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade.targets.shadow) + end + end + + return shadow + end + function atributo_energy:ColetarLixo (lastevent) return _detalhes:ColetarLixo (class_type, lastevent) end diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index 421fe8fa..342910db 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -1577,6 +1577,65 @@ function atributo_heal:Iniciar (iniciar) end end +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> core functions + + --> subtract total from a combat table + function atributo_heal:subtract_total (combat_table) + combat_table.totals [class_type] = combat_table.totals [class_type] - self.total + if (self.grupo) then + combat_table.totals_grupo [class_type] = combat_table.totals_grupo [class_type] - self.total + end + end + + --> restaura a tabela de last event + function atributo_heal:r_last_events_table (actor) + if (not actor) then + actor = self + end + actor.last_events_table = _detalhes:CreateActorLastEventTable() + end + + --> restaura e liga o ator com a sua shadow durante a inicialização + function atributo_heal:r_connect_shadow (actor) + + if (not actor) then + actor = self + end + + local overall_cura = _detalhes.tabela_overall [2] + local shadow = overall_cura._ActorTable [overall_cura._NameIndexTable [actor.nome]] + + --> constroi a shadow se não tiver uma + if (not shadow) then + shadow = overall_cura:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true) + shadow.classe = actor.classe + shadow.start_time = time() + shadow.end_time = time() + end + + --> aplica a meta e indexes + _detalhes.refresh:r_atributo_heal (actor, shadow) + + --> soma os valores + shadow = shadow + actor + + --> reconstroi o container de alvos + for index, alvo in _ipairs (actor.targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets) + end + + --> reconstroi o container de habilidades + for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do + _detalhes.refresh:r_habilidade_cura (habilidade, shadow.spell_tables) + for index, alvo in _ipairs (habilidade.targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade.targets.shadow) + end + end + + return shadow + end + function atributo_heal:ColetarLixo (lastevent) return _detalhes:ColetarLixo (class_type, lastevent) end diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index 5470f277..e9988de8 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -1080,8 +1080,10 @@ function _detalhes:Freeze (instancia) gump:Fade (instancia, "in", nil, "barras") end - instancia.freeze_icon:Show() - instancia.freeze_texto:Show() + instancia:InstanceMsg (Loc ["STRING_FREEZE"], [[Interface\CHARACTERFRAME\Disconnect-Icon]], "silver") + + --instancia.freeze_icon:Show() + --instancia.freeze_texto:Show() local width = instancia:GetSize() instancia.freeze_texto:SetWidth (width-64) @@ -1095,8 +1097,10 @@ function _detalhes:UnFreeze (instancia) instancia = self end - instancia.freeze_icon:Hide() - instancia.freeze_texto:Hide() + self:InstanceMsg (false) + + --instancia.freeze_icon:Hide() + --instancia.freeze_texto:Hide() instancia.freezed = false if (not _detalhes.initializing) then @@ -1366,11 +1370,15 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini if (sub_atributo ~= meu_sub_atributo or _detalhes.initializing or iniciando_instancia or atributo_changed) then + --instancia.sub_atributo_last [meu_atributo] = sub_atributo instancia.sub_atributo_last [meu_atributo] = meu_sub_atributo --print ("atributo last changed:",meu_atributo, "->", meu_sub_atributo) instancia.sub_atributo = sub_atributo + --print (instancia.sub_atributo_last [meu_atributo]) + --print (instancia.sub_atributo) + if (instancia.atributo == 5) then --> custom instancia:ChangeIcon() end @@ -1446,15 +1454,29 @@ function _detalhes:MontaAtributosOption (instancia, func) local CoolTip = _G.GameCooltip local p = 0.125 --> 32/256 + local gindex = 1 for i = 1, atributos[0] do --> [0] armazena quantos atributos existem + CoolTip:AddMenu (1, func, nil, i, nil, atributos.lista[i], nil, true) CoolTip:AddIcon ("Interface\\AddOns\\Details\\images\\atributos_icones", 1, 1, 20, 20, p*(i-1), p*(i), 0, 1) + local options = sub_atributos [i].lista + for o = 1, atributos [i] do - CoolTip:AddMenu (2, func, nil, i, o, options[o], nil, true) - CoolTip:AddIcon (icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1) + if (_detalhes:CaptureIsEnabled ( _detalhes.atributos_capture [gindex] )) then + CoolTip:AddMenu (2, func, nil, i, o, options[o], nil, true) + CoolTip:AddIcon (icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1) + else + CoolTip:AddLine (options[o], nil, 2, .5, .5, .5, 1) + CoolTip:AddMenu (2, func, nil, i, o) + CoolTip:AddIcon (icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1, {.3, .3, .3, 1}) + end + + gindex = gindex + 1 end + CoolTip:SetLastSelected (2, i, instancia.sub_atributo_last [i]) + end --> custom @@ -1466,7 +1488,7 @@ function _detalhes:MontaAtributosOption (instancia, func) CoolTip:AddMenu (2, func, nil, 5, index, custom.name, custom.icon, true) end - if (not instancia.sub_atributo_last [5]) then + if (#_detalhes.custom == 0) then CoolTip:SetLastSelected (2, 5, 1) else CoolTip:SetLastSelected (2, 5, instancia.sub_atributo_last [5]+1) diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 544c7436..75b840d4 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -310,6 +310,27 @@ function atributo_misc:ReportSingleBuffUptimeLine (misc_actor, instancia) return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true}) end +function atributo_misc:ReportSingleDebuffUptimeLine (misc_actor, instancia) + + local barra = misc_actor.minha_barra + + local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEBUFFUPTIME"] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me + reportar [#reportar+1] = "> " .. Loc ["STRING_SPELLS"] .. ":" + + for i = 1, GameCooltip:GetNumLines() do + local texto_left, texto_right = GameCooltip:GetText (i) + + if (texto_left and texto_right) then + texto_left = texto_left:gsub (("|T(.*)|t "), "") + reportar [#reportar+1] = " "..texto_left.." "..texto_right.."" + elseif (i ~= 1) then + reportar [#reportar+1] = "> " .. Loc ["STRING_TARGETS"] .. ":" + end + end + + return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true}) +end + function atributo_misc:DeadAtualizarBarra (morte, qual_barra, colocacao, instancia) morte ["dead"] = true --> marca que esta tabela é uma tabela de mortes, usado no controla na hora de montar o tooltip @@ -383,6 +404,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo keyName = "cooldowns_defensive" elseif (sub_atributo == 7) then --> BUFF UPTIME keyName = "buff_uptime" + elseif (sub_atributo == 8) then --> DEBUFF UPTIME + keyName = "debuff_uptime" end else keyName = exportar.key @@ -410,6 +433,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo keyName = "cooldowns_defensive" elseif (sub_atributo == 7) then --> BUFF UPTIME keyName = "buff_uptime" + elseif (sub_atributo == 8) then --> DEBUFF UPTIME + keyName = "debuff_uptime" end end @@ -789,6 +814,8 @@ function atributo_misc:ToolTip (instancia, numero, barra) return self:ToolTipDefensiveCooldowns (instancia, numero, barra) elseif (instancia.sub_atributo == 7) then --> buff uptime return self:ToolTipBuffUptime (instancia, numero, barra) + elseif (instancia.sub_atributo == 8) then --> debuff uptime + return self:ToolTipDebuffUptime (instancia, numero, barra) end end --> tooltip locals @@ -948,6 +975,111 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra) return true end +local UnitReaction = UnitReaction + +function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN" + + if (in_or_out == "DEBUFF_UPTIME_OUT") then + local combat = _detalhes.tabela_vigente + local misc_container = combat [4]._ActorTable + + for _, actor in _ipairs (misc_container) do + if (actor.debuff_uptime) then + for spellid, spell in _pairs (actor.debuff_uptime_spell_tables._ActorTable) do + if (spell.actived and spell.actived_at) then + spell.uptime = spell.uptime + _detalhes._tempo - spell.actived_at + actor.debuff_uptime = actor.debuff_uptime + _detalhes._tempo - spell.actived_at --> token = actor misc object + spell.actived = false + spell.actived_at = nil + end + end + end + end + + return + end + + if (_IsInRaid()) then + + local checked = {} + + for raidIndex = 1, _GetNumGroupMembers() do + local his_target = _UnitGUID ("raid"..raidIndex.."target") + if (his_target and not checked [his_target] and UnitReaction ("raid"..raidIndex.."target", "player") <= 4) then + + checked [his_target] = true + + for debuffIndex = 1, 40 do + local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("raid"..raidIndex.."target", debuffIndex) + if (name and unitCaster) then + local playerName, realmName = _UnitName (unitCaster) + if (realmName and realmName ~= "") then + playerName = playerName .. "-" .. realmName + end + + _detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("raid"..raidIndex.."target"), 0x842, spellid, name, in_or_out) + end + end + end + end + + elseif (_IsInGroup()) then + + local checked = {} + + for raidIndex = 1, _GetNumGroupMembers()-1 do + local his_target = _UnitGUID ("party"..raidIndex.."target") + if (his_target and not checked [his_target] and UnitReaction ("party"..raidIndex.."target", "player") <= 4) then + + checked [his_target] = true + + for debuffIndex = 1, 40 do + local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex) + if (name and unitCaster) then + local playerName, realmName = _UnitName (unitCaster) + if (realmName and realmName ~= "") then + playerName = playerName .. "-" .. realmName + end + + _detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("party"..raidIndex.."target"), 0x842, spellid, name, in_or_out) + end + end + end + end + + local his_target = _UnitGUID ("playertarget") + + if (his_target and not checked [his_target] and UnitReaction ("playertarget", "player") <= 4) then + for debuffIndex = 1, 40 do + local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex) + if (name and unitCaster) then + local playerName, realmName = _UnitName (unitCaster) + if (realmName and realmName ~= "") then + playerName = playerName .. "-" .. realmName + end + _detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("playertarget"), 0x842, spellid, name, in_or_out) + end + end + end + + else + local his_target = _UnitGUID ("playertarget") + + if (his_target and UnitReaction ("playertarget", "player") <= 4) then + for debuffIndex = 1, 40 do + local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex) + if (name and unitCaster) then + local playerName, realmName = _UnitName (unitCaster) + if (realmName and realmName ~= "") then + playerName = playerName .. "-" .. realmName + end + _detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("playertarget"), 0x842, spellid, name, in_or_out) + end + end + end + end +end + function _detalhes:CatchRaidBuffUptime (in_or_out) if (_IsInRaid()) then @@ -1027,6 +1159,63 @@ local Sort2Reverse = function (a, b) return a[2] < b[2] end +function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra) + + local owner = self.owner + if (owner and owner.classe) then + r, g, b = unpack (_detalhes.class_colors [owner.classe]) + else + r, g, b = unpack (_detalhes.class_colors [self.classe]) + end + + local meu_total = self ["debuff_uptime"] + local minha_tabela = self.debuff_uptime_spell_tables._ActorTable + +--> habilidade usada para interromper + local debuffs_usados = {} + + local _combat_time = instancia.showing:GetCombatTime() + + for _spellid, _tabela in _pairs (minha_tabela) do + debuffs_usados [#debuffs_usados+1] = {_spellid, _tabela.uptime} + end + --_table_sort (debuffs_usados, Sort2Reverse) + _table_sort (debuffs_usados, _detalhes.Sort2) + + GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12) + GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_Safeguard]], 1, 1, 14, 14, 0.9375, 0.078125, 0.078125, 0.953125) + GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha) + + if (#debuffs_usados > 0) then + for i = 1, _math_min (30, #debuffs_usados) do + local esta_habilidade = debuffs_usados[i] + + if (esta_habilidade[2] > 0) then + local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1]) + + local minutos, segundos = _math_floor (esta_habilidade[2]/60), _math_floor (esta_habilidade[2]%60) + if (esta_habilidade[2] >= _combat_time) then + GameCooltip:AddLine (nome_magia..": ", minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray") + GameCooltip:AddStatusBar (100, nil, 1, 0, 1, .3, false) + elseif (minutos > 0) then + GameCooltip:AddLine (nome_magia..": ", minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)") + GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3) + else + GameCooltip:AddLine (nome_magia..": ", segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)") + GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3) + end + + GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) --0.03125, 0.96875, 0.03125, 0.96875 + end + end + else + GameCooltip:AddLine (Loc ["STRING_NO_SPELL"]) + end + + return true + +end + function atributo_misc:ToolTipBuffUptime (instancia, numero, barra) local owner = self.owner @@ -1601,6 +1790,163 @@ function atributo_misc:Iniciar (iniciar) return false --retorna se o dps esta aberto ou fechado para este jogador end + +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> core functions + +local sub_list = {"cc_break", "ress", "interrupt", "cooldowns_defensive", "dispell", "dead"} + + --> subtract total from a combat table + function atributo_misc:subtract_total (combat_table) + for _, sub_attribute in _ipairs (sub_list) do + if (self [sub_attribute]) then + combat_table.totals [class_type][sub_attribute] = combat_table.totals [class_type][sub_attribute] - self [sub_attribute] + if (self.grupo) then + combat_table.totals_grupo [class_type][sub_attribute] = combat_table.totals_grupo [class_type][sub_attribute] - self [sub_attribute] + end + end + end + end + + --> restaura e liga o ator com a sua shadow durante a inicialização + function atributo_misc:r_connect_shadow (actor) + + if (not actor) then + actor = self + end + + local overall_misc = _detalhes.tabela_overall [4] + local shadow = overall_misc._ActorTable [overall_misc._NameIndexTable [actor.nome]] + + if (not actor.nome) then + actor.nome = "unknown" + end + + --> constroi a shadow se não tiver uma + if (not shadow) then + shadow = overall_misc:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true) + shadow.classe = actor.classe + end + + --> cooldowns + if (actor.cooldowns_defensive) then + if (not shadow.cooldowns_defensive_targets) then + shadow.cooldowns_defensive = 0 + shadow.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) + shadow.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) + end + end + --> buff uptime + if (actor.buff_uptime) then + if (not shadow.buff_uptime_spell_targets) then + shadow.buff_uptime = 0 + shadow.buff_uptime_spell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total + shadow.buff_uptime_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper + end + end + --> debuff uptime + if (actor.debuff_uptime) then + if (not shadow.debuff_uptime_spell_targets) then + shadow.debuff_uptime = 0 + shadow.debuff_uptime_spell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total + shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper + end + end + --> interrupt + if (actor.interrupt) then + if (not shadow.interrupt_targets) then + shadow.interrupt = 0 + shadow.interrupt_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total + shadow.interrupt_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper + shadow.interrompeu_oque = {} + end + end + --> ress + if (actor.ress) then + if (not shadow.ress_targets) then + shadow.ress = 0 + shadow.ress_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total + shadow.ress_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper + end + end + --> dispell + if (actor.dispell) then + if (not shadow.dispell_targets) then + shadow.dispell = 0 + shadow.dispell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total + shadow.dispell_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper + shadow.dispell_oque = {} + end + end + --> cc break + if (actor.cc_break) then + if (not shadow.cc_break) then + shadow.cc_break = 0 + shadow.cc_break_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total + shadow.cc_break_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper + shadow.cc_break_oque = {} + end + end + + --> aplica a meta e indexes + _detalhes.refresh:r_atributo_misc (actor, shadow) + + --> soma os valores + shadow = shadow + actor + + if (actor.interrupt) then + for _, este_alvo in _ipairs (actor.interrupt_targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.interrupt_targets) + end + end + if (actor.buff_uptime) then + for _, este_alvo in _ipairs (actor.buff_uptime_targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.buff_uptime_targets) + end + end + if (actor.debuff_uptime) then + for _, este_alvo in _ipairs (actor.debuff_uptime_targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.debuff_uptime_targets) + end + end + if (actor.cooldowns_defensive) then + for _, este_alvo in _ipairs (actor.cooldowns_defensive_targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.cooldowns_defensive_targets) + end + end + if (actor.ress) then + for _, este_alvo in _ipairs (actor.ress_targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.ress_targets) + end + end + if (actor.dispell) then + for _, este_alvo in _ipairs (actor.dispell_targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.dispell_targets) + end + end + if (actor.cc_break) then + for _, este_alvo in _ipairs (actor.cc_break_targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.cc_break_targets) + end + end + + --> reconstroi o container de alvos + local t = {"cc_break", "ress", "interrupt", "cooldowns_defensive", "dispell", "buff_uptime", "debuff_uptime"} + for index, sub_attribute in _ipairs (t) do + if (actor [sub_attribute]) then + for spellid, habilidade in _pairs (actor [sub_attribute .. "_spell_tables"]._ActorTable) do + _detalhes.refresh:r_habilidade_misc (habilidade, shadow [sub_attribute .. "_spell_tables"]) + for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do + _detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow) + end + end + end + end + + return shadow + + end + function atributo_misc:ColetarLixo (lastevent) return _detalhes:ColetarLixo (class_type, lastevent) end @@ -1632,6 +1978,12 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow) _detalhes.refresh:r_container_habilidades (este_jogador.buff_uptime_spell_tables, shadow.buff_uptime_spell_tables) end + --> refresh buff uptime + if (este_jogador.debuff_uptime_targets) then + _detalhes.refresh:r_container_combatentes (este_jogador.debuff_uptime_targets, shadow.debuff_uptime_targets) + _detalhes.refresh:r_container_habilidades (este_jogador.debuff_uptime_spell_tables, shadow.debuff_uptime_spell_tables) + end + --> refresh cooldowns defensive if (este_jogador.cooldowns_defensive_targets) then _detalhes.refresh:r_container_combatentes (este_jogador.cooldowns_defensive_targets, shadow.cooldowns_defensive_targets) @@ -1675,6 +2027,12 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow) _detalhes.refresh:r_container_habilidades (este_jogador.buff_uptime_spell_tables, -1) end + --> refresh debuff uptime + if (este_jogador.debuff_uptime_targets) then + _detalhes.refresh:r_container_combatentes (este_jogador.debuff_uptime_targets, -1) + _detalhes.refresh:r_container_habilidades (este_jogador.debuff_uptime_spell_tables, -1) + end + --> refresh ressers if (este_jogador.ress_targets) then _detalhes.refresh:r_container_combatentes (este_jogador.ress_targets, -1) @@ -1718,6 +2076,11 @@ function _detalhes.clear:c_atributo_misc (este_jogador) _detalhes.clear:c_container_habilidades (este_jogador.buff_uptime_spell_tables) end + if (este_jogador.debuff_uptime_targets) then + _detalhes.clear:c_container_combatentes (este_jogador.debuff_uptime_targets) + _detalhes.clear:c_container_habilidades (este_jogador.debuff_uptime_spell_tables) + end + if (este_jogador.ress_targets) then _detalhes.clear:c_container_combatentes (este_jogador.ress_targets) _detalhes.clear:c_container_habilidades (este_jogador.ress_spell_tables) @@ -1840,6 +2203,51 @@ atributo_misc.__add = function (shadow, tabela2) end + if (tabela2.debuff_uptime) then + + if (not shadow.debuff_uptime) then + shadow.debuff_uptime = 0 + shadow.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total + shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas + end + + shadow.debuff_uptime = shadow.debuff_uptime + tabela2.debuff_uptime + + if ( not (shadow.shadow and tabela2.shadow) ) then + --_detalhes.tabela_overall.totals[4]["cooldowns_defensive"] = _detalhes.tabela_overall.totals[4]["cooldowns_defensive"] + tabela2.cooldowns_defensive + + --if (tabela2.grupo) then + -- _detalhes.tabela_overall.totals_grupo[4]["cooldowns_defensive"] = _detalhes.tabela_overall.totals_grupo[4]["cooldowns_defensive"] + tabela2.cooldowns_defensive + --end + end + + for index, alvo in _ipairs (tabela2.debuff_uptime_targets._ActorTable) do + local alvo_shadow = shadow.debuff_uptime_targets:PegarCombatente (alvo.serial, alvo.nome, alvo.flag_original, true) + alvo_shadow.total = alvo_shadow.total + alvo.total + end + + for spellid, habilidade in _pairs (tabela2.debuff_uptime_spell_tables._ActorTable) do + local habilidade_shadow = shadow.debuff_uptime_spell_tables:PegaHabilidade (spellid, true, nil, true) + + for index, alvo in _ipairs (habilidade.targets._ActorTable) do + local alvo_shadow = habilidade_shadow.targets:PegarCombatente (alvo.serial, alvo.nome, alvo.flag_original, true) + alvo_shadow.total = alvo_shadow.total + alvo.total + end + + for key, value in _pairs (habilidade) do + if (_type (value) == "number") then + if (key ~= "id") then + if (not habilidade_shadow [key]) then + habilidade_shadow [key] = 0 + end + habilidade_shadow [key] = habilidade_shadow [key] + value + end + end + end + end + + end + if (tabela2.cooldowns_defensive) then if (not shadow.cooldowns_defensive) then @@ -2066,6 +2474,10 @@ atributo_misc.__sub = function (tabela1, tabela2) tabela1.buff_uptime = tabela1.buff_uptime - tabela2.buff_uptime end + if (tabela1.debuff_uptime and tabela2.debuff_uptime) then + tabela1.debuff_uptime = tabela1.debuff_uptime - tabela2.debuff_uptime + end + if (tabela1.cooldowns_defensive and tabela2.cooldowns_defensive) then tabela1.cooldowns_defensive = tabela1.cooldowns_defensive - tabela2.cooldowns_defensive end diff --git a/classes/classe_others_habilidade.lua b/classes/classe_others_habilidade.lua index 826b5b1f..df7229ea 100644 --- a/classes/classe_others_habilidade.lua +++ b/classes/classe_others_habilidade.lua @@ -23,9 +23,10 @@ function habilidade_misc:NovaTabela (id, link, token) --aqui eu n targets = container_combatentes:NovoContainer (container_misc_target) } - if (token == "BUFF_UPTIME") then + if (token == "BUFF_UPTIME" or token == "DEBUFF_UPTIME") then _newMiscSpell.uptime = 0 _newMiscSpell.actived = false + _newMiscSpell.activedamt = 0 elseif (token == "SPELL_INTERRUPT") then _newMiscSpell.interrompeu_oque = {} elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then @@ -46,7 +47,7 @@ end function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spellName) --alvo:AddQuantidade (1) - if (spellID == "BUFF") then + if (spellID == "BUFF_OR_DEBUFF") then if (spellName == "COOLDOWN") then self.counter = self.counter + 1 @@ -59,11 +60,11 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel end alvo.total = alvo.total + 1 - elseif (spellName == "BUFF_UPTIME_IN") then + elseif (spellName == "BUFF_UPTIME_IN" or spellName == "DEBUFF_UPTIME_IN") then self.actived = true + self.activedamt = self.activedamt + 1 self.actived_at = _detalhes._tempo - --print ("in",self.uptime) - + elseif (spellName == "BUFF_UPTIME_REFRESH") then if (self.actived_at and self.actived) then self.uptime = self.uptime + _detalhes._tempo - self.actived_at @@ -76,7 +77,18 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel if (self.shadow) then return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName) end - --print ("refresh",self.uptime) + + elseif (spellName == "DEBUFF_UPTIME_REFRESH") then + if (self.actived_at and self.actived) then + self.uptime = self.uptime + _detalhes._tempo - self.actived_at + token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object + end + self.actived_at = _detalhes._tempo + self.actived = true + + if (self.shadow) then + return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName) + end elseif (spellName == "BUFF_UPTIME_OUT") then if (self.actived_at and self.actived) then @@ -90,7 +102,25 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName) end - --print ("out",self.uptime) + elseif (spellName == "DEBUFF_UPTIME_OUT") then + if (self.actived_at and self.actived) then + self.uptime = self.uptime + _detalhes._tempo - self.actived_at + token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object + end + + self.activedamt = self.activedamt - 1 + + if (self.activedamt == 0) then + self.actived = false + self.actived_at = nil + else + self.actived_at = _detalhes._tempo + end + + if (self.shadow) then + return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName) + end + end elseif (token == "SPELL_INTERRUPT") then @@ -207,7 +237,7 @@ habilidade_misc.__sub = function (tabela1, tabela2) --interrupts & cooldowns tabela1.counter = tabela1.counter - tabela2.counter - --buff uptime + --buff uptime ou debuff uptime if (tabela1.uptime and tabela2.uptime) then tabela1.uptime = tabela1.uptime - tabela2.uptime end diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index dd42602e..524aef78 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -66,6 +66,7 @@ function container_combatentes:NovoContainer (tipo_do_container, combatTable, co end local function get_class_ (novo_objeto, nome, flag) + local _, engClass = _UnitClass (nome) if (engClass) then @@ -461,6 +462,13 @@ function container_combatentes:FuncaoDeCriacao (tipo) end end +--> chama a função para ser executada em todos os atores +function container_combatentes:ActorCallFunction (funcao, ...) + for index, actor in _ipairs (self._ActorTable) do + funcao (nil, actor, ...) + end +end + function container_combatentes:remapear() local mapa = self._NameIndexTable local conteudo = self._ActorTable diff --git a/core/control.lua b/core/control.lua index 328e0834..3ec4254a 100644 --- a/core/control.lua +++ b/core/control.lua @@ -90,7 +90,7 @@ if (serial) then - local ZoneName, _, _, _, _, _, _, ZoneMapID = _GetInstanceInfo() + local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo() local BossIds = _detalhes:GetBossIds (ZoneMapID) if (BossIds) then @@ -148,7 +148,8 @@ name = _detalhes:GetBossName (ZoneMapID, BossIndex), zone = ZoneName, mapid = ZoneMapID, - encounter = _detalhes:GetBossName (ZoneMapID, BossIndex) + encounter = _detalhes:GetBossName (ZoneMapID, BossIndex), + diff = DifficultyID } _detalhes:SendEvent ("COMBAT_BOSS_FOUND", nil, _detalhes.tabela_vigente.is_boss.index, _detalhes.tabela_vigente.is_boss.name) return _detalhes.tabela_vigente.is_boss @@ -163,7 +164,7 @@ --try to get the encounter name after the encounter (can be called during the combat as well) function _detalhes:FindBoss() - local ZoneName, _, _, _, _, _, _, ZoneMapID = _GetInstanceInfo() + local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo() local BossIds = _detalhes:GetBossIds (ZoneMapID) if (BossIds) then @@ -184,7 +185,9 @@ name =_detalhes:GetBossName (ZoneMapID, BossIndex), zone = ZoneName, mapid = ZoneMapID, - encounter = _detalhes:GetBossName (ZoneMapID, BossIndex)} + encounter = _detalhes:GetBossName (ZoneMapID, BossIndex), + diff = DifficultyID + } end end end @@ -277,6 +280,7 @@ end _detalhes:CatchRaidBuffUptime ("BUFF_UPTIME_IN") + _detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_IN") _detalhes:UptadeRaidMembersCache() _detalhes:HaveOneCurrentInstance() @@ -291,6 +295,7 @@ end _detalhes:CatchRaidBuffUptime ("BUFF_UPTIME_OUT") + _detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_OUT") --> pega a zona do jogador e vê se foi uma luta contra um Boss -- identifica se a luta foi com um boss if (not _detalhes.tabela_vigente.is_boss) then diff --git a/core/meta.lua b/core/meta.lua index 6638be61..d94b274f 100644 --- a/core/meta.lua +++ b/core/meta.lua @@ -46,763 +46,502 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> core - local function ReconstroiMapa (tabela) - local mapa = {} - for i = 1, #tabela._ActorTable do - mapa [tabela._ActorTable[i].nome] = i - end - tabela._NameIndexTable = mapa - end - - local function ReduzTotal (_actor, _combate) - if (_actor.tipo == class_type_dano) then - _combate.totals [class_type_dano] = _combate.totals [class_type_dano] - _actor.total - if (_actor.grupo) then - _combate.totals_grupo [class_type_dano] = _combate.totals_grupo [class_type_dano] - _actor.total + --> reconstrói o mapa do container + local function ReconstroiMapa (tabela) + local mapa = {} + for i = 1, #tabela._ActorTable do + mapa [tabela._ActorTable[i].nome] = i end - - elseif (_actor.tipo == class_type_cura) then - _combate.totals [class_type_cura] = _combate.totals [class_type_cura] - _actor.total - if (_actor.grupo) then - _combate.totals_grupo [class_type_cura] = _combate.totals_grupo [class_type_cura] - _actor.total - end - - elseif (_actor.tipo == class_type_e_energy) then - _combate.totals [_actor.tipo] ["mana"] = _combate.totals [_actor.tipo] ["mana"] - _actor.mana - _combate.totals [_actor.tipo] ["e_rage"] = _combate.totals [_actor.tipo] ["e_rage"] - _actor.e_rage - _combate.totals [_actor.tipo] ["e_energy"] = _combate.totals [_actor.tipo] ["e_energy"] - _actor.e_energy - _combate.totals [_actor.tipo] ["runepower"] = _combate.totals [_actor.tipo] ["runepower"] - _actor.runepower - - if (_actor.grupo) then - _combate.totals_grupo [_actor.tipo] ["runepower"] = _combate.totals_grupo [_actor.tipo] ["runepower"] - _actor.runepower - _combate.totals_grupo [_actor.tipo] ["e_energy"] = _combate.totals_grupo [_actor.tipo] ["e_energy"] - _actor.e_energy - _combate.totals_grupo [_actor.tipo] ["e_rage"] = _combate.totals_grupo [_actor.tipo] ["e_rage"] - _actor.e_rage - _combate.totals_grupo [_actor.tipo] ["mana"] = _combate.totals_grupo [_actor.tipo] ["mana"] - _actor.mana - end - - elseif (_actor.tipo == class_type_misc) then - if (_actor.cc_break) then - _combate.totals [_actor.tipo] ["cc_break"] = _combate.totals [_actor.tipo] ["cc_break"] - _actor.cc_break - if (_actor.grupo) then - _combate.totals_grupo [_actor.tipo] ["cc_break"] = _combate.totals_grupo [_actor.tipo] ["cc_break"] - _actor.cc_break - end - end - if (_actor.ress) then - _combate.totals [_actor.tipo] ["ress"] = _combate.totals [_actor.tipo] ["ress"] - _actor.ress - if (_actor.grupo) then - _combate.totals_grupo [_actor.tipo] ["ress"] = _combate.totals_grupo [_actor.tipo] ["ress"] - _actor.ress - end - end - if (_actor.interrupt) then - _combate.totals [_actor.tipo] ["interrupt"] = _combate.totals [_actor.tipo] ["interrupt"] - _actor.interrupt - if (_actor.grupo) then - _combate.totals_grupo [_actor.tipo] ["interrupt"] = _combate.totals_grupo [_actor.tipo] ["interrupt"] - _actor.interrupt - end - end - if (_actor.cooldowns_defensive) then - _combate.totals [_actor.tipo] ["cooldowns_defensive"] = _combate.totals [_actor.tipo] ["cooldowns_defensive"] - _actor.cooldowns_defensive - if (_actor.grupo) then - _combate.totals_grupo [_actor.tipo] ["cooldowns_defensive"] = _combate.totals_grupo [_actor.tipo] ["cooldowns_defensive"] - _actor.cooldowns_defensive - end - end - if (_actor.dispell) then - _combate.totals [_actor.tipo] ["dispell"] = _combate.totals [_actor.tipo] ["dispell"] - _actor.dispell - if (_actor.grupo) then - _combate.totals_grupo [_actor.tipo] ["dispell"] = _combate.totals_grupo [_actor.tipo] ["dispell"] - _actor.dispell - end - end - if (_actor.dead) then - _combate.totals [_actor.tipo] ["dead"] = _combate.totals [_actor.tipo] ["dead"] - _actor.dead - if (_actor.grupo) then - _combate.totals_grupo [_actor.tipo] ["dead"] = _combate.totals_grupo [_actor.tipo] ["dead"] - _actor.dead - end - end - --buff uptime não precisa - end - end - - function _detalhes:RestauraMetaTables() - - ----------------------------//containers principais - _detalhes.refresh:r_container_pets (_detalhes.tabela_pets) - _detalhes.refresh:r_historico (_detalhes.tabela_historico) - - ----------------------------//combates - - local tabela_overall = _detalhes.tabela_overall - - local overall_dano = tabela_overall [class_type_dano] - local overall_cura = tabela_overall [class_type_cura] - local overall_energy = tabela_overall [class_type_e_energy] - local overall_misc = tabela_overall [class_type_misc] - - local tabelas_de_combate = {} - for _, _tabela in _ipairs (_detalhes.tabela_historico.tabelas) do - tabelas_de_combate [#tabelas_de_combate+1] = _tabela - _tabela.__call = _detalhes.call_combate + tabela._NameIndexTable = mapa end - --> restaura last_events_table - local _primeiro_combate = _detalhes.tabela_historico.tabelas[1] - if (_primeiro_combate) then - local _container_damage =_primeiro_combate [1] - local _container_heal = _primeiro_combate [2] + --> reaplica indexes e metatables + function _detalhes:RestauraMetaTables() - for _, jogador in ipairs (_container_damage._ActorTable) do - --> remover a tabela de last events - jogador.last_events_table = _detalhes:CreateActorLastEventTable() - end - for _, jogador in ipairs (_container_heal._ActorTable) do - --> remover a tabela de last events - jogador.last_events_table = _detalhes:CreateActorLastEventTable() - end - end - local _segundo_combate = _detalhes.tabela_historico.tabelas[2] - if (_segundo_combate) then - local _container_damage = _segundo_combate [1] - local _container_heal = _segundo_combate [2] - - for _, jogador in ipairs (_container_damage._ActorTable) do - --> remover a tabela de last events - jogador.last_events_table = _detalhes:CreateActorLastEventTable() - end - for _, jogador in ipairs (_container_heal._ActorTable) do - --> remover a tabela de last events - jogador.last_events_table = _detalhes:CreateActorLastEventTable() - end - end + --> container de pets e histórico + _detalhes.refresh:r_container_pets (_detalhes.tabela_pets) + _detalhes.refresh:r_historico (_detalhes.tabela_historico) - tabela_overall.end_time = _tempo - tabela_overall.start_time = _tempo - - if (#tabelas_de_combate > 0) then - for index, combate in _ipairs (tabelas_de_combate) do - - combate.hasSaved = true - - if (combate.end_time and combate.start_time) then - tabela_overall.start_time = tabela_overall.start_time - (combate.end_time - combate.start_time) + --> tabelas dos combates + local combate_overall = _detalhes.tabela_overall + local overall_dano = combate_overall [class_type_dano] --> damage atalho + local overall_cura = combate_overall [class_type_cura] --> heal atalho + local overall_energy = combate_overall [class_type_e_energy] --> energy atalho + local overall_misc = combate_overall [class_type_misc] --> misc atalho + + local tabelas_do_historico = _detalhes.tabela_historico.tabelas --> atalho + + --> recupera meta function + for _, combat_table in _ipairs (tabelas_do_historico) do + combat_table.__call = _detalhes.call_combate end + + --> tempo padrao do overall + combate_overall.start_time = _tempo + combate_overall.end_time = _tempo - _detalhes.refresh:r_combate (combate, tabela_overall) - - _detalhes.refresh:r_container_combatentes (combate [class_type_dano], overall_dano) - _detalhes.refresh:r_container_combatentes (combate [class_type_cura], overall_cura) - _detalhes.refresh:r_container_combatentes (combate [class_type_e_energy], overall_energy) - _detalhes.refresh:r_container_combatentes (combate [class_type_misc], overall_misc) - - local todos_atributos = {combate [class_type_dano]._ActorTable, - combate [class_type_cura]._ActorTable, - combate [class_type_e_energy]._ActorTable, - combate [class_type_misc]._ActorTable} - - for class_type, atributo in _ipairs (todos_atributos) do - for _, esta_classe in _ipairs (atributo) do + --> inicia a recuperação das tabelas e montagem do overall + if (#tabelas_do_historico > 0) then + for index, combate in _ipairs (tabelas_do_historico) do + + combate.hasSaved = true + + --> aumenta o tempo do combate do overall + if (combate.end_time and combate.start_time) then + combate_overall.start_time = combate_overall.start_time - (combate.end_time - combate.start_time) + end - local nome = esta_classe.nome - esta_classe.displayName = nome:gsub (("%-.*"), "") + --> recupera a meta e indexes da tabela do combate + _detalhes.refresh:r_combate (combate, combate_overall) - local shadow - - if (class_type == class_type_dano) then + --> recupera a meta e indexes dos 4 container + _detalhes.refresh:r_container_combatentes (combate [class_type_dano], overall_dano) + _detalhes.refresh:r_container_combatentes (combate [class_type_cura], overall_cura) + _detalhes.refresh:r_container_combatentes (combate [class_type_e_energy], overall_energy) + _detalhes.refresh:r_container_combatentes (combate [class_type_misc], overall_misc) - shadow = overall_dano._ActorTable [overall_dano._NameIndexTable[nome]] - if (not shadow) then - shadow = overall_dano:PegarCombatente (esta_classe.serial, esta_classe.nome, esta_classe.flag_original, true) - shadow.classe = esta_classe.classe - shadow.start_time = _tempo - shadow.end_time = _tempo - end - -- Reconstruir o container do friendly fire shadow aqui - for index, friendlyfire in _ipairs (esta_classe.friendlyfire._ActorTable) do - --> criando o objeto do friendly fire na shadow - local ff_shadow = shadow.friendlyfire:PegarCombatente (friendlyfire.serial, friendlyfire.nome, friendlyfire.flag_original, true) - friendlyfire.shadow = ff_shadow + --> tabela com os 4 tabelas de jogadores + local todos_atributos = {combate [class_type_dano]._ActorTable, combate [class_type_cura]._ActorTable, combate [class_type_e_energy]._ActorTable, combate [class_type_misc]._ActorTable} + + for class_type, atributo in _ipairs (todos_atributos) do + for _, esta_classe in _ipairs (atributo) do + + local nome = esta_classe.nome + esta_classe.displayName = nome:gsub (("%-.*"), "") + + local shadow + + if (class_type == class_type_dano) then + shadow = atributo_damage:r_connect_shadow (esta_classe) + + elseif (class_type == class_type_cura) then + shadow = atributo_heal:r_connect_shadow (esta_classe) + + elseif (class_type == class_type_e_energy) then + shadow = atributo_energy:r_connect_shadow (esta_classe) + + elseif (class_type == class_type_misc) then + shadow = atributo_misc:r_connect_shadow (esta_classe) + + end + + shadow:FazLinkagem (esta_classe) end - _detalhes.refresh:r_atributo_damage (esta_classe, shadow) - shadow = shadow + esta_classe - - elseif (class_type == class_type_cura) then - shadow = overall_cura._ActorTable [overall_cura._NameIndexTable[nome]] - if (not shadow) then - shadow = overall_cura:PegarCombatente (esta_classe.serial, esta_classe.nome, esta_classe.flag_original, true) - shadow.classe = esta_classe.classe - shadow.start_time = _tempo - shadow.end_time = _tempo - end - _detalhes.refresh:r_atributo_heal (esta_classe, shadow) - shadow = shadow + esta_classe - - elseif (class_type == class_type_e_energy) then - shadow = overall_energy._ActorTable [overall_energy._NameIndexTable[nome]] - if (not shadow) then - shadow = overall_energy:PegarCombatente (esta_classe.serial, esta_classe.nome, esta_classe.flag_original, true) - shadow.classe = esta_classe.classe - end - _detalhes.refresh:r_atributo_energy (esta_classe, shadow) - shadow = shadow + esta_classe - - elseif (class_type == class_type_misc) then + end - shadow = overall_misc._ActorTable [overall_misc._NameIndexTable[nome]] - - if (not shadow) then - shadow = overall_misc:PegarCombatente (esta_classe.serial, esta_classe.nome, esta_classe.flag_original, true) - shadow.classe = esta_classe.classe - end - - if (esta_classe.cooldowns_defensive) then - if (not shadow.cooldowns_defensive_targets) then - shadow.cooldowns_defensive = 0 - shadow.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total - shadow.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper - end - end - - if (esta_classe.buff_uptime) then - if (not shadow.buff_uptime_spell_targets) then - shadow.buff_uptime = 0 - shadow.buff_uptime_spell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total - shadow.buff_uptime_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper - end - end - - if (esta_classe.interrupt) then - if (not shadow.interrupt_targets) then - shadow.interrupt = 0 - shadow.interrupt_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total - shadow.interrupt_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper - shadow.interrompeu_oque = {} - end - end - - if (esta_classe.ress) then - if (not shadow.ress_targets) then - shadow.ress = 0 - shadow.ress_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total - shadow.ress_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper - end - end - - if (esta_classe.dispell) then - if (not shadow.dispell_targets) then - shadow.dispell = 0 - shadow.dispell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total - shadow.dispell_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper - shadow.dispell_oque = {} - end - end - - if (esta_classe.cc_break) then - if (not shadow.cc_break) then - shadow.cc_break = 0 - shadow.cc_break_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total - shadow.cc_break_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper - shadow.cc_break_oque = {} - end - end - - _detalhes.refresh:r_atributo_misc (esta_classe, shadow) - shadow = shadow + esta_classe - - if (esta_classe.interrupt) then - for _, este_alvo in _ipairs (esta_classe.interrupt_targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.interrupt_targets) - end - end - if (esta_classe.buff_uptime) then - for _, este_alvo in _ipairs (esta_classe.buff_uptime_targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.buff_uptime_targets) - end - end - if (esta_classe.cooldowns_defensive) then - for _, este_alvo in _ipairs (esta_classe.cooldowns_defensive_targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.cooldowns_defensive_targets) - end - end - if (esta_classe.ress) then - for _, este_alvo in _ipairs (esta_classe.ress_targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.ress_targets) - end - end - if (esta_classe.dispell) then - for _, este_alvo in _ipairs (esta_classe.dispell_targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.dispell_targets) - end - end - if (esta_classe.cc_break) then - for _, este_alvo in _ipairs (esta_classe.cc_break_targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.cc_break_targets) + --> reconstrói a tabela dos pets + for class_type, atributo in _ipairs (todos_atributos) do + for _, esta_classe in _ipairs (atributo) do + if (esta_classe.ownerName) then --> nome do owner + esta_classe.owner = combate (class_type, esta_classe.ownerName) end end end + + end + --fim + end + + --> restaura last_events_table + local primeiro_combate = tabelas_do_historico [1] --> primeiro combate + if (primeiro_combate) then + primeiro_combate [1]:ActorCallFunction (atributo_damage.r_last_events_table) + primeiro_combate [2]:ActorCallFunction (atributo_heal.r_last_events_table) + end + + local segundo_combate = tabelas_do_historico [2] --> segundo combate + if (segundo_combate) then + segundo_combate [1]:ActorCallFunction (atributo_damage.r_last_events_table) + segundo_combate [2]:ActorCallFunction (atributo_heal.r_last_events_table) + end + + end - shadow:FazLinkagem (esta_classe) + --> limpa indexes, metatables e shadows + function _detalhes:PrepareTablesForSave() + + ----------------------------//overall + + local tabelas_de_combate = {} + + local historico_tabelas = _detalhes.tabela_historico.tabelas or {} + + if (_detalhes.segments_amount_to_save and _detalhes.segments_amount_to_save < _detalhes.segments_amount) then + for i = _detalhes.segments_amount, _detalhes.segments_amount_to_save+1, -1 do + if (_detalhes.tabela_historico.tabelas [i]) then + --_detalhes.tabela_historico.tabelas [i] = nil + table.remove (_detalhes.tabela_historico.tabelas, i) + end + end + end + + --local tabela_overall = _detalhes.tabela_overall + _detalhes.tabela_overall = nil + + local tabela_atual = _detalhes.tabela_vigente or {} + + for _, _tabela in _ipairs (historico_tabelas) do + tabelas_de_combate [#tabelas_de_combate+1] = _tabela + end + + --tabelas_de_combate [#tabelas_de_combate+1] = tabela_atual --não salva mais a atual + --tabelas_de_combate [#tabelas_de_combate+1] = tabela_overall --não salva mais a overall + + --> make sure details database exists + _detalhes_database = _detalhes_database or {} + + for tabela_index, _combate in _ipairs (tabelas_de_combate) do + + --> limpa a tabela do grafico -- clear graphic table + if (_detalhes.clear_graphic) then + _combate.TimeData = {} + end + + local container_dano = _combate [class_type_dano] or {} + local container_cura = _combate [class_type_cura] or {} + local container_e_energy = _combate [class_type_e_energy] or {} + local container_misc = _combate [class_type_misc] or {} + + local todos_atributos = {container_dano, container_cura, container_e_energy, container_misc} + + local IsBossEncounter = _combate.is_boss + if (IsBossEncounter) then + if (_combate.pvp) then + IsBossEncounter = false + end + end + + for class_type, _tabela in _ipairs (todos_atributos) do + + local conteudo = _tabela._ActorTable + + --> Limpa tabelas que não estejam em grupo + + _detalhes.clear_ungrouped = true + + if (_detalhes.clear_ungrouped) then + + local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index + + while (_iter.data) do --serach key: deletar apagar + local can_erase = true + + if (_iter.data.grupo or _iter.data.boss or _iter.data.boss_fight_component or IsBossEncounter) then + can_erase = false + --if (class_type == 1) then + -- print ("SAVE ", _iter.data.nome, tabela_index) + --end + else + local owner = _iter.data.owner + if (owner) then + local owner_actor = _combate (class_type, owner.nome) + if (owner_actor) then + if (owner.grupo or owner.boss or owner.boss_fight_component) then + --if (class_type == 1) then + -- print ("SAVE", _iter.data.nome, "| owner:",_iter.data.owner.nome, tabela_index) + --end + can_erase = false + end + end + else + --if (class_type == 1) then + -- print ("DELETANDO", _iter.data.nome, tabela_index) + --end + end + end + + if (can_erase) then + + if (not _iter.data.owner) then --> pet (not a pet?) + local myself = _iter.data + + if (myself.tipo == class_type_dano or myself.tipo == class_type_cura) then + _combate.totals [myself.tipo] = _combate.totals [myself.tipo] - myself.total + if (myself.grupo) then + _combate.totals_grupo [myself.tipo] = _combate.totals_grupo [myself.tipo] - myself.total + end + elseif (myself.tipo == class_type_e_energy) then + _combate.totals [myself.tipo] ["mana"] = _combate.totals [myself.tipo] ["mana"] - myself.mana + _combate.totals [myself.tipo] ["e_rage"] = _combate.totals [myself.tipo] ["e_rage"] - myself.e_rage + _combate.totals [myself.tipo] ["e_energy"] = _combate.totals [myself.tipo] ["e_energy"] - myself.e_energy + _combate.totals [myself.tipo] ["runepower"] = _combate.totals [myself.tipo] ["runepower"] - myself.runepower + if (myself.grupo) then + _combate.totals_grupo [myself.tipo] ["mana"] = _combate.totals_grupo [myself.tipo] ["mana"] - myself.mana + _combate.totals_grupo [myself.tipo] ["e_rage"] = _combate.totals_grupo [myself.tipo] ["e_rage"] - myself.e_rage + _combate.totals_grupo [myself.tipo] ["e_energy"] = _combate.totals_grupo [myself.tipo] ["e_energy"] - myself.e_energy + _combate.totals_grupo [myself.tipo] ["runepower"] = _combate.totals_grupo [myself.tipo] ["runepower"] - myself.runepower + end + elseif (myself.tipo == class_type_misc) then + if (myself.cc_break) then + _combate.totals [myself.tipo] ["cc_break"] = _combate.totals [myself.tipo] ["cc_break"] - myself.cc_break + if (myself.grupo) then + _combate.totals_grupo [myself.tipo] ["cc_break"] = _combate.totals_grupo [myself.tipo] ["cc_break"] - myself.cc_break + end + end + if (myself.ress) then + _combate.totals [myself.tipo] ["ress"] = _combate.totals [myself.tipo] ["ress"] - myself.ress + if (myself.grupo) then + _combate.totals_grupo [myself.tipo] ["ress"] = _combate.totals_grupo [myself.tipo] ["ress"] - myself.ress + end + end + --> não precisa diminuir o total dos buffs e debuffs + if (myself.cooldowns_defensive) then + _combate.totals [myself.tipo] ["cooldowns_defensive"] = _combate.totals [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive + if (myself.grupo) then + _combate.totals_grupo [myself.tipo] ["cooldowns_defensive"] = _combate.totals_grupo [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive + end + end + if (myself.interrupt) then + _combate.totals [myself.tipo] ["interrupt"] = _combate.totals [myself.tipo] ["interrupt"] - myself.interrupt + if (myself.grupo) then + _combate.totals_grupo [myself.tipo] ["interrupt"] = _combate.totals_grupo [myself.tipo] ["interrupt"] - myself.interrupt + end + end + if (myself.dispell) then + _combate.totals [myself.tipo] ["dispell"] = _combate.totals [myself.tipo] ["dispell"] - myself.dispell + if (myself.grupo) then + _combate.totals_grupo [myself.tipo] ["dispell"] = _combate.totals_grupo [myself.tipo] ["dispell"] - myself.dispell + end + end + if (myself.dead) then + _combate.totals [myself.tipo] ["dead"] = _combate.totals [myself.tipo] ["dead"] - myself.dead + if (myself.grupo) then + _combate.totals_grupo [myself.tipo] ["dead"] = _combate.totals_grupo [myself.tipo] ["dead"] - myself.dead + end + end + end + end + + _table_remove (conteudo, _iter.index) + _iter.cleaned = _iter.cleaned + 1 + _iter.data = conteudo [_iter.index] + else + _iter.index = _iter.index + 1 + _iter.data = conteudo [_iter.index] + end + end + + if (_iter.cleaned > 0) then --> desencargo de consciência, reconstruir o mapa depois de excluir + ReconstroiMapa (_tabela) + end + + end + + for _, esta_classe in _ipairs (conteudo) do + + --> limpa o displayName, não precisa salvar + esta_classe.displayName = nil + esta_classe.owner = nil + + if (class_type == class_type_dano) then + _detalhes.clear:c_atributo_damage (esta_classe) + elseif (class_type == class_type_cura) then + _detalhes.clear:c_atributo_heal (esta_classe) + elseif (class_type == class_type_e_energy) then + _detalhes.clear:c_atributo_energy (esta_classe) + elseif (class_type == class_type_misc) then + _detalhes.clear:c_atributo_misc (esta_classe) + + if (esta_classe.interrupt) then + for _, _alvo in _ipairs (esta_classe.interrupt_targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) + end + end + + if (esta_classe.buff_uptime) then + for _, _alvo in _ipairs (esta_classe.buff_uptime_targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) + end + end + + if (esta_classe.debuff_uptime) then + for _, _alvo in _ipairs (esta_classe.debuff_uptime_targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) + end + end + + if (esta_classe.cooldowns_defensive) then + for _, _alvo in _ipairs (esta_classe.cooldowns_defensive_targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) + end + end + + if (esta_classe.ress) then + for _, _alvo in _ipairs (esta_classe.ress_targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) + end + end + + if (esta_classe.dispell) then + for _, _alvo in _ipairs (esta_classe.dispell_targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) + end + end + + if (esta_classe.cc_break) then + for _, _alvo in _ipairs (esta_classe.cc_break_targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) + end + end + end + if (class_type ~= class_type_misc) then - for _, este_alvo in _ipairs (esta_classe.targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.targets) + for _, _alvo in _ipairs (esta_classe.targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) end for _, habilidade in _pairs (esta_classe.spell_tables._ActorTable) do if (class_type == class_type_dano) then - _detalhes.refresh:r_habilidade_dano (habilidade, shadow.spell_tables) --> passando o container de habilidades + _detalhes.clear:c_habilidade_dano (habilidade) elseif (class_type == class_type_cura) then - _detalhes.refresh:r_habilidade_cura (habilidade, shadow.spell_tables) + _detalhes.clear:c_habilidade_cura (habilidade) elseif (class_type == class_type_e_energy) then - _detalhes.refresh:r_habilidade_e_energy (habilidade, shadow.spell_tables) + _detalhes.clear:c_habilidade_e_energy (habilidade) end - - for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow) + + for _, _alvo in ipairs (habilidade.targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) end end else if (esta_classe.interrupt) then for _, habilidade in _pairs (esta_classe.interrupt_spell_tables._ActorTable) do - _detalhes.refresh:r_habilidade_misc (habilidade, shadow.interrupt_spell_tables) + _detalhes.clear:c_habilidade_misc (habilidade) - for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow) + for _, _alvo in ipairs (habilidade.targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) end end end - + if (esta_classe.buff_uptime) then for _, habilidade in _pairs (esta_classe.buff_uptime_spell_tables._ActorTable) do - _detalhes.refresh:r_habilidade_misc (habilidade, shadow.buff_uptime_spell_tables) + _detalhes.clear:c_habilidade_misc (habilidade) - for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow) + for _, _alvo in ipairs (habilidade.targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) + end + end + end + + if (esta_classe.debuff_uptime) then + for _, habilidade in _pairs (esta_classe.debuff_uptime_spell_tables._ActorTable) do + _detalhes.clear:c_habilidade_misc (habilidade) + + for _, _alvo in ipairs (habilidade.targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) end end end if (esta_classe.cooldowns_defensive) then for _, habilidade in _pairs (esta_classe.cooldowns_defensive_spell_tables._ActorTable) do - _detalhes.refresh:r_habilidade_misc (habilidade, shadow.cooldowns_defensive_spell_tables) + _detalhes.clear:c_habilidade_misc (habilidade) - for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow) + for _, _alvo in ipairs (habilidade.targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) end end end if (esta_classe.ress) then for _, habilidade in _pairs (esta_classe.ress_spell_tables._ActorTable) do - _detalhes.refresh:r_habilidade_misc (habilidade, shadow.ress_spell_tables) + _detalhes.clear:c_habilidade_misc (habilidade) - for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow) + for _, _alvo in ipairs (habilidade.targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) end end end if (esta_classe.dispell) then for _, habilidade in _pairs (esta_classe.dispell_spell_tables._ActorTable) do - _detalhes.refresh:r_habilidade_misc (habilidade, shadow.dispell_spell_tables) + _detalhes.clear:c_habilidade_misc (habilidade) - for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow) + for _, _alvo in ipairs (habilidade.targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) end end end if (esta_classe.cc_break) then for _, habilidade in _pairs (esta_classe.cc_break_spell_tables._ActorTable) do - _detalhes.refresh:r_habilidade_misc (habilidade, shadow.cc_break_spell_tables) + _detalhes.clear:c_habilidade_misc (habilidade) - for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do - _detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow) + for _, _alvo in ipairs (habilidade.targets._ActorTable) do + _detalhes.clear:c_alvo_da_habilidade (_alvo) end end end - end + end end - - --> reconstrói a tabela dos pets - for class_type, atributo in _ipairs (todos_atributos) do - for _, esta_classe in _ipairs (atributo) do - if (esta_classe.ownerName) then --> nome do owner - esta_classe.owner = combate (class_type, esta_classe.ownerName) - end - end - end - - end - end - end - - function _detalhes:PrepareTablesForSave() - - ----------------------------//overall - - local tabelas_de_combate = {} - - local historico_tabelas = _detalhes.tabela_historico.tabelas or {} - - if (_detalhes.segments_amount_to_save and _detalhes.segments_amount_to_save < _detalhes.segments_amount) then - for i = _detalhes.segments_amount, _detalhes.segments_amount_to_save+1, -1 do - if (_detalhes.tabela_historico.tabelas [i]) then - --_detalhes.tabela_historico.tabelas [i] = nil - table.remove (_detalhes.tabela_historico.tabelas, i) - end - end - end - - --local tabela_overall = _detalhes.tabela_overall - _detalhes.tabela_overall = nil - - local tabela_atual = _detalhes.tabela_vigente or {} - - for _, _tabela in _ipairs (historico_tabelas) do - tabelas_de_combate [#tabelas_de_combate+1] = _tabela - end - - --tabelas_de_combate [#tabelas_de_combate+1] = tabela_atual --não salva mais a atual - --tabelas_de_combate [#tabelas_de_combate+1] = tabela_overall --não salva mais a overall - - --> make sure details database exists - _detalhes_database = _detalhes_database or {} - - for tabela_index, _combate in _ipairs (tabelas_de_combate) do - - --> limpa a tabela do grafico -- clear graphic table - if (_detalhes.clear_graphic) then - _combate.TimeData = {} - end - - local container_dano = _combate [class_type_dano] or {} - local container_cura = _combate [class_type_cura] or {} - local container_e_energy = _combate [class_type_e_energy] or {} - local container_misc = _combate [class_type_misc] or {} - - local todos_atributos = {container_dano, container_cura, container_e_energy, container_misc} - - local IsBossEncounter = _combate.is_boss - if (IsBossEncounter) then - if (_combate.pvp) then - IsBossEncounter = false - end end - for class_type, _tabela in _ipairs (todos_atributos) do + --> Clear Containers + for tabela_index, _combate in _ipairs (tabelas_de_combate) do + local container_dano = _combate [class_type_dano] + local container_cura = _combate [class_type_cura] + local container_e_energy = _combate [class_type_e_energy] + local container_misc = _combate [class_type_misc] + + local todos_atributos = {container_dano, container_cura, container_e_energy, container_misc} + + for class_type, _tabela in _ipairs (todos_atributos) do + _detalhes.clear:c_combate (_combate) + _detalhes.clear:c_container_combatentes (container_dano) + _detalhes.clear:c_container_combatentes (container_cura) + _detalhes.clear:c_container_combatentes (container_e_energy) + _detalhes.clear:c_container_combatentes (container_misc) + end + end - local conteudo = _tabela._ActorTable - - --> Limpa tabelas que não estejam em grupo - - _detalhes.clear_ungrouped = true - - if (_detalhes.clear_ungrouped) then - - local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index - - while (_iter.data) do --serach key: deletar apagar - local can_erase = true - - if (_iter.data.grupo or _iter.data.boss or _iter.data.boss_fight_component or IsBossEncounter) then - can_erase = false - --if (class_type == 1) then - -- print ("SAVE ", _iter.data.nome, tabela_index) - --end - else - local owner = _iter.data.owner - if (owner) then - local owner_actor = _combate (class_type, owner.nome) - if (owner_actor) then - if (owner.grupo or owner.boss or owner.boss_fight_component) then - --if (class_type == 1) then - -- print ("SAVE", _iter.data.nome, "| owner:",_iter.data.owner.nome, tabela_index) - --end - can_erase = false - end - end - else - --if (class_type == 1) then - -- print ("DELETANDO", _iter.data.nome, tabela_index) - --end - end - end - - if (can_erase) then - - if (not _iter.data.owner) then --> pet (not a pet?) - local myself = _iter.data - - if (myself.tipo == class_type_dano or myself.tipo == class_type_cura) then - _combate.totals [myself.tipo] = _combate.totals [myself.tipo] - myself.total - if (myself.grupo) then - _combate.totals_grupo [myself.tipo] = _combate.totals_grupo [myself.tipo] - myself.total - end - elseif (myself.tipo == class_type_e_energy) then - _combate.totals [myself.tipo] ["mana"] = _combate.totals [myself.tipo] ["mana"] - myself.mana - _combate.totals [myself.tipo] ["e_rage"] = _combate.totals [myself.tipo] ["e_rage"] - myself.e_rage - _combate.totals [myself.tipo] ["e_energy"] = _combate.totals [myself.tipo] ["e_energy"] - myself.e_energy - _combate.totals [myself.tipo] ["runepower"] = _combate.totals [myself.tipo] ["runepower"] - myself.runepower - if (myself.grupo) then - _combate.totals_grupo [myself.tipo] ["mana"] = _combate.totals_grupo [myself.tipo] ["mana"] - myself.mana - _combate.totals_grupo [myself.tipo] ["e_rage"] = _combate.totals_grupo [myself.tipo] ["e_rage"] - myself.e_rage - _combate.totals_grupo [myself.tipo] ["e_energy"] = _combate.totals_grupo [myself.tipo] ["e_energy"] - myself.e_energy - _combate.totals_grupo [myself.tipo] ["runepower"] = _combate.totals_grupo [myself.tipo] ["runepower"] - myself.runepower - end - elseif (myself.tipo == class_type_misc) then - if (myself.cc_break) then - _combate.totals [myself.tipo] ["cc_break"] = _combate.totals [myself.tipo] ["cc_break"] - myself.cc_break - if (myself.grupo) then - _combate.totals_grupo [myself.tipo] ["cc_break"] = _combate.totals_grupo [myself.tipo] ["cc_break"] - myself.cc_break - end - end - if (myself.ress) then - _combate.totals [myself.tipo] ["ress"] = _combate.totals [myself.tipo] ["ress"] - myself.ress - if (myself.grupo) then - _combate.totals_grupo [myself.tipo] ["ress"] = _combate.totals_grupo [myself.tipo] ["ress"] - myself.ress - end - end - --> não precisa diminuir o total dos buffs e debuffs - if (myself.cooldowns_defensive) then - _combate.totals [myself.tipo] ["cooldowns_defensive"] = _combate.totals [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive - if (myself.grupo) then - _combate.totals_grupo [myself.tipo] ["cooldowns_defensive"] = _combate.totals_grupo [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive - end - end - if (myself.interrupt) then - _combate.totals [myself.tipo] ["interrupt"] = _combate.totals [myself.tipo] ["interrupt"] - myself.interrupt - if (myself.grupo) then - _combate.totals_grupo [myself.tipo] ["interrupt"] = _combate.totals_grupo [myself.tipo] ["interrupt"] - myself.interrupt - end - end - if (myself.dispell) then - _combate.totals [myself.tipo] ["dispell"] = _combate.totals [myself.tipo] ["dispell"] - myself.dispell - if (myself.grupo) then - _combate.totals_grupo [myself.tipo] ["dispell"] = _combate.totals_grupo [myself.tipo] ["dispell"] - myself.dispell - end - end - if (myself.dead) then - _combate.totals [myself.tipo] ["dead"] = _combate.totals [myself.tipo] ["dead"] - myself.dead - if (myself.grupo) then - _combate.totals_grupo [myself.tipo] ["dead"] = _combate.totals_grupo [myself.tipo] ["dead"] - myself.dead - end - end - end - end - - _table_remove (conteudo, _iter.index) - _iter.cleaned = _iter.cleaned + 1 - _iter.data = conteudo [_iter.index] - else - _iter.index = _iter.index + 1 - _iter.data = conteudo [_iter.index] - end + + --> panic mode + if (_detalhes.segments_panic_mode and _detalhes.in_combat) then + if (_detalhes.tabela_vigente.is_boss) then + _detalhes.tabela_historico = _detalhes.historico:NovoHistorico() end - - if (_iter.cleaned > 0) then --> desencargo de consciência, reconstruir o mapa depois de excluir - ReconstroiMapa (_tabela) - end - end + + + --> Limpa instâncias + for _, esta_instancia in _ipairs (_detalhes.tabela_instancias) do + --> detona a janela do Solo Mode - for _, esta_classe in _ipairs (conteudo) do + esta_instancia.barras = nil + esta_instancia.showing = nil - --> limpa o displayName, não precisa salvar - esta_classe.displayName = nil - esta_classe.owner = nil - - if (class_type == class_type_dano) then - _detalhes.clear:c_atributo_damage (esta_classe) - elseif (class_type == class_type_cura) then - _detalhes.clear:c_atributo_heal (esta_classe) - elseif (class_type == class_type_e_energy) then - _detalhes.clear:c_atributo_energy (esta_classe) - elseif (class_type == class_type_misc) then - _detalhes.clear:c_atributo_misc (esta_classe) - - if (esta_classe.interrupt) then - for _, _alvo in _ipairs (esta_classe.interrupt_targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - - if (esta_classe.buff_uptime) then - for _, _alvo in _ipairs (esta_classe.buff_uptime_targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - - if (esta_classe.cooldowns_defensive) then - for _, _alvo in _ipairs (esta_classe.cooldowns_defensive_targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - - if (esta_classe.ress) then - for _, _alvo in _ipairs (esta_classe.ress_targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - - if (esta_classe.dispell) then - for _, _alvo in _ipairs (esta_classe.dispell_targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - - if (esta_classe.cc_break) then - for _, _alvo in _ipairs (esta_classe.cc_break_targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - end - - if (class_type ~= class_type_misc) then - for _, _alvo in _ipairs (esta_classe.targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - - for _, habilidade in _pairs (esta_classe.spell_tables._ActorTable) do - if (class_type == class_type_dano) then - _detalhes.clear:c_habilidade_dano (habilidade) - elseif (class_type == class_type_cura) then - _detalhes.clear:c_habilidade_cura (habilidade) - elseif (class_type == class_type_e_energy) then - _detalhes.clear:c_habilidade_e_energy (habilidade) - end - - for _, _alvo in ipairs (habilidade.targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - else - if (esta_classe.interrupt) then - for _, habilidade in _pairs (esta_classe.interrupt_spell_tables._ActorTable) do - _detalhes.clear:c_habilidade_misc (habilidade) - - for _, _alvo in ipairs (habilidade.targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - end - - if (esta_classe.buff_uptime) then - for _, habilidade in _pairs (esta_classe.buff_uptime_spell_tables._ActorTable) do - _detalhes.clear:c_habilidade_misc (habilidade) - - for _, _alvo in ipairs (habilidade.targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - end - - if (esta_classe.cooldowns_defensive) then - for _, habilidade in _pairs (esta_classe.cooldowns_defensive_spell_tables._ActorTable) do - _detalhes.clear:c_habilidade_misc (habilidade) - - for _, _alvo in ipairs (habilidade.targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - end - - if (esta_classe.ress) then - for _, habilidade in _pairs (esta_classe.ress_spell_tables._ActorTable) do - _detalhes.clear:c_habilidade_misc (habilidade) - - for _, _alvo in ipairs (habilidade.targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - end - - if (esta_classe.dispell) then - for _, habilidade in _pairs (esta_classe.dispell_spell_tables._ActorTable) do - _detalhes.clear:c_habilidade_misc (habilidade) - - for _, _alvo in ipairs (habilidade.targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - end - - if (esta_classe.cc_break) then - for _, habilidade in _pairs (esta_classe.cc_break_spell_tables._ActorTable) do - _detalhes.clear:c_habilidade_misc (habilidade) - - for _, _alvo in ipairs (habilidade.targets._ActorTable) do - _detalhes.clear:c_alvo_da_habilidade (_alvo) - end - end - end - end - + --> apaga os frames + esta_instancia.scroll = nil + esta_instancia.baseframe = nil + esta_instancia.bgframe = nil + esta_instancia.bgdisplay = nil + esta_instancia.freeze_icon = nil + esta_instancia.freeze_texto = nil + + esta_instancia.agrupada_a = nil + esta_instancia.grupada_pos = nil + esta_instancia.agrupado = nil + + if (esta_instancia.StatusBar.left) then + esta_instancia.StatusBarSaved = { + ["left"] = esta_instancia.StatusBar.left.real_name or "NONE", + ["center"] = esta_instancia.StatusBar.center.real_name or "NONE", + ["right"] = esta_instancia.StatusBar.right.real_name or "NONE", + ["options"] = esta_instancia.StatusBar.options + } end + + esta_instancia.StatusBar = nil + end end - - --> Clear Containers - for tabela_index, _combate in _ipairs (tabelas_de_combate) do - local container_dano = _combate [class_type_dano] - local container_cura = _combate [class_type_cura] - local container_e_energy = _combate [class_type_e_energy] - local container_misc = _combate [class_type_misc] - - local todos_atributos = {container_dano, container_cura, container_e_energy, container_misc} - - for class_type, _tabela in _ipairs (todos_atributos) do - _detalhes.clear:c_combate (_combate) - _detalhes.clear:c_container_combatentes (container_dano) - _detalhes.clear:c_container_combatentes (container_cura) - _detalhes.clear:c_container_combatentes (container_e_energy) - _detalhes.clear:c_container_combatentes (container_misc) - end - end - - - --> panic mode - if (_detalhes.segments_panic_mode and _detalhes.in_combat) then - if (_detalhes.tabela_vigente.is_boss) then - _detalhes.tabela_historico = _detalhes.historico:NovoHistorico() - end - end - - - --> Limpa instâncias - for _, esta_instancia in _ipairs (_detalhes.tabela_instancias) do - --> detona a janela do Solo Mode - - esta_instancia.barras = nil - esta_instancia.showing = nil - - --> apaga os frames - esta_instancia.scroll = nil - esta_instancia.baseframe = nil - esta_instancia.bgframe = nil - esta_instancia.bgdisplay = nil - esta_instancia.freeze_icon = nil - esta_instancia.freeze_texto = nil - - esta_instancia.agrupada_a = nil - esta_instancia.grupada_pos = nil - esta_instancia.agrupado = nil - - if (esta_instancia.StatusBar.left) then - esta_instancia.StatusBarSaved = { - ["left"] = esta_instancia.StatusBar.left.real_name or "NONE", - ["center"] = esta_instancia.StatusBar.center.real_name or "NONE", - ["right"] = esta_instancia.StatusBar.right.real_name or "NONE", - ["options"] = esta_instancia.StatusBar.options - } - end - - esta_instancia.StatusBar = nil - - end - - end function _detalhes:reset_window (instancia) if (instancia.segmento == -1) then @@ -966,7 +705,7 @@ if (can_garbage) then if (not _actor.owner) then --> pet - ReduzTotal (_actor, _combate) + _actor:subtract_total (_combate) end --> fix para a weak table @@ -1055,7 +794,7 @@ if (can_garbage or not meus_links) then --> não há referências a este objeto if (not _actor.owner) then --> pet - ReduzTotal (_actor, _overall_combat) + _actor:subtract_total (_overall_combat) end --> apaga a referência deste jogador na tabela overall diff --git a/core/parser.lua b/core/parser.lua index 8978c4a7..18f38a7e 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -728,6 +728,15 @@ if (_in_combat) then + ------------------------------------------------------------------------------------------------ + --> buff uptime + if (_recording_buffs_and_debuffs) then + if (raid_members_cache [who_serial]) then + --> call record debuffs uptime + --[[not tail call, need to fix this]] parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_IN") + end + end + if (_recording_ability_with_buffs) then if (who_name == _detalhes.playername) then @@ -855,52 +864,64 @@ --> recording debuffs applied by player elseif (tipo == "DEBUFF") then - if (_recording_ability_with_buffs and _in_combat) then - if (who_name == _detalhes.playername) then - - --> record debuff uptime - local SoloDebuffUptime = _current_combat.SoloDebuffUptime - if (SoloDebuffUptime) then - local ThisDebuff = SoloDebuffUptime [spellid] - if (ThisDebuff and ThisDebuff.Active) then - ThisDebuff.refreshAmt = ThisDebuff.refreshAmt + 1 - ThisDebuff.duration = ThisDebuff.duration + (_tempo - ThisDebuff.start) - ThisDebuff.start = _tempo - - --> send event for plugins - _detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER") - end + + if (_in_combat) then + ------------------------------------------------------------------------------------------------ + --> buff uptime + if (_recording_buffs_and_debuffs) then + if (raid_members_cache [who_serial]) then + --> call record debuffs uptime + --[[not tail call, need to fix this]] parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_REFRESH") end + end + + if (_recording_ability_with_buffs) then + if (who_name == _detalhes.playername) then - --> record debuff spell and attack power - local SoloDebuffPower = _current_combat.SoloDebuffPower - if (SoloDebuffPower) then - local ThisDebuff = SoloDebuffPower [spellid] - if (ThisDebuff) then - local ThisDebuffOnTarget = ThisDebuff [alvo_serial] - if (ThisDebuffOnTarget) then - local base, posBuff, negBuff = UnitAttackPower ("player") - local AttackPower = base+posBuff+negBuff - local base, posBuff, negBuff = UnitRangedAttackPower ("player") - local RangedAttackPower = base+posBuff+negBuff - local SpellPower = GetSpellBonusDamage (3) - - local BuffsOn = {} - for BuffName, BuffTable in _pairs (_detalhes.Buffs.BuffsTable) do - if (BuffTable.active) then - BuffsOn [#BuffsOn+1] = BuffName - end - end - - ThisDebuff [alvo_serial].power = math.max (AttackPower, RangedAttackPower, SpellPower) - ThisDebuff [alvo_serial].buffs = BuffsOn + --> record debuff uptime + local SoloDebuffUptime = _current_combat.SoloDebuffUptime + if (SoloDebuffUptime) then + local ThisDebuff = SoloDebuffUptime [spellid] + if (ThisDebuff and ThisDebuff.Active) then + ThisDebuff.refreshAmt = ThisDebuff.refreshAmt + 1 + ThisDebuff.duration = ThisDebuff.duration + (_tempo - ThisDebuff.start) + ThisDebuff.start = _tempo --> send event for plugins _detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER") end end + + --> record debuff spell and attack power + local SoloDebuffPower = _current_combat.SoloDebuffPower + if (SoloDebuffPower) then + local ThisDebuff = SoloDebuffPower [spellid] + if (ThisDebuff) then + local ThisDebuffOnTarget = ThisDebuff [alvo_serial] + if (ThisDebuffOnTarget) then + local base, posBuff, negBuff = UnitAttackPower ("player") + local AttackPower = base+posBuff+negBuff + local base, posBuff, negBuff = UnitRangedAttackPower ("player") + local RangedAttackPower = base+posBuff+negBuff + local SpellPower = GetSpellBonusDamage (3) + + local BuffsOn = {} + for BuffName, BuffTable in _pairs (_detalhes.Buffs.BuffsTable) do + if (BuffTable.active) then + BuffsOn [#BuffsOn+1] = BuffName + end + end + + ThisDebuff [alvo_serial].power = math.max (AttackPower, RangedAttackPower, SpellPower) + ThisDebuff [alvo_serial].buffs = BuffsOn + + --> send event for plugins + _detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER") + end + end + end + end - end end end @@ -960,35 +981,48 @@ ------------------------------------------------------------------------------------------------ --> recording debuffs applied by player elseif (tipo == "DEBUFF") then - if (_recording_ability_with_buffs and _in_combat) then - if (who_name == _detalhes.playername) then - - --> record debuff uptime - local SoloDebuffUptime = _current_combat.SoloDebuffUptime - local sendevent = false - if (SoloDebuffUptime) then - local ThisDebuff = SoloDebuffUptime [spellid] - if (ThisDebuff and ThisDebuff.Active) then - ThisDebuff.duration = ThisDebuff.duration + (_tempo - ThisDebuff.start) - ThisDebuff.droppedAmt = ThisDebuff.droppedAmt + 1 - ThisDebuff.start = nil - ThisDebuff.Active = false - sendevent = true - end + + if (_in_combat) then + ------------------------------------------------------------------------------------------------ + --> buff uptime + if (_recording_buffs_and_debuffs) then + if (raid_members_cache [who_serial]) then + --> call record debuffs uptime + --[[not tail call, need to fix this]] parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_OUT") end + end + + if (_recording_ability_with_buffs) then + + if (who_name == _detalhes.playername) then - --> record debuff spell and attack power - local SoloDebuffPower = _current_combat.SoloDebuffPower - if (SoloDebuffPower) then - local ThisDebuff = SoloDebuffPower [spellid] - if (ThisDebuff) then - ThisDebuff [alvo_serial] = nil - sendevent = true + --> record debuff uptime + local SoloDebuffUptime = _current_combat.SoloDebuffUptime + local sendevent = false + if (SoloDebuffUptime) then + local ThisDebuff = SoloDebuffUptime [spellid] + if (ThisDebuff and ThisDebuff.Active) then + ThisDebuff.duration = ThisDebuff.duration + (_tempo - ThisDebuff.start) + ThisDebuff.droppedAmt = ThisDebuff.droppedAmt + 1 + ThisDebuff.start = nil + ThisDebuff.Active = false + sendevent = true + end + end + + --> record debuff spell and attack power + local SoloDebuffPower = _current_combat.SoloDebuffPower + if (SoloDebuffPower) then + local ThisDebuff = SoloDebuffPower [spellid] + if (ThisDebuff) then + ThisDebuff [alvo_serial] = nil + sendevent = true + end + end + + if (sendevent) then + _detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER") end - end - - if (sendevent) then - _detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER") end end end @@ -999,6 +1033,55 @@ --> MISC search key: ~buffuptime ~buffsuptime | ----------------------------------------------------------------------------------------------------------------------------------------- + function parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, in_out) + ------------------------------------------------------------------------------------------------ + --> early checks and fixes + + _current_misc_container.need_refresh = true + _overall_misc_container.need_refresh = true + + ------------------------------------------------------------------------------------------------ + --> get actors + local este_jogador = misc_cache [who_name] + if (not este_jogador) then --> pode ser um desconhecido ou um pet + este_jogador = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true) + misc_cache [who_name] = este_jogador + end + local shadow = este_jogador.shadow + + ------------------------------------------------------------------------------------------------ + --> build containers on the fly + + if (not este_jogador.debuff_uptime) then + este_jogador.debuff_uptime = 0 + este_jogador.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc) + este_jogador.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target) + + if (not shadow.debuff_uptime_targets) then + shadow.debuff_uptime = 0 + shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc) + shadow.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target) + end + + este_jogador.debuff_uptime_targets.shadow = shadow.debuff_uptime_targets + este_jogador.debuff_uptime_spell_tables.shadow = shadow.debuff_uptime_spell_tables + end + + ------------------------------------------------------------------------------------------------ + --> add amount + + --> update last event + este_jogador.last_event = _tempo + + --> actor spells table + local spell = este_jogador.debuff_uptime_spell_tables._ActorTable [spellid] + if (not spell) then + spell = este_jogador.debuff_uptime_spell_tables:PegaHabilidade (spellid, true, "DEBUFF_UPTIME") + end + return spell:Add (alvo_serial, alvo_name, alvo_flags, who_name, este_jogador, "BUFF_OR_DEBUFF", in_out) + + end + function parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, in_out) ------------------------------------------------------------------------------------------------ @@ -1045,7 +1128,7 @@ if (not spell) then spell = este_jogador.buff_uptime_spell_tables:PegaHabilidade (spellid, true, "BUFF_UPTIME") end - return spell:Add (alvo_serial, alvo_name, alvo_flags, who_name, este_jogador, "BUFF", in_out) + return spell:Add (alvo_serial, alvo_name, alvo_flags, who_name, este_jogador, "BUFF_OR_DEBUFF", in_out) end @@ -1397,6 +1480,7 @@ ------------------------------------------------------------------------------------------------ --> record cooldowns cast which can't track with buff applyed. + --> foi um jogador que castou if (raid_members_cache [who_serial]) then --> check if is a cooldown :D if (defensive_cooldown_spell_list_no_buff [spellid]) then @@ -2053,6 +2137,13 @@ return true end + function _detalhes:CaptureIsEnabled (capture) + if (_detalhes.capture_real [capture]) then + return true + end + return false + end + function _detalhes:CaptureRefresh() for _, _thisType in _ipairs (_detalhes.capture_types) do if (_detalhes.capture_current [_thisType]) then diff --git a/core/util.lua b/core/util.lua index e5776b26..95f59e2d 100644 --- a/core/util.lua +++ b/core/util.lua @@ -439,6 +439,7 @@ FlashAnimation:SetLooping ("REPEAT") + self:Show() FlashAnimation:Play() end diff --git a/framework/framework.lua b/framework/framework.lua index 5b0457cd..7bca8126 100644 --- a/framework/framework.lua +++ b/framework/framework.lua @@ -103,6 +103,15 @@ function gump:ParseColors (_arg1, _arg2, _arg3, _arg4) end end + if (not _arg1) then + _arg1 = 1 + end + if (not _arg2) then + _arg2 = 1 + end + if (not _arg3) then + _arg3 = 1 + end if (not _arg4) then _arg4 = 1 end diff --git a/functions/attributes.lua b/functions/attributes.lua index 818bb2de..31974cc7 100644 --- a/functions/attributes.lua +++ b/functions/attributes.lua @@ -10,6 +10,35 @@ do DETAILS_ATTRIBUTE_ENERGY = 3 DETAILS_ATTRIBUTE_MISC = 4 + _detalhes.atributos_capture = { + "damage", --damage done + "damage", --dps + "damage", --damage taken + "damage", --friendly fire + "miscdata", --frags + + "heal", --healing done + "heal", --hps + "heal", --overhealing + "heal", --healing taken + "heal", --enemy healed + "heal", --damage prevented + + "energy", --mana restored + "energy", --rage gained + "energy", --energy generated + "energy", --runic power generated + + "miscdata", --cc breaks + "miscdata", --ress + "miscdata", --interrupts + "miscdata", --dispells + "miscdata", --deaths + "miscdata", --cooldowns + "aura", --buff uptime + "aura", --debuff uptime + } + --> Main Attributes _detalhes.atributos = { @@ -30,7 +59,7 @@ do --[[ MISC ]] misc = 4, --> identifier - [4] = 7, --> sub attributes + [4] = 8, --> sub attributes --[[ CUSTOM ]] custom = 5, @@ -139,6 +168,7 @@ do Loc ["STRING_ATTRIBUTE_MISC_DEAD"], Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"], Loc ["STRING_ATTRIBUTE_MISC_BUFF_UPTIME"], + Loc ["STRING_ATTRIBUTE_MISC_DEBUFF_UPTIME"], }, icones = { {"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0, .125, 0, 1}}, @@ -147,9 +177,10 @@ do {"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.375, .5, 0, 1}}, {"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.5, .625, 0, 1}}, {"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.625, 0.75, 0, 1}}, - {"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0.75, 0.875, 0, 1}} + {"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0.75, 0.875, 0, 1}}, + {"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0.875, 1, 0, 1}} }, - internal = {"cc_break", "ress", "interrupt", "dispell", "dead", "cooldowns_defensive", "buff_uptime"} + internal = {"cc_break", "ress", "interrupt", "dispell", "dead", "cooldowns_defensive", "buff_uptime", "debuff_uptime"} } } diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index f9b33751..1350fa31 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -319,9 +319,48 @@ local function VPT (instancia, esta_instancia) return nil end +local tempo_movendo, precisa_ativar, instancia_alvo, tempo_fades, nao_anexados +local movement_onupdate = function (self, elapsed) + + if (tempo_movendo and tempo_movendo < 0) then + + if (precisa_ativar) then --> se a instância estiver fechada + gump:Fade (instancia_alvo.baseframe, "ALPHA", 0.2) + gump:Fade (instancia_alvo.baseframe.cabecalho.ball, "ALPHA", 0.2) + gump:Fade (instancia_alvo.baseframe.cabecalho.atributo_icon, "ALPHA", 0.2) + instancia_alvo:SaveMainWindowPosition() + instancia_alvo:RestoreMainWindowPosition() + precisa_ativar = false + + elseif (tempo_fades) then + for lado, livre in _ipairs (nao_anexados) do + if (livre) then + if (lado == 1) then + instancia_alvo.h_esquerda:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0) + elseif (lado == 2) then + instancia_alvo.h_baixo:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0) + elseif (lado == 3) then + instancia_alvo.h_direita:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0) + elseif (lado == 4) then + instancia_alvo.h_cima:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0) + end + end + end + + tempo_movendo = 1 + else + BaseFrame:SetScript ("OnUpdate", nil) + tempo_movendo = 1 + end + + else + tempo_movendo = tempo_movendo - elapsed + end + end + local function move_janela (BaseFrame, iniciando, instancia) - local instancia_alvo = _detalhes.tabela_instancias [instancia.meu_id-1] + instancia_alvo = _detalhes.tabela_instancias [instancia.meu_id-1] if (iniciando) then @@ -343,8 +382,9 @@ local function move_janela (BaseFrame, iniciando, instancia) if (instancia_alvo) then - local tempo_fades = 1.0 - local nao_anexados = {true, true, true, true} + tempo_fades = 1.0 + nao_anexados = {true, true, true, true} + tempo_movendo = 1 for lado, snap_to in _pairs (instancia_alvo.snap) do if (snap_to) then @@ -369,11 +409,9 @@ local function move_janela (BaseFrame, iniciando, instancia) nao_anexados [lado] = false end end - - local tempo_movendo = 1 - + local need_start = not instancia_alvo.iniciada - local need_activation = not instancia_alvo.ativa + precisa_ativar = not instancia_alvo.ativa if (need_start) then --> se a instância não tiver sido aberta ainda @@ -390,47 +428,7 @@ local function move_janela (BaseFrame, iniciando, instancia) need_start = false end - BaseFrame:SetScript ("OnUpdate", function (self, elapsed) - - if (tempo_movendo and tempo_movendo < 0) then - - if (need_activation) then --> se a instância estiver fechada - gump:Fade (instancia_alvo.baseframe, "ALPHA", 0.2) - gump:Fade (instancia_alvo.baseframe.cabecalho.ball, "ALPHA", 0.2) - gump:Fade (instancia_alvo.baseframe.cabecalho.atributo_icon, "ALPHA", 0.2) - instancia_alvo:SaveMainWindowPosition() - instancia_alvo:RestoreMainWindowPosition() - need_activation = false - - elseif (tempo_fades) then - for lado, livre in _ipairs (nao_anexados) do - if (livre) then - if (lado == 1) then - instancia_alvo.h_esquerda:Show() - UIFrameFlash (instancia_alvo.h_esquerda, tempo_fades, tempo_fades, 2.0, false, 0, 0) - elseif (lado == 2) then - instancia_alvo.h_baixo:Show() - UIFrameFlash (instancia_alvo.h_baixo, tempo_fades, tempo_fades, 2.0, false, 0, 0) - elseif (lado == 3) then - instancia_alvo.h_direita:Show() - UIFrameFlash (instancia_alvo.h_direita, tempo_fades, tempo_fades, 2.0, false, 0, 0) - elseif (lado == 4) then - instancia_alvo.h_cima:Show() - UIFrameFlash (instancia_alvo.h_cima, tempo_fades, tempo_fades, 2.0, false, 0, 0) - end - end - end - - tempo_movendo = 1 - else - BaseFrame:SetScript ("OnUpdate", nil) - tempo_movendo = 1 - end - - else - tempo_movendo = tempo_movendo - elapsed - end - end) + BaseFrame:SetScript ("OnUpdate", movement_onupdate) end else @@ -1664,6 +1662,45 @@ function CreateAlertFrame (BaseFrame, instancia) return alert_bg end +function _detalhes:InstanceMsg (text, icon, textcolor, icontexture, iconcoords, iconcolor) + if (not text) then + self.freeze_icon:Hide() + return self.freeze_texto:Hide() + end + + self.freeze_texto:SetText (text) + self.freeze_icon:SetTexture (icon) + + self.freeze_icon:Show() + self.freeze_texto:Show() + + if (textcolor) then + local r, g, b, a = gump:ParseColors (textcolor) + self.freeze_texto:SetTextColor (r, g, b, a) + else + self.freeze_texto:SetTextColor (1, 1, 1, 1) + end + + if (icontexture) then + self.freeze_icon:SetTexture (icontexture) + else + self.freeze_icon:SetTexture ([[Interface\CHARACTERFRAME\Disconnect-Icon]]) + end + + if (iconcoords and type (iconcoords) == "table") then + self.freeze_icon:SetTexCoord (_unpack (iconcoords)) + else + self.freeze_icon:SetTexCoord (0, 1, 0, 1) + end + + if (iconcolor) then + local r, g, b, a = gump:ParseColors (iconcolor) + self.freeze_icon:SetVertexColor (r, g, b, a) + else + self.freeze_icon:SetVertexColor (1, 1, 1, 1) + end +end + --> inicio function gump:CriaJanelaPrincipal (ID, instancia, criando) @@ -1811,9 +1848,8 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) -- congelamento da instância ------------------------------------------------------------------------------------------------------------------------------------------------- - + instancia.freeze_icon = BackGroundDisplay:CreateTexture (nil, "OVERLAY") - instancia.freeze_icon:SetTexture ("Interface\\CHARACTERFRAME\\Disconnect-Icon") instancia.freeze_icon:SetWidth (64) instancia.freeze_icon:SetHeight (64) instancia.freeze_icon:SetPoint ("center", BackGroundDisplay, "center") @@ -1824,7 +1860,6 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) instancia.freeze_texto:SetHeight (64) instancia.freeze_texto:SetPoint ("left", instancia.freeze_icon, "right", -18, 0) instancia.freeze_texto:SetTextColor (1, 1, 1) - instancia.freeze_texto:SetText (Loc ["STRING_FREEZE"]) instancia.freeze_texto:Hide() instancia._version = BaseFrame:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") @@ -1970,34 +2005,62 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) bota_separar_script (instancia.botao_separar, instancia) --------------------------------- BORDAS HIGHLIGHT - instancia.h_cima = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY") + local fcima = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar) + fcima:SetPoint ("topleft", BaseFrame.cabecalho.top_bg, "bottomleft", -10, 37) + fcima:SetPoint ("topright", BaseFrame.cabecalho.ball_r, "bottomright", -33, 37) + gump:CreateFlashAnimation (fcima) + fcima:Hide() + + instancia.h_cima = fcima:CreateTexture (nil, "OVERLAY") instancia.h_cima:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_updown") instancia.h_cima:SetTexCoord (0, 1, 0.5, 1) instancia.h_cima:SetPoint ("topleft", BaseFrame.cabecalho.top_bg, "bottomleft", -10, 37) instancia.h_cima:SetPoint ("topright", BaseFrame.cabecalho.ball_r, "bottomright", -33, 37) - instancia.h_cima:Hide() + --instancia.h_cima:Hide() + instancia.h_cima = fcima + -- + local fbaixo = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar) + fbaixo:SetPoint ("topleft", BaseFrame.rodape.esquerdo, "bottomleft", 16, 17) + fbaixo:SetPoint ("topright", BaseFrame.rodape.direita, "bottomright", -16, 17) + gump:CreateFlashAnimation (fbaixo) + fbaixo:Hide() - instancia.h_baixo = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY") + instancia.h_baixo = fbaixo:CreateTexture (nil, "OVERLAY") instancia.h_baixo:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_updown") instancia.h_baixo:SetTexCoord (0, 1, 0, 0.5) instancia.h_baixo:SetPoint ("topleft", BaseFrame.rodape.esquerdo, "bottomleft", 16, 17) instancia.h_baixo:SetPoint ("topright", BaseFrame.rodape.direita, "bottomright", -16, 17) - instancia.h_baixo:Hide() - - instancia.h_esquerda = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY") + --instancia.h_baixo:Hide() + instancia.h_baixo = fbaixo + -- + local fesquerda = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar) + fesquerda:SetPoint ("topleft", BaseFrame.barra_esquerda, "topleft", -8, 0) + fesquerda:SetPoint ("bottomleft", BaseFrame.barra_esquerda, "bottomleft", -8, 0) + gump:CreateFlashAnimation (fesquerda) + fesquerda:Hide() + + instancia.h_esquerda = fesquerda:CreateTexture (nil, "OVERLAY") instancia.h_esquerda:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_leftright") instancia.h_esquerda:SetTexCoord (0.5, 1, 0, 1) instancia.h_esquerda:SetPoint ("topleft", BaseFrame.barra_esquerda, "topleft", -8, 0) instancia.h_esquerda:SetPoint ("bottomleft", BaseFrame.barra_esquerda, "bottomleft", -8, 0) - instancia.h_esquerda:Hide() + --instancia.h_esquerda:Hide() + instancia.h_esquerda = fesquerda + -- + local fdireita = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar) + fdireita:SetPoint ("topleft", BaseFrame.barra_direita, "topleft", 8, 18) + fdireita:SetPoint ("bottomleft", BaseFrame.barra_direita, "bottomleft", 8, 0) + gump:CreateFlashAnimation (fdireita) + fdireita:Hide() - instancia.h_direita = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY") + instancia.h_direita = fdireita:CreateTexture (nil, "OVERLAY") instancia.h_direita:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_leftright") instancia.h_direita:SetTexCoord (0, 0.5, 1, 0) instancia.h_direita:SetPoint ("topleft", BaseFrame.barra_direita, "topleft", 8, 18) instancia.h_direita:SetPoint ("bottomleft", BaseFrame.barra_direita, "bottomleft", 8, 0) - instancia.h_direita:Hide() - + --instancia.h_direita:Hide() + instancia.h_direita = fdireita + --instancia.botao_separar:Hide() if (criando) then diff --git a/images/atributos_icones_misc.tga b/images/atributos_icones_misc.tga index 123c0646b602ce276f0aab20845f364d33d3f73d..507715e66661b8ef5358e47b1a8806109bff2405 100644 GIT binary patch delta 4549 zcmXw72V7Lg_WtJX0*i@GH9~ z`Q|%2JHy)A8t(3c5EAT%fB+u^26!VfSdEBaPlWorBg`aWEJ1Dv^mak8+C_v8aT5W) zZX(>r6|p{p5$5fVP#-r$`LhJNAv(+xk)dh?`uiX}*dKws#?N;MLW6@a*xjvnPu^QL zQ&=g4f0?a$U_SWiYuy(~DTxfj7akt&@E+oY0RIRCsKenG5(d8nZildVhQrHEZRs5u z>f)W6FvKe?LhTn8VjmO}rSc07SNH{mBRGU5ki{no!T#Y04fH`|L>m1(mfAaQM%1EPhmkN%!A|=0Ohd^bO#*DANaF z=4g)4x1D>xE;%_l+9v3DKW8U6%$z3sSe}=JYuO8{ck>ex6A-V_pm*UQz{Nr&l&CSU z%^$OC$76E!LO9gTz!YOK&d?)VZ0&*eOM=H{08VvPl{ycWs&WH=S)zXkb%4P(ic2iP$d{m@Wo z6H|Z@XI#Y08ZY}VYBQ{+K4c|-sYTGX1dQJ^4pUCBah}}~-A2OsCxopR2|qq3eD^ou zVJG3@e+c^?5Z*gmgZrJ2#EItPIMRFw+UhxQKl>Vjk7ocYeWA)2z!sBCkhH8By*^3y zw6~DN3fbS`UB(h03+>Q2UXp4FX|1bpJf%@By1q~Z9D5bo6Js#()O4gA&o`xS(r|LPWG>@aI?t`@&GoX5PnRd9bg6_IzRBI27w zM4byqW|a>8$2n*t0-#Tbmv;=9qsaG8A821P%%OjFyq!(*V5LA@OcZpQp}b-!w9FvD z)eM+55a#8{Qq-k!;@w;CVdC#|Mahj~ai!|4a`)pZ<(E}P5l~D>+)v2-k?_W^1ost$ zr7~gE*MyJnlajflptcrqvf&tJ)~|%-*=+bY|CtS+efryj`X_GUc*G9_f zf%6slp6)6IbXpUfc%-JpaI0fT!|Y+ZE(Bh`ypF7=3vr!qlFr< zziFRpMf(O-is4g*<`khDu;?pSU8LgB>3!ND?KB0 zb`hSm{)633Um?387o!^%L)9J_d-oRp0LQ@nUd-wx@{u7E z7)zW#v`LA8^OZ<=bxuc-VH3_ZoI*vz_xP#)BLE^iVvA9Dn-V^kjze&``QY9jp7)Pfz2-(f=CGGsL@LvrIgP}j|ZGtB}jBeg@* zkdzQ1Tl+3x+PJ8Ic=j!Quit5)jqzZh69>ZP$wXwmSc-kkd$F@|7Yb`P;z8S8@ki@( z|Jt_Bp{-qH7R|PC*h!Y%M9Ntw2ygyEnEj9uy-RjWD`;$|k*qGWFaF$QR6J~L#%?}U zZf7Y{YZjn?Q3!|3P5^x`uJ!DlQS6N)No|i<>GkT zQ5>#6D1K->YgJ3lW{;@L_8A#tiKy>_`@HeTMwOw5%=g_OY-bwHU>;*3S+BlL%XrN! z7Rwq2+e0L34DC46c?F?=%@QaG1cq1v=hC(Mv5X}`HV=7A5;^kXu)a)TJyTfoDr@>= zG8Vtc#mN^(aJ}ZD<=y6+e$>-tJ7q_EpY&}MaQy)VHMf!?uZs6AAr$N*{PTiPWgw(2 zM^BP){|ZC5wci*gcL@`^PuU4w7&6EGxxuDQ@3wA3Kx}^UG^R*n0nEv9Y#!9;}hNa4Z z_3U8BQsZJ%pw)%S3*)jS@rHa;W5S{hhc+Z0aQxg88RteK;=l;0VtOHl=m1?FcOO`>d<({j* z(J#l4r&Mrlf<3x8O)nBS%TKkLlE{$56MC`4KpV}j9k?|Llh01W^wTr(ebtdZM4hU) zp0xDxKpIbY*3Ds#_p-yWo9x`Ik$$Wp^UV!V?Rc)7x3WXU%s>~XQeI^CuPPD)mXh7M zKgs@4S2s?!U&9Tb3;(NPD7ZAKu3@H(d>_6vN#En-;uux@r3VIy||p8U=>S-6E1j6^&qQoMGY zB+Y(uZf_^sJ8hjf+Hnyxnpcayk0t=yhG?~kj3!+EIC-ojM#^=my?P0OHkQNh%nPab z#88UGwS_3H-)dFe^2FBI(`i?FyGOFl{YZhC=aK9zCF#llIdv=Jy1iSaxN@a{@E9c2d zLhKoW+hk%BfGn-OvMA(!4Y8F8hYYtP(i?Jh{h$4;Wss-7 zI?QCFJsBn}F+tF#4hN<^@xz;)IoMKLh94S^D<8Jq^k&WsNL$jPavR5N{D%EFniFC^ z+a{OwWcL!Aq#`)+yzY0_o5|n7DMG`{{fHE!kCD`6?6J7kcFSyeb)jP9vn+Vj`(noL z{o_UrgElHyJ~}d05}9&)X0MI7@C!=-5-Y>#JW5CW&)-q~Nk^M%;Nn(^d{B;u+y_QR>2p+Z)@c1qcIsd$eowxptOV3V8 zFPfhYWZl@Es_eFO;22^$Gi*sRXD$onOPg3LRc^gA0-uo8f_tQR-fm)fw{*DWlq%}Z zG=W20xfSpwEl7c(s};J;$!wz#IPCg#9pp)GgqifRahwTDB4ddQ0<%#GzZ21jx{;10 z*A{S|`4B%>pH{VY)H-tM7FTC5dgQJrOIKZQ40~C|SU}mMuu14LAClQ)Ke@~};CF-3 ziFqPjX{*Pv#tUW(p5I8p_5g&Jcog<|8A@!0je2&Za~;G&^|tE>A=#4ZO8pDvuAJss;_&v` zM?r@l-&g-d^_~pZgT;(RTy1%bBkgCfuHz%bJj@0TbIh3F#AaqNjtquta}Af3oC2;- z(o14u*(+Jk^AoxFjf(K%$v7ok57}UJr87Qy7KS}F<8ZlQFD^BmMup)d{%n7&=;>&6 zBx5I^yOX!>P!qMe5w#9x;kM1{e# z24o4v{Lc{0<%%vg?C4ar$%(wCvw>dA&|_5E2!=9A(Kqg}r5ICdi>wYu%J#SEbQMY2j2JqqsENEu+(@tG`mX5_tdB8ap2nnh>DKlOTHg=?cR&%tXM8K=tBc+*!jYp#5FH&2D=RK?_z8)O zLiySA_+a~XtX@%!HEY*m&F0N0TDA#!xy8s^zYay4N_o5#Me8@A$TU~V?Iu&7#nj(u zdgpP|{F;p@D%^mgf)W&M--@E5^;na;9IJC}mt)K3HTdqrB?N@`-p%D_vkpr6?gfPf zC@d<(`VH$5&zBY(8ymQ}x#535nZ#=&@nLB(HWV(xhSiI)Va;-s6fZ|H_ls99LdmL? z*pR;pC3(wGvVtX#=kr-i@20+~UB$B6^nbZ1S#OdRD0!d9iXB&=V8i-iD9S!A;|LV} Mzh6ws4$mF*UvdV{mH+?% delta 616 zcmezPk@56p#tk=^7&#~3WYS=n|NsC0%?-@l%#2)8ueNAeax_-=ebOpK13X9{pILIk9Q!axFrA~1m;qU=nJ(VHX+pbFkgW-!aLdP@m+ zxr+)U+6wVIE3hy!SelzM*jZaKfF1E(Hk((H3gbM#FrNBNa_x zj$C1y%f#rkSe3@#Kbs*1Qx`>1QZj@ zfdZ2k#EDGKP5J_fgnP+LnHZHPx1>#g@F%A`GBH|CzMA<0!nes*1{so&3p3<--a{rq zCPx=XhBfQgFqoQ|LP9*GXg!lCb8~Am!^TY;8O+Sg7`VB)AySh|*D^7(PIj!2kO##X Z0}O-&g}R1$27CJZ=|;GD`nc*b006#L`vw32 diff --git a/locales/Details-enUS.lua b/locales/Details-enUS.lua index ce33701d..575f7539 100644 --- a/locales/Details-enUS.lua +++ b/locales/Details-enUS.lua @@ -4,7 +4,7 @@ if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- -- \n\n|cFFFFFF00-|r - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Fixed a issue with report data during combat lockdown.\n\n|cFFFFFF00-|r Improved pet owner recognition and added a ignore list if couldn't find his owner.\n\n|cFFFFFF00-|r Added an option to display only frags on enemy players.\n\n|cFFFFFF00-|r Added class colors for frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Fixed a issue were turning off buff uptime was disabling healing done too.\n\n|cFFFFFF00-|r Avoidance statistics will not be recorded for pets, ungrouped players and monsters.\n\n|cFFFFFF00-|r Fixed a issue were sometimes buff uptime was taking too long to save data on logout.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Fixed a issue with report data were sometimes wasn't working.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime was been implemented over Miscellaneous attribute.\n\n|cFFFFFF00-|r Death Logs now also display cooldowns and last cooldown used.\n\n|cFFFFFF00-|r Added this window showing the latest changes.\n\n|cFFFFFF00-|r Fixed the issue were sometimes the instance stops to update when clicking on the attribute name over sword menu.\n\n|cFFFFFF00-|r Disabling Healing now shutdown the absorbs too, disabling auras doesn't interrupt absorbs any more.\n\n|cFFFFFF00-|r Friendly Fire now only track players which is inside a group.\n\n|cFFFFFF00-|r Fixed a issue were pet damage on target isn't added to owner target.\n\n|cFFFFFF00-|r Fixed a bug were refreshing a cooldown isn't counting.\n\n|cFFFFFF00-|r Added absorbs for shammy and monk 2P tier 16.\n\n|cFFFFFF00-|r Added slash command 'worldboss' and 'updates'.\n\n" + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.6.0|r\n\n|cFFFFFF00-|r Added debuff uptime at misc attribute.\n\n|cFFFFFF00-|r Disabled attributes now have a darkness effect over sword menu.\n\n|cFFFFFF00-|r Fixed a issue were sometimes you need to /reload before change a talent.\n\n|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Fixed a issue with report data during combat lockdown.\n\n|cFFFFFF00-|r Improved pet owner recognition and added a ignore list if couldn't find his owner.\n\n|cFFFFFF00-|r Added an option to display only frags on enemy players.\n\n|cFFFFFF00-|r Added class colors for frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Fixed a issue were turning off buff uptime was disabling healing done too.\n\n|cFFFFFF00-|r Avoidance statistics will not be recorded for pets, ungrouped players and monsters.\n\n|cFFFFFF00-|r Fixed a issue were sometimes buff uptime was taking too long to save data on logout.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Fixed a issue with report data were sometimes wasn't working.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime was been implemented over Miscellaneous attribute.\n\n|cFFFFFF00-|r Death Logs now also display cooldowns and last cooldown used.\n\n|cFFFFFF00-|r Added this window showing the latest changes.\n\n|cFFFFFF00-|r Fixed the issue were sometimes the instance stops to update when clicking on the attribute name over sword menu.\n\n|cFFFFFF00-|r Disabling Healing now shutdown the absorbs too, disabling auras doesn't interrupt absorbs any more.\n\n|cFFFFFF00-|r Friendly Fire now only track players which is inside a group.\n\n|cFFFFFF00-|r Fixed a issue were pet damage on target isn't added to owner target.\n\n|cFFFFFF00-|r Fixed a bug were refreshing a cooldown isn't counting.\n\n|cFFFFFF00-|r Added absorbs for shammy and monk 2P tier 16.\n\n|cFFFFFF00-|r Added slash command 'worldboss' and 'updates'.\n\n" Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name @@ -174,6 +174,7 @@ if not Loc then return end Loc ["STRING_ATTRIBUTE_MISC_DEAD"] = "Deaths" Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"] = "Cooldowns" Loc ["STRING_ATTRIBUTE_MISC_BUFF_UPTIME"] = "Buff Uptime" + Loc ["STRING_ATTRIBUTE_MISC_DEBUFF_UPTIME"] = "Debuff Uptime" Loc ["STRING_ATTRIBUTE_CUSTOM"] = "Custom" @@ -277,6 +278,7 @@ if not Loc then return end Loc ["STRING_REPORT_SINGLE_DEATH"] = "death details of" Loc ["STRING_REPORT_SINGLE_COOLDOWN"] = "cooldowns used by" Loc ["STRING_REPORT_SINGLE_BUFFUPTIME"] = "buff uptime for" + Loc ["STRING_REPORT_SINGLE_DEBUFFUPTIME"] = "debuff uptime for" Loc ["STRING_NOCLOSED_INSTANCES"] = "There are no closed instances,\nclick to open a new one." --> report frame diff --git a/locales/Details-ptBR.lua b/locales/Details-ptBR.lua index ffcf4f64..22c7ad7f 100644 --- a/locales/Details-ptBR.lua +++ b/locales/Details-ptBR.lua @@ -3,7 +3,7 @@ if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar durante o combate.\n\n|cFFFFFF00-|r Melhorado a reconhecimento dos donos de ajudantes.\n\n|cFFFFFF00-|r Adicionada uma opcao para mostrar apenas frags em cima de jogadores inimigos.\n\n|cFFFFFF00-|r Adicionado cor e icone aos frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Corrigido problema onde desativando o tempo dos buffs estava desativando tambem a cura feita.\n\n|cFFFFFF00-|r Estatisticas de Avoidance nao seram mais capturadas para pessoas foram do grupo, monstros ou ajudantes.\n\n|cFFFFFF00-|r Corrigido problema onde as vezes estava demorando muito para salvar o tempo dos buffs ao sair do jogo.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar o Dps onde as vezes nao mostrava nenhum jogador.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime foi implementado no atributo miscelanea.\n\n|cFFFFFF00-|r Cooldowns usados agora aparecem nos registros da morte.\n\n|cFFFFFF00-|r Implementado esta janela mostrando as atualizacoes.\n\n|cFFFFFF00-|r Corrigido problema onde algumas vezes clicando no nome do atributo fazia a instancia parar de atualizar.\n\n|cFFFFFF00-|r Desativando a cura agora para as absorcoes tambem. Desligando as Auras nao interrompe as absorcoes. \n\n|cFFFFFF00-|r Fogo Amigo agora conta apenas jogadores dentro do grupo.\n\n|cFFFFFF00-|r Corrigido problema onde o dano feito por um ajudando nao estava contando no alvo do dono.\n\n|cFFFFFF00-|r Corrigido problema onde a atualizacao de um cooldown nao estava sendo contada.\n\n|cFFFFFF00-|r Adicionada as magias de absorcao para 2P tier 16.\n\n|cFFFFFF00-|r Adicionado os comandos de barra 'worldboss' e 'updates'.\n\n|cFFFFFF00-|r Corrigido problema ao reportar onde algumas vezes nao estava funcionando." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.6.0|r\n\n|cFFFFFF00-|r Adicionado tempo de debuff no atributo miscelanea.\n\n|cFFFFFF00-|r Atributos desativados agora ficam escurecidos no menu da espada.\n\n|cFFFFFF00-|r Corrigido um problema aonde algumas vezes era necessario dar /reload para trocar um talento.\n\n|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar durante o combate.\n\n|cFFFFFF00-|r Melhorado a reconhecimento dos donos de ajudantes.\n\n|cFFFFFF00-|r Adicionada uma opcao para mostrar apenas frags em cima de jogadores inimigos.\n\n|cFFFFFF00-|r Adicionado cor e icone aos frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Corrigido problema onde desativando o tempo dos buffs estava desativando tambem a cura feita.\n\n|cFFFFFF00-|r Estatisticas de Avoidance nao seram mais capturadas para pessoas foram do grupo, monstros ou ajudantes.\n\n|cFFFFFF00-|r Corrigido problema onde as vezes estava demorando muito para salvar o tempo dos buffs ao sair do jogo.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar o Dps onde as vezes nao mostrava nenhum jogador.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime foi implementado no atributo miscelanea.\n\n|cFFFFFF00-|r Cooldowns usados agora aparecem nos registros da morte.\n\n|cFFFFFF00-|r Implementado esta janela mostrando as atualizacoes.\n\n|cFFFFFF00-|r Corrigido problema onde algumas vezes clicando no nome do atributo fazia a instancia parar de atualizar.\n\n|cFFFFFF00-|r Desativando a cura agora para as absorcoes tambem. Desligando as Auras nao interrompe as absorcoes. \n\n|cFFFFFF00-|r Fogo Amigo agora conta apenas jogadores dentro do grupo.\n\n|cFFFFFF00-|r Corrigido problema onde o dano feito por um ajudando nao estava contando no alvo do dono.\n\n|cFFFFFF00-|r Corrigido problema onde a atualizacao de um cooldown nao estava sendo contada.\n\n|cFFFFFF00-|r Adicionada as magias de absorcao para 2P tier 16.\n\n|cFFFFFF00-|r Adicionado os comandos de barra 'worldboss' e 'updates'.\n\n|cFFFFFF00-|r Corrigido problema ao reportar onde algumas vezes nao estava funcionando." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name @@ -171,6 +171,7 @@ if not Loc then return end Loc ["STRING_ATTRIBUTE_MISC_DEAD"] = "Mortes" Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"] = "Cooldowns" Loc ["STRING_ATTRIBUTE_MISC_BUFF_UPTIME"] = "Buff Tempo Ativo" + Loc ["STRING_ATTRIBUTE_MISC_DEBUFF_UPTIME"] = "Debuff Tempo Ativo" Loc ["STRING_ATTRIBUTE_CUSTOM"] = "Customizados" @@ -271,6 +272,7 @@ if not Loc then return end Loc ["STRING_REPORT_SINGLE_DEATH"] = "detalhes da morte de" Loc ["STRING_REPORT_SINGLE_COOLDOWN"] = "cooldowns usados por" Loc ["STRING_REPORT_SINGLE_BUFFUPTIME"] = "duracao dos buffs de" + Loc ["STRING_REPORT_SINGLE_DEBUFFUPTIME"] = "duracao dos debuffs de" Loc ["STRING_NOCLOSED_INSTANCES"] = "Nao ha instancias fechadas,\nclique para abrir uma nova." --Loc ["STRING_REPORT_FRAG"] = diff --git a/startup.lua b/startup.lua index 441f7675..f72781df 100644 --- a/startup.lua +++ b/startup.lua @@ -4,7 +4,7 @@ -- 27/07/2013: Finished alpha version. function _G._detalhes:Start() - + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> details defaults @@ -144,7 +144,7 @@ function _G._detalhes:Start() --mana, rage, energy, runepower self.row_singleclick_overwrite [3] = {true, true, true, true} --cc breaks, ress, interrupts, dispells, deaths - self.row_singleclick_overwrite [4] = {true, true, true, true, self.atributo_misc.ReportSingleDeadLine, self.atributo_misc.ReportSingleCooldownLine, self.atributo_misc.ReportSingleBuffUptimeLine} + self.row_singleclick_overwrite [4] = {true, true, true, true, self.atributo_misc.ReportSingleDeadLine, self.atributo_misc.ReportSingleCooldownLine, self.atributo_misc.ReportSingleBuffUptimeLine, self.atributo_misc.ReportSingleDebuffUptimeLine} ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> initialize