From 6211e589663f8201c51a0faa7472164581d41f68 Mon Sep 17 00:00:00 2001 From: Tercio Date: Wed, 25 Sep 2013 19:45:32 -0300 Subject: [PATCH] - added support to combat concatenate: combat1 = combat1 + combat2. - added trash mod knowledge which will concatenate trash segments. - added a new member on combat object: .is_trash - added _detalhes:GetInstanceTrashInfo (mapid) - added _detalhes member: .last_instance - added CreateFlashAnimation(frame) and frame.flash (UiFrameFlash params) - fixed issue were healing was not showing corrently on current segment. - fixed issue were misc wasn't showing on everything mode. - fixed talent and glyphs frame error. - fixed issue with options panel were some options reset when panel is open. - minor speedup on parser removing member last_event from shadows. - more functions clean up avoiding garbage creation. --- boot.lua | 4 +- classes/classe_combate.lua | 112 ++++ classes/classe_damage.lua | 13 +- classes/classe_energy.lua | 22 +- classes/classe_heal.lua | 23 +- classes/classe_others.lua | 189 ++++-- classes/container_combatentes.lua | 1 - classes/container_historico.lua | 21 + core/control.lua | 42 +- core/parser.lua | 27 +- core/util.lua | 69 +- framework/cooltip.lua | 41 +- functions/boss.lua | 5 + functions/slash.lua | 87 +++ gumps/janela_info.lua | 4 +- gumps/janela_options.lua | 48 +- gumps/janela_principal.lua | 611 ++++++++++-------- gumps/janela_report.lua | 9 +- images/icons.tga | Bin 473151 -> 477062 bytes locales/Details-enUS.lua | 1 + locales/Details-ptBR.lua | 1 + .../Details_EncounterDetails.lua | 6 +- plugins/Details_EncounterDetails/frames.lua | 2 +- .../SiegeOfOrgrimmar.lua | 97 ++- 24 files changed, 989 insertions(+), 446 deletions(-) diff --git a/boot.lua b/boot.lua index 7018018b..8c8c5d17 100644 --- a/boot.lua +++ b/boot.lua @@ -7,7 +7,7 @@ --> global name declaration _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.userversion = "v1.4.6" + _detalhes.userversion = "v1.4.9" _detalhes.version = "Alpha 006" _detalhes.realversion = 6 @@ -182,6 +182,8 @@ do ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> functions + _detalhes.empty_function = function() end + --> register textures and fonts for shared media local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0") SharedMedia:Register ("statusbar", "Details D'ictum", [[Interface\AddOns\Details\images\bar4]]) diff --git a/classes/classe_combate.lua b/classes/classe_combate.lua index 0e648eff..e45cd7b9 100644 --- a/classes/classe_combate.lua +++ b/classes/classe_combate.lua @@ -263,6 +263,75 @@ 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 @@ -497,3 +566,46 @@ end function _detalhes:UpdateCombat() _tempo = _detalhes._tempo end + +--[[ + local nome = actor_T2.nome + + --> actor principal + local actor_T1 = combate1[1]._ActorTable [combate1[1]._NameIndexTable [nome] ] + if (not actor_T1) then --> precisa cria-lo + actor_T1 = combate1[1]:PegarCombatente (actor_T2.serial, nome, actor_T2.flag_original, true) + end + + if (actor_T1) then + + --> add basic members + actor_T1 = actor_T1 + actor_T2 + + --> alvos + local alvos = actor_T2.targets + for index, alvo in _ipairs (alvos._ActorTable) do + local alvo_T1 = actor_T1.targets._ActorTable [actor_T1.targets._NameIndexTable [alvo.nome] ] + if (not alvo_T1) then + alvo_T1 = actor_T1.targets:PegarCombatente (alvo.serial, alvo.nome, alvo.flag_original, true) + end + alvo_T1 = alvo_T1 + alvo + end + + --> spells + local habilidades = actor_T2.spell_tables + for _spellid, habilidade in _pairs (habilidades._ActorTable) do + local habilidade_T1 = actor_T1.spell_tables._ActorTable [_spellid] + if (not habilidade_T1) then + + end + + habilidade_overall = habilidade_overall - habilidade + + 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] ] + alvo_overall = alvo_overall - alvo + end + end + end +--]] \ No newline at end of file diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index b8cf3d7b..612b4800 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -2195,12 +2195,15 @@ atributo_damage.__add = function (shadow, tabela2) --> total de dano shadow.total = shadow.total + tabela2.total - _detalhes.tabela_overall.totals[1] = _detalhes.tabela_overall.totals[1] + tabela2.total - if (tabela2.grupo) then - _detalhes.tabela_overall.totals_grupo[1] = _detalhes.tabela_overall.totals_grupo[1] + tabela2.total + if ( not (shadow.shadow and tabela2.shadow) ) then + _detalhes.tabela_overall.totals[1] = _detalhes.tabela_overall.totals[1] + tabela2.total + + if (tabela2.grupo) then + _detalhes.tabela_overall.totals_grupo[1] = _detalhes.tabela_overall.totals_grupo[1] + tabela2.total + end end - + --> total de dano sem o pet shadow.total_without_pet = shadow.total_without_pet + tabela2.total_without_pet --> total de dano que o cara levou @@ -2219,7 +2222,7 @@ atributo_damage.__add = function (shadow, tabela2) --> copia o container de friendly fire for index, friendlyFire in _ipairs (tabela2.friendlyfire._ActorTable) do -- friendlyFire é uma tabela com .total e .spell_tables -- habilidade é um container de habilidades tipo damage - local friendlyFire_shadow = shadow.friendlyfire:PegarCombatente (_, friendlyFire.nome) + local friendlyFire_shadow = shadow.friendlyfire:PegarCombatente (friendlyFire.serial, friendlyFire.nome, friendlyFire.flag_original, true) --_detalhes:DelayMsg ("+ achou -> " .. friendlyFire_shadow.nome) --friendlyFire_shadow agora tem uma tabela com .total e .spell_tables diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index d6af65a0..b9fa46b5 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -703,16 +703,18 @@ atributo_energy.__add = function (shadow, tabela2) shadow.focus = shadow.focus + tabela2.focus shadow.holypower = shadow.holypower + tabela2.holypower - _detalhes.tabela_overall.totals[3]["mana"] = _detalhes.tabela_overall.totals[3]["mana"] + tabela2.mana - _detalhes.tabela_overall.totals[3]["e_rage"] = _detalhes.tabela_overall.totals[3]["e_rage"] + tabela2.e_rage - _detalhes.tabela_overall.totals[3]["e_energy"] = _detalhes.tabela_overall.totals[3]["e_energy"] + tabela2.e_energy - _detalhes.tabela_overall.totals[3]["runepower"] = _detalhes.tabela_overall.totals[3]["runepower"] + tabela2.runepower - - if (tabela2.grupo) then - _detalhes.tabela_overall.totals_grupo[3]["mana"] = _detalhes.tabela_overall.totals_grupo[3]["mana"] + tabela2.mana - _detalhes.tabela_overall.totals_grupo[3]["e_rage"] = _detalhes.tabela_overall.totals_grupo[3]["e_rage"] + tabela2.e_rage - _detalhes.tabela_overall.totals_grupo[3]["e_energy"] = _detalhes.tabela_overall.totals_grupo[3]["e_energy"] + tabela2.e_energy - _detalhes.tabela_overall.totals_grupo[3]["runepower"] = _detalhes.tabela_overall.totals_grupo[3]["runepower"] + tabela2.runepower + if ( not (shadow.shadow and tabela2.shadow) ) then + _detalhes.tabela_overall.totals[3]["mana"] = _detalhes.tabela_overall.totals[3]["mana"] + tabela2.mana + _detalhes.tabela_overall.totals[3]["e_rage"] = _detalhes.tabela_overall.totals[3]["e_rage"] + tabela2.e_rage + _detalhes.tabela_overall.totals[3]["e_energy"] = _detalhes.tabela_overall.totals[3]["e_energy"] + tabela2.e_energy + _detalhes.tabela_overall.totals[3]["runepower"] = _detalhes.tabela_overall.totals[3]["runepower"] + tabela2.runepower + + if (tabela2.grupo) then + _detalhes.tabela_overall.totals_grupo[3]["mana"] = _detalhes.tabela_overall.totals_grupo[3]["mana"] + tabela2.mana + _detalhes.tabela_overall.totals_grupo[3]["e_rage"] = _detalhes.tabela_overall.totals_grupo[3]["e_rage"] + tabela2.e_rage + _detalhes.tabela_overall.totals_grupo[3]["e_energy"] = _detalhes.tabela_overall.totals_grupo[3]["e_energy"] + tabela2.e_energy + _detalhes.tabela_overall.totals_grupo[3]["runepower"] = _detalhes.tabela_overall.totals_grupo[3]["runepower"] + tabela2.runepower + end end shadow.mana_r = shadow.mana_r + tabela2.mana_r diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index 56f1a022..d65de0ed 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -184,19 +184,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo elseif (instancia.modo == modo_ALL or sub_atributo == 5) then --> mostrando ALL amount = _detalhes:ContainerSort (conteudo, amount, keyName) - - --> faz o sort da categoria - --_table_sort (conteudo, function (a, b) return a[keyName] > b[keyName] end) - - --> não mostrar resultados com zero - --[[for i = amount, 1, -1 do --> de trás pra frente - if (conteudo[i][keyName] < 1) then - amount = amount-1 - else - break - end - end--]] - + --> pega o total ja aplicado na tabela do combate total = tabela_do_combate.totals [class_type] @@ -1393,10 +1381,13 @@ atributo_heal.__add = function (shadow, tabela2) shadow.start_time = shadow.start_time - tempo shadow.total = shadow.total + tabela2.total - _detalhes.tabela_overall.totals[2] = _detalhes.tabela_overall.totals[2] + tabela2.total - if (tabela2.grupo) then - _detalhes.tabela_overall.totals_grupo[2] = _detalhes.tabela_overall.totals_grupo[2] + tabela2.total + if ( not (shadow.shadow and tabela2.shadow) ) then + _detalhes.tabela_overall.totals[2] = _detalhes.tabela_overall.totals[2] + tabela2.total + + if (tabela2.grupo) then + _detalhes.tabela_overall.totals_grupo[2] = _detalhes.tabela_overall.totals_grupo[2] + tabela2.total + end end shadow.totalover = shadow.totalover + tabela2.totalover diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 43b546d8..940cd34e 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -32,7 +32,7 @@ local container_pets = _detalhes.container_pets local atributo_misc = _detalhes.atributo_misc local habilidade_misc = _detalhes.habilidade_misc ---local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS +local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC local container_misc = _detalhes.container_type.CONTAINER_MISC_CLASS local container_misc_target = _detalhes.container_type.CONTAINER_ENERGYTARGET_CLASS @@ -58,6 +58,40 @@ local div_lugar = _detalhes.divisores.colocacao local info = _detalhes.janela_info local keyName +function _detalhes.SortIfHaveKey (table1, table2) + if (table1[keyName] and table2[keyName]) then + return table1[keyName] > table2[keyName] + elseif (table1[keyName] and not table2[keyName]) then + return true + else + return false + end +end + +function _detalhes.SortGroupIfHaveKey (table1, table2) + if (table1.grupo and table2.grupo) then + if (table1[keyName] and table2[keyName]) then + return table1[keyName] > table2[keyName] + elseif (table1[keyName] and not table2[keyName]) then + return true + else + return false + end + elseif (table1.grupo and not table2.grupo) then + return true + elseif (not table1.grupo and table2.grupo) then + return false + else + if (table1[keyName] and table2[keyName]) then + return table1[keyName] > table2[keyName] + elseif (table1[keyName] and not table2[keyName]) then + return true + else + return false + end + end +end + function atributo_misc:NovaTabela (serial, nome, link) local _new_miscActor = { @@ -219,21 +253,13 @@ end function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, exportar) - --print ("refresh misc...") - - local total = 0 --> total iniciado como ZERO - local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura --> pega o container com ._NameIndexTable ._ActorTable - + if (#showing._ActorTable < 1) then --> não há barras para mostrar - if (forcar) then - _detalhes:EsconderBarrasNaoUsadas (instancia, showing) - end - return + return _detalhes:EsconderBarrasNaoUsadas (instancia, showing) end - --print ("refresh misc... 2") - + local total = 0 instancia.top = 0 local sub_atributo = instancia.sub_atributo --> o que esta sendo mostrado nesta instância @@ -319,34 +345,37 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo if (instancia.atributo == 5) then --> custom --> faz o sort da categoria e retorna o amount corrigido - amount = _detalhes:ContainerSort (conteudo, amount, keyName) + _table_sort (conteudo, _detalhes.SortIfHaveKey) + + --> não mostrar resultados com zero + for i = amount, 1, -1 do --> de trás pra frente + if (not conteudo[i][keyName] or conteudo[i][keyName] < 1) then + amount = amount - 1 + else + break + end + end + + --> pega o total ja aplicado na tabela do combate + total = tabela_do_combate.totals [class_type] [keyName] --> grava o total instancia.top = conteudo[1][keyName] elseif (modo == modo_ALL) then --> mostrando ALL - - --> faz o sort da categoria - _table_sort (conteudo, function (a, b) - - if (a[keyName] and b[keyName]) then - return a[keyName] > b[keyName] - elseif (a[keyName] and not b[keyName]) then - return true - else - return false - end - - end) + + _table_sort (conteudo, _detalhes.SortIfHaveKey) --> não mostrar resultados com zero for i = amount, 1, -1 do --> de trás pra frente - if (not conteudo[i][keyName]) then - amount = amount-i + if (not conteudo[i][keyName] or conteudo[i][keyName] < 1) then + amount = amount - 1 + else break end end + --> pega o total ja aplicado na tabela do combate total = tabela_do_combate.totals [class_type] [keyName] --> grava o total @@ -354,31 +383,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo elseif (modo == modo_GROUP) then --> mostrando GROUP - --> faz o sort da categoria - _table_sort (conteudo, function (a, b) - - if (a.grupo and b.grupo) then - if (a[keyName] and b[keyName]) then - return a[keyName] > b[keyName] - elseif (a[keyName] and not b[keyName]) then - return true - else - return false - end - elseif (a.grupo and not b.grupo) then - return true - elseif (not a.grupo and b.grupo) then - return false - else - if (a[keyName] and b[keyName]) then - return a[keyName] > b[keyName] - elseif (a[keyName] and not b[keyName]) then - return true - else - return false - end - end - end) + _table_sort (conteudo, _detalhes.SortGroupIfHaveKey) for index, player in _ipairs (conteudo) do if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo @@ -1315,11 +1320,21 @@ atributo_misc.__add = function (shadow, tabela2) if (tabela2.interrupt) then + if (not shadow.interrupt) then + shadow.interrupt = 0 + shadow.interrupt_targets = container_combatentes:NovoContainer (container_damage_target) + shadow.interrupt_spell_tables = container_habilidades:NovoContainer (container_misc) + shadow.interrompeu_oque = {} + end + shadow.interrupt = shadow.interrupt + tabela2.interrupt - _detalhes.tabela_overall.totals[4]["interrupt"] = _detalhes.tabela_overall.totals[4]["interrupt"] + tabela2.interrupt - if (tabela2.grupo) then - _detalhes.tabela_overall.totals_grupo[4]["interrupt"] = _detalhes.tabela_overall.totals_grupo[4]["interrupt"] + tabela2.interrupt + if ( not (shadow.shadow and tabela2.shadow) ) then + _detalhes.tabela_overall.totals[4]["interrupt"] = _detalhes.tabela_overall.totals[4]["interrupt"] + tabela2.interrupt + + if (tabela2.grupo) then + _detalhes.tabela_overall.totals_grupo[4]["interrupt"] = _detalhes.tabela_overall.totals_grupo[4]["interrupt"] + tabela2.interrupt + end end for index, alvo in _ipairs (tabela2.interrupt_targets._ActorTable) do @@ -1363,11 +1378,20 @@ atributo_misc.__add = function (shadow, tabela2) if (tabela2.cooldowns_defensive) then + if (not shadow.cooldowns_defensive) 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 (container_misc) --> cria o container das habilidades usadas + end + shadow.cooldowns_defensive = shadow.cooldowns_defensive + tabela2.cooldowns_defensive - _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 + 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.cooldowns_defensive_targets._ActorTable) do @@ -1399,11 +1423,20 @@ atributo_misc.__add = function (shadow, tabela2) if (tabela2.ress) then + if (not shadow.ress) then + shadow.ress = 0 + shadow.ress_targets = container_combatentes:NovoContainer (container_damage_target) + shadow.ress_spell_tables = container_habilidades:NovoContainer (container_misc) + end + shadow.ress = shadow.ress + tabela2.ress - _detalhes.tabela_overall.totals[4]["ress"] = _detalhes.tabela_overall.totals[4]["ress"] + tabela2.ress - if (tabela2.grupo) then - _detalhes.tabela_overall.totals_grupo[4]["ress"] = _detalhes.tabela_overall.totals_grupo[4]["ress"] + tabela2.ress + if ( not (shadow.shadow and tabela2.shadow) ) then + _detalhes.tabela_overall.totals[4]["ress"] = _detalhes.tabela_overall.totals[4]["ress"] + tabela2.ress + + if (tabela2.grupo) then + _detalhes.tabela_overall.totals_grupo[4]["ress"] = _detalhes.tabela_overall.totals_grupo[4]["ress"] + tabela2.ress + end end for index, alvo in _ipairs (tabela2.ress_targets._ActorTable) do @@ -1435,11 +1468,21 @@ atributo_misc.__add = function (shadow, tabela2) if (tabela2.dispell) then + if (not shadow.dispell) then + shadow.dispell = 0 + shadow.dispell_targets = container_combatentes:NovoContainer (container_damage_target) + shadow.dispell_spell_tables = container_habilidades:NovoContainer (container_misc) + shadow.dispell_oque = {} + end + shadow.dispell = shadow.dispell + tabela2.dispell - _detalhes.tabela_overall.totals[4]["dispell"] = _detalhes.tabela_overall.totals[4]["dispell"] + tabela2.dispell - if (tabela2.grupo) then - _detalhes.tabela_overall.totals_grupo[4]["dispell"] = _detalhes.tabela_overall.totals_grupo[4]["dispell"] + tabela2.dispell + if ( not (shadow.shadow and tabela2.shadow) ) then + _detalhes.tabela_overall.totals[4]["dispell"] = _detalhes.tabela_overall.totals[4]["dispell"] + tabela2.dispell + + if (tabela2.grupo) then + _detalhes.tabela_overall.totals_grupo[4]["dispell"] = _detalhes.tabela_overall.totals_grupo[4]["dispell"] + tabela2.dispell + end end for index, alvo in _ipairs (tabela2.dispell_targets._ActorTable) do @@ -1486,11 +1529,21 @@ atributo_misc.__add = function (shadow, tabela2) if (tabela2.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 (container_misc) --> cria o container das habilidades usadas para interromper + shadow.cc_break_oque = {} + end + shadow.cc_break = shadow.cc_break + tabela2.cc_break - _detalhes.tabela_overall.totals[4]["cc_break"] = _detalhes.tabela_overall.totals[4]["cc_break"] + tabela2.cc_break - if (tabela2.grupo) then - _detalhes.tabela_overall.totals_grupo[4]["cc_break"] = _detalhes.tabela_overall.totals_grupo[4]["cc_break"] + tabela2.cc_break + if ( not (shadow.shadow and tabela2.shadow) ) then + _detalhes.tabela_overall.totals[4]["cc_break"] = _detalhes.tabela_overall.totals[4]["cc_break"] + tabela2.cc_break + + if (tabela2.grupo) then + _detalhes.tabela_overall.totals_grupo[4]["cc_break"] = _detalhes.tabela_overall.totals_grupo[4]["cc_break"] + tabela2.cc_break + end end for index, alvo in _ipairs (tabela2.cc_break_targets._ActorTable) do diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index 763220c2..8c3be7f9 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -22,7 +22,6 @@ local container_misc_target = _detalhes.container_type.CONTAINER_MISCTARGET_CLAS --api locals local _UnitClass = UnitClass -local _GetPlayerInfoByGUID = GetPlayerInfoByGUID --lua locals local _setmetatable = setmetatable local _getmetatable = getmetatable diff --git a/classes/container_historico.lua b/classes/container_historico.lua index 04b27cd4..f417f1ec 100644 --- a/classes/container_historico.lua +++ b/classes/container_historico.lua @@ -58,6 +58,27 @@ function historico:adicionar (tabela) break end end + + if (self.tabelas[3]) then + if (self.tabelas[3].is_trash and self.tabelas[2].is_trash) then + --> tabela 2 deve ser deletada e somada a tabela 1 + if (_detalhes.debug) then + detalhes:Msg ("(debug) concatenating two trash segments.") + end + + self.tabelas[2] = self.tabelas[2] + self.tabelas[3] + self.tabelas[2].is_trash = true + + --> remover + _table_remove (self.tabelas, 3) + _detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED", nil, nil) + end + + --> debug + --self.tabelas[2] = self.tabelas[2] + self.tabelas[3] + --_table_remove (self.tabelas, 3) + end + end --> chama a função que irá atualizar as instâncias com segmentos no histórico diff --git a/core/control.lua b/core/control.lua index 05ad4007..9058e05c 100644 --- a/core/control.lua +++ b/core/control.lua @@ -44,8 +44,26 @@ --> try to find the opponent of last fight, can be called during a fight as well function _detalhes:FindEnemy() + local trash_list + if (_detalhes.in_group and _detalhes.last_instance) then + trash_list = _detalhes:GetInstanceTrashInfo (_detalhes.last_instance) + end + for _, actor in _ipairs (_detalhes.tabela_vigente[class_type_dano]._ActorTable) do + if (not actor.grupo and not actor.owner and not actor.nome:find ("[*]") and _bit_band (actor.flag, 0x00000060) ~= 0) then --> 0x20+0x40 neutral + enemy reaction + + if (trash_list) then + local serial = tonumber (actor.serial:sub(6, 10), 16) + if (serial and trash_list [serial]) then + if (_detalhes.debug) then + _detalhes:Msg ("(debug) segment against trash mobs.") + end + _detalhes.tabela_vigente.is_trash = true + return Loc ["STRING_SEGMENT_TRASH"] + end + end + for name, _ in _pairs (actor.targets._NameIndexTable) do if (name == _detalhes.playername) then return actor.nome @@ -161,7 +179,6 @@ if (BossIndex) then Actor.boss = true Actor.shadow.boss = true - _detalhes:FlagActorsOnBossFight() return { index = BossIndex, name =_detalhes:GetBossName (ZoneMapID, BossIndex), @@ -267,8 +284,6 @@ --> 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 _detalhes.tabela_vigente.is_boss = _detalhes:FindBoss() - else - _detalhes:FlagActorsOnBossFight() end if (_detalhes.debug) then @@ -276,13 +291,17 @@ end if (not _detalhes.tabela_vigente.is_boss) then + local inimigo = _detalhes:FindEnemy() + if (inimigo) then if (_detalhes.debug) then _detalhes:Msg ("(debug) enemy recognized", inimigo) end end + _detalhes.tabela_vigente.enemy = inimigo + if (_detalhes.debug) then _detalhes:Msg ("(debug) forcing equalize actors behavior.") _detalhes:EqualizeActorsSchedule (_detalhes.host_of) @@ -293,6 +312,8 @@ else + _detalhes:FlagActorsOnBossFight() + if (_detalhes:GetBossDetails (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)) then _detalhes.tabela_vigente.enemy = _detalhes.tabela_vigente.is_boss.encounter _detalhes:CaptureSet (false, "damage", false, 30) @@ -410,6 +431,7 @@ table.wipe (_detalhes.cache_damage_group) table.wipe (_detalhes.cache_healing_group) + _detalhes:UpdateParserGears() _detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, _detalhes.tabela_vigente) @@ -596,16 +618,10 @@ function _detalhes:FlagActorsOnBossFight() for class_type, container in _ipairs (_detalhes.tabela_vigente) do for _, actor in _ipairs (container._ActorTable) do - if (not actor.grupo and not actor.boss) then - if (_bit_band (actor.flag, _detalhes.flags.friend) == 0) then - actor.boss_fight_component = true - local shadow = _detalhes.tabela_overall (class_type, actor.nome) - if (shadow) then - shadow.boss_fight_component = true - else - print ("Nao achou a shadow em FlagActorsOnBossFight()") - end - end + actor.boss_fight_component = true + local shadow = _detalhes.tabela_overall (class_type, actor.nome) + if (shadow) then + shadow.boss_fight_component = true end end end diff --git a/core/parser.lua b/core/parser.lua index 6cf432dd..19dc0a32 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -202,7 +202,8 @@ --> last event este_jogador.last_event = _tempo - shadow.last_event = _tempo + --jogador_alvo.last_event = _tempo + --shadow.last_event = _tempo ------------------------------------------------------------------------------------------------ --> group checks and avoidance @@ -503,7 +504,8 @@ local shadow_of_target = jogador_alvo.shadow este_jogador.last_event = _tempo - shadow.last_event = _tempo + --jogador_alvo.last_event = _tempo + --shadow.last_event = _tempo ------------------------------------------------------------------------------------------------ --> an enemy healing enemy or an player actor healing a enemy @@ -1028,7 +1030,7 @@ local shadow_of_target = jogador_alvo.shadow este_jogador.last_event = _tempo - shadow.last_event = _tempo + --shadow.last_event = _tempo ------------------------------------------------------------------------------------------------ --> amount add @@ -1078,7 +1080,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------- - --> MISC | + --> MISC search key: ~cooldown | ----------------------------------------------------------------------------------------------------------------------------------------- function parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, _, tipo, amount) @@ -1145,7 +1147,7 @@ --> update last event este_jogador.last_event = _tempo - shadow.last_event = _tempo + --shadow.last_event = _tempo --> actor targets local este_alvo = este_jogador.cooldowns_defensive_targets._NameIndexTable [alvo_name] @@ -1238,7 +1240,7 @@ --> update last event este_jogador.last_event = _tempo - shadow.last_event = _tempo + --shadow.last_event = _tempo --> spells interrupted if (not este_jogador.interrompeu_oque [extraSpellID]) then @@ -1339,7 +1341,7 @@ --> last event update este_jogador.last_event = _tempo - shadow.last_event = _tempo + --shadow.last_event = _tempo --> total dispells in combat _current_total [4].dispell = _current_total [4].dispell + 1 @@ -1437,7 +1439,7 @@ --> update last event este_jogador.last_event = _tempo - shadow.last_event = _tempo + --shadow.last_event = _tempo --> combat ress total _current_total [4].ress = _current_total [4].ress + 1 @@ -1559,7 +1561,7 @@ --> update last event este_jogador.last_event = _tempo - shadow.last_event = _tempo + --shadow.last_event = _tempo --> combat cc break total _current_total [4].cc_break = _current_total [4].cc_break + 1 @@ -1638,6 +1640,8 @@ _current_combat.frags_need_refresh = true _overall_combat.frags_need_refresh = true + --print (alvo_name) + local encounter_type = _detalhes.encounter.type if (encounter_type) then if (encounter_type == 1 or encounter_type == 2) then @@ -2021,6 +2025,11 @@ _detalhes.listener:RegisterEvent ("CHAT_MSG_BG_SYSTEM_NEUTRAL") end else + + if (_detalhes:IsInInstance()) then + _detalhes.last_instance = zoneMapID + end + if (_current_combat.pvp) then _current_combat.pvp = false end diff --git a/core/util.lua b/core/util.lua index 8a69777e..1d2d3541 100644 --- a/core/util.lua +++ b/core/util.lua @@ -292,7 +292,7 @@ end end - function gump:GradientEffect ( Object, ObjectType, StartRed, StartGreen, StartBlue, StartAlpha, EndRed, EndGreen, EndBlue, EndAlpha, Duration, EndFunction) + function gump:GradientEffect ( Object, ObjectType, StartRed, StartGreen, StartBlue, StartAlpha, EndRed, EndGreen, EndBlue, EndAlpha, Duration, EndFunction, FuncParam) if (type (StartRed) == "table" and type (StartGreen) == "table") then Duration, EndFunction = StartBlue, StartAlpha @@ -359,7 +359,8 @@ Object = Object, ObjectType = string.lower (ObjectType), Colors = ColorStep, - Func = EndFunction} + Func = EndFunction, + FuncParam = FuncParam} Object.HaveGradientEffect = true GradientFrameControl.HaveGradientEffect = true @@ -369,7 +370,71 @@ end end + + + --> work around to solve the UI Frame Flashes + + local onFinish = function (self) + if (self.showWhenDone) then + self.frame:SetAlpha (1) + else + self.frame:SetAlpha (0) + self.frame:Hide() + end + end + + local onLoop = function (self) + if (self.finishAt < GetTime()) then + self:Stop() + end + end + local flash = function (self, fadeInTime, fadeOutTime, flashDuration, showWhenDone, flashInHoldTime, flashOutHoldTime) + + local FlashAnimation = self.FlashAnimation + local fadeIn = FlashAnimation.fadeIn + local fadeOut = FlashAnimation.fadeOut + + fadeIn:SetDuration (fadeInTime) + fadeIn:SetEndDelay (flashInHoldTime or 0) + + fadeOut:SetDuration (fadeOutTime) + fadeOut:SetEndDelay (flashOutHoldTime or 0) + + fadeIn:SetOrder (1) + fadeOut:SetOrder (2) + + fadeIn:SetChange (-1) + fadeOut:SetChange (1) + + FlashAnimation.duration = flashDuration + FlashAnimation.loopTime = FlashAnimation:GetDuration() + FlashAnimation.finishAt = GetTime() + flashDuration + FlashAnimation.showWhenDone = showWhenDone + + FlashAnimation:SetLooping ("REPEAT") + + FlashAnimation:Play() + end + + function gump:CreateFlashAnimation (frame) + + local FlashAnimation = frame:CreateAnimationGroup() + + FlashAnimation.fadeIn = FlashAnimation:CreateAnimation ("Alpha") --> fade in anime + FlashAnimation.fadeOut = FlashAnimation:CreateAnimation ("Alpha") --> fade out anime + + frame.FlashAnimation = FlashAnimation + FlashAnimation.frame = frame + + FlashAnimation:SetScript ("OnLoop", onLoop) + FlashAnimation:SetScript ("OnFinished", onFinish) + + frame.Flash = flash + + end + + --> todo: remove the function creation everytime this function run. function gump:Fade (frame, tipo, velocidade, parametros) if (_type (frame) == "table") then diff --git a/framework/cooltip.lua b/framework/cooltip.lua index 1470c634..269af11f 100644 --- a/framework/cooltip.lua +++ b/framework/cooltip.lua @@ -132,6 +132,8 @@ function DetailsCreateCoolTip() CoolTip.Host = nil --> frame to anchor CoolTip.LastSize = 0 --> last size + CoolTip.LastIndex = 0 + --defaults CoolTip.default_height = 20 CoolTip.default_text_size = 10.5 @@ -142,9 +144,13 @@ function DetailsCreateCoolTip() --> main frame local frame1 = CreateFrame ("Frame", "CoolTipFrame1", UIParent, "CooltipMainFrameTemplate") tinsert (UISpecialFrames, "CoolTipFrame1") + gump:CreateFlashAnimation (frame1) + --> secondary frame local frame2 = CreateFrame ("Frame", "CoolTipFrame2", UIParent, "CooltipMainFrameTemplate") tinsert (UISpecialFrames, "CoolTipFrame2") + gump:CreateFlashAnimation (frame2) + frame2:SetPoint ("bottomleft", frame1, "bottomright") CoolTip.frame1 = frame1 @@ -303,6 +309,7 @@ function DetailsCreateCoolTip() end) frame1:SetScript ("OnHide", function (self) + --[[ --> avoid taint errors if (not frame1.hidden) then --> significa que foi fechado com ESC frame1:Show() gump:Fade (frame1, 1) @@ -311,6 +318,7 @@ function DetailsCreateCoolTip() frame2:Show() gump:Fade (frame2, 1) end + --]] CoolTip.active = false CoolTip.buttonClicked = false CoolTip.mouseOver = false @@ -509,7 +517,7 @@ function DetailsCreateCoolTip() frame2.selected:SetPoint ("top", self, "top", 0, -1) frame2.selected:SetPoint ("bottom", self, "bottom") - UIFrameFlash (frame2.selected, 0.05, 0.05, 0.2, true, 0, 0) + --UIFrameFlash (frame2.selected, 0.05, 0.05, 0.2, true, 0, 0) if (CoolTip.FunctionsTableSub [self.mainIndex] and CoolTip.FunctionsTableSub [self.mainIndex] [self.index]) then local parameterTable = CoolTip.ParametersTableSub [self.mainIndex] [self.index] @@ -1345,7 +1353,7 @@ function DetailsCreateCoolTip() CoolTip.buttonClicked = true frame1.selected:SetPoint ("top", botao, "top", 0, -1) frame1.selected:SetPoint ("bottom", botao, "bottom") - UIFrameFlash (frame1.selected, 0.05, 0.05, 0.2, true, 0, 0) + --UIFrameFlash (frame1.selected, 0.05, 0.05, 0.2, true, 0, 0) elseif (menuType == 2) then --sub menu CoolTip:ShowSub (mainIndex) @@ -1353,7 +1361,7 @@ function DetailsCreateCoolTip() CoolTip.buttonClicked = true frame2.selected:SetPoint ("top", botao, "top", 0, -1) frame2.selected:SetPoint ("bottom", botao, "bottom") - UIFrameFlash (frame2.selected, 0.05, 0.05, 0.2, true, 0, 0) + --UIFrameFlash (frame2.selected, 0.05, 0.05, 0.2, true, 0, 0) end end @@ -1373,6 +1381,9 @@ function DetailsCreateCoolTip() CoolTip.SubIndexes = 0 _table_wipe (CoolTip.IndexesSub) + --> + + --[ _table_wipe (CoolTip.LeftTextTable) _table_wipe (CoolTip.LeftTextTableSub) _table_wipe (CoolTip.RightTextTable) @@ -1383,6 +1394,16 @@ function DetailsCreateCoolTip() _table_wipe (CoolTip.RightIconTable) _table_wipe (CoolTip.RightIconTableSub) + _table_wipe (CoolTip.StatusBarTable) + _table_wipe (CoolTip.StatusBarTableSub) + + _table_wipe (CoolTip.FunctionsTableMain) + _table_wipe (CoolTip.FunctionsTableSub) + + _table_wipe (CoolTip.ParametersTableMain) + _table_wipe (CoolTip.ParametersTableSub) + --]] + _table_wipe (CoolTip.TopIconTableSub) CoolTip.Banner [1] = false CoolTip.Banner [2] = false @@ -1394,16 +1415,7 @@ function DetailsCreateCoolTip() frame1.upperImageText2:Hide() frame2.upperImage:Hide() - - _table_wipe (CoolTip.StatusBarTable) - _table_wipe (CoolTip.StatusBarTableSub) - - _table_wipe (CoolTip.FunctionsTableMain) - _table_wipe (CoolTip.FunctionsTableSub) - - _table_wipe (CoolTip.ParametersTableMain) - _table_wipe (CoolTip.ParametersTableSub) - + CoolTip.title1 = nil CoolTip.title_text = nil @@ -2214,7 +2226,8 @@ function DetailsCreateCoolTip() CoolTip:ShowCooltip() if (fromClick) then - UIFrameFlash (frame1, 0.05, 0.05, 0.2, true, 0, 0) + --UIFrameFlash (frame1, ) + frame1:Flash (0.05, 0.05, 0.2, true, 0, 0) end end diff --git a/functions/boss.lua b/functions/boss.lua index 5a17dea4..0f1f14a6 100644 --- a/functions/boss.lua +++ b/functions/boss.lua @@ -18,6 +18,11 @@ do end end + --> return the ids of trash mobs in the instance + function _detalhes:GetInstanceTrashInfo (mapid) + return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].trash_ids + end + --> return the function for the boss function _detalhes:GetEncounterEnd (mapid, bossindex) local t = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] diff --git a/functions/slash.lua b/functions/slash.lua index ae6bbd2d..2ce51afb 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -60,11 +60,23 @@ function SlashCmdList.DETAILS (msg, editbox) -------- debug --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + elseif (msg == "time") then + print ("GetTime()", GetTime()) + print ("time()", time()) + elseif (msg == "copy") then _G.DetailsCopy:Show() _G.DetailsCopy.MyObject.text:HighlightText() _G.DetailsCopy.MyObject.text:SetFocus() + elseif (msg == "garbage") then + local a = {} + for i = 1, 10000 do + a [i] = {math.random (50000)} + end + table.wipe (a) + elseif (msg == "raid") then local player, realm = "Marleyieu", "Azralon" @@ -267,6 +279,7 @@ function SlashCmdList.DETAILS (msg, editbox) end _detalhes.id_frame:Show() + _detalhes.id_frame.texto:SetFocus() if (pass_guid == "-") then local guid = UnitGUID ("target") @@ -282,6 +295,80 @@ function SlashCmdList.DETAILS (msg, editbox) _detalhes.id_frame.texto:HighlightText() end + --> debug + elseif (command == "actors") then + + local t, filter = rest:match("^(%S*)%s*(.-)$") + + t = tonumber (t) + if (not t) then + return print ("not T found.") + end + + local f = _detalhes.actorsFrame + if (not f) then + _detalhes.actorsFrame = _detalhes.gump:NewPanel (UIParent, nil, "DetailsActorsFrame", nil, 300, 600) + _detalhes.actorsFrame:SetPoint ("center", UIParent, "center", 300, 0) + _detalhes.actorsFrame.barras = {} + + local container_barras_window = CreateFrame ("ScrollFrame", "Details_ActorsBarrasScroll", _detalhes.actorsFrame.widget) + local container_barras = CreateFrame ("Frame", "Details_ActorsBarras", container_barras_window) + _detalhes.actorsFrame.container = container_barras + + container_barras_window:SetBackdrop({ + edgeFile = "Interface\\DialogFrame\\UI-DialogBox-gold-Border", tile = true, tileSize = 16, edgeSize = 5, + insets = {left = 1, right = 1, top = 0, bottom = 1},}) + container_barras_window:SetBackdropBorderColor (0, 0, 0, 0) + + container_barras:SetBackdrop({ + bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, + insets = {left = 1, right = 1, top = 0, bottom = 1},}) + container_barras:SetBackdropColor (0, 0, 0, 0) + + container_barras:SetAllPoints (container_barras_window) + container_barras:SetWidth (300) + container_barras:SetHeight (150) + container_barras:EnableMouse (true) + container_barras:SetResizable (false) + container_barras:SetMovable (true) + + container_barras_window:SetWidth (260) + container_barras_window:SetHeight (550) + container_barras_window:SetScrollChild (container_barras) + container_barras_window:SetPoint ("TOPLEFT", _detalhes.actorsFrame.widget, "TOPLEFT", 21, -10) + + _detalhes.gump:NewScrollBar (container_barras_window, container_barras, -10, -17) + container_barras_window.slider:Altura (560) + container_barras_window.slider:cimaPoint (0, 1) + container_barras_window.slider:baixoPoint (0, -3) + container_barras_window.slider:SetFrameLevel (10) + + container_barras_window.ultimo = 0 + + container_barras_window.gump = container_barras + --container_barras_window.slider = slider_gump + end + + local container = _detalhes.tabela_vigente [t]._ActorTable + print (#container, "actors found.") + for index, actor in ipairs (container) do + + local row = _detalhes.actorsFrame.barras [index] + if (not row) then + row = {text = _detalhes.actorsFrame.container:CreateFontString (nil, "overlay", "GameFontNormal")} + _detalhes.actorsFrame.barras [index] = row + row.text:SetPoint ("topleft", _detalhes.actorsFrame.container, "topleft", 0, -index * 15) + end + + if (filter and actor.nome:find (filter)) then + row.text:SetTextColor (1, 1, 0) + else + row.text:SetTextColor (1, 1, 1) + end + + row.text:SetText (actor.nome) + + end --> debug elseif (msg == "id") then diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 918c924c..f1b4e777 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -662,10 +662,12 @@ function gump:CriaJanelaInfo() --> fix para dar fadein ao apertar esc este_gump:SetScript ("OnHide", function (self) + --[[ avoid taint problems if (not este_gump.hidden) then --> significa que foi fechado com ESC este_gump:Show() - _detalhes:FechaJanelaInfo(1) end + --]] + _detalhes:FechaJanelaInfo() end) --> propriedades da janela diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 3f1a0e4c..5280a8a5 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -46,46 +46,46 @@ function _detalhes:OpenOptionsWindow (instance) if (amount == 1) then slider.amt:SetText ("<= 1gb") _detalhes.memory_ram = 16 - _detalhes.segments_amount = 5 - _detalhes.segments_amount_to_save = 2 - _detalhes.update_speed = 1.5 + --_detalhes.segments_amount = 5 + --_detalhes.segments_amount_to_save = 2 + --_detalhes.update_speed = 1.5 - _G.DetailsOptionsWindowSlider.MyObject:SetValue (_detalhes.segments_amount) - _G.DetailsOptionsWindowSliderSegmentsSave.MyObject:SetValue (_detalhes.segments_amount_to_save) - _G.DetailsOptionsWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed) + --_G.DetailsOptionsWindowSlider.MyObject:SetValue (_detalhes.segments_amount) + --_G.DetailsOptionsWindowSliderSegmentsSave.MyObject:SetValue (_detalhes.segments_amount_to_save) + --_G.DetailsOptionsWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed) elseif (amount == 2) then slider.amt:SetText ("2gb") _detalhes.memory_ram = 32 - _detalhes.segments_amount = 10 - _detalhes.segments_amount_to_save = 3 - _detalhes.update_speed = 1.2 + --_detalhes.segments_amount = 10 + --_detalhes.segments_amount_to_save = 3 + --_detalhes.update_speed = 1.2 - _G.DetailsOptionsWindowSlider.MyObject:SetValue (_detalhes.segments_amount) - _G.DetailsOptionsWindowSliderSegmentsSave.MyObject:SetValue (_detalhes.segments_amount_to_save) - _G.DetailsOptionsWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed) + --_G.DetailsOptionsWindowSlider.MyObject:SetValue (_detalhes.segments_amount) + --_G.DetailsOptionsWindowSliderSegmentsSave.MyObject:SetValue (_detalhes.segments_amount_to_save) + --_G.DetailsOptionsWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed) elseif (amount == 3) then slider.amt:SetText ("4gb") _detalhes.memory_ram = 64 - _detalhes.segments_amount = 20 - _detalhes.segments_amount_to_save = 5 - _detalhes.update_speed = 1.0 + --_detalhes.segments_amount = 20 + --_detalhes.segments_amount_to_save = 5 + --_detalhes.update_speed = 1.0 - _G.DetailsOptionsWindowSlider.MyObject:SetValue (_detalhes.segments_amount) - _G.DetailsOptionsWindowSliderSegmentsSave.MyObject:SetValue (_detalhes.segments_amount_to_save) - _G.DetailsOptionsWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed) + --_G.DetailsOptionsWindowSlider.MyObject:SetValue (_detalhes.segments_amount) + --_G.DetailsOptionsWindowSliderSegmentsSave.MyObject:SetValue (_detalhes.segments_amount_to_save) + --_G.DetailsOptionsWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed) elseif (amount == 4) then slider.amt:SetText (">= 6gb") _detalhes.memory_ram = 128 - _detalhes.segments_amount = 25 - _detalhes.segments_amount_to_save = 5 - _detalhes.update_speed = 0.5 + --_detalhes.segments_amount = 25 + --_detalhes.segments_amount_to_save = 5 + --_detalhes.update_speed = 0.5 - _G.DetailsOptionsWindowSlider.MyObject:SetValue (_detalhes.segments_amount) - _G.DetailsOptionsWindowSliderSegmentsSave.MyObject:SetValue (_detalhes.segments_amount_to_save) - _G.DetailsOptionsWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed) + --_G.DetailsOptionsWindowSlider.MyObject:SetValue (_detalhes.segments_amount) + --_G.DetailsOptionsWindowSliderSegmentsSave.MyObject:SetValue (_detalhes.segments_amount_to_save) + --_G.DetailsOptionsWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed) end diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 0b4bc80a..9e79cb29 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -2486,8 +2486,291 @@ function _detalhes:DefaultIcons (_mode, _segment, _attributes, _report) return true end +local parameters_table = {} + +local on_leave_menu = function (self, elapsed) + parameters_table[2] = parameters_table[2] + elapsed + if (parameters_table[2] > 0.3) then + if (not _detalhes.popup.mouseOver and not _detalhes.popup.buttonOver) then + _detalhes.popup:ShowMe (false) + end + self:SetScript ("OnUpdate", nil) + end +end + +local build_mode_list = function (self, elapsed) + + local CoolTip = GameCooltip + local instancia = parameters_table [1] + parameters_table[2] = parameters_table[2] + elapsed + + if (parameters_table[2] > 0.15) then + self:SetScript ("OnUpdate", nil) + + CoolTip:Reset() + CoolTip:SetType ("menu") + CoolTip:AddFromTable (parameters_table [4]) + CoolTip:SetLastSelected ("main", parameters_table [3]) + CoolTip:SetFixedParameter (instancia) + CoolTip:SetColor ("main", "transparent") + + CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus) + CoolTip:SetOption ("ButtonHeightMod", -5) + CoolTip:SetOption ("ButtonsYMod", -5) + CoolTip:SetOption ("YSpacingMod", 1) + CoolTip:SetOption ("FixedHeight", 106) + --CoolTip:SetOption ("FixedWidth", 138) + CoolTip:SetOption ("FixedWidthSub", 146) + CoolTip:SetOption ("SubMenuIsTooltip", true) + + if (_detalhes.tutorial.main_help_button > 9) then + CoolTip:SetOption ("IgnoreSubMenu", true) + end + + if (instancia.consolidate) then + CoolTip:SetOwner (self, "topleft", "topright", 3) + else + CoolTip:SetOwner (self) + end + CoolTip:ShowCooltip() + end +end + +local segments_used = 0 +local segments_filled = 0 local empty_segment_color = {1, 1, 1, .4} +-- search key: ~segments +local build_segment_list = function (self, elapsed) + + local CoolTip = GameCooltip + local instancia = parameters_table [1] + parameters_table[2] = parameters_table[2] + elapsed + + if (parameters_table[2] > 0.15) then + self:SetScript ("OnUpdate", nil) + + --> here we are using normal Add calls + CoolTip:Reset() + CoolTip:SetType ("menu") + CoolTip:SetFixedParameter (instancia) + CoolTip:SetColor ("main", "transparent") + + ----------- segments + local menuIndex = 0 + _detalhes.segments_amount = math.floor (_detalhes.segments_amount) + + local fight_amount = 0 + + local filled_segments = 0 + for i = 1, _detalhes.segments_amount do + if (_detalhes.tabela_historico.tabelas [i]) then + filled_segments = filled_segments + 1 + else + break + end + end + + filled_segments = _detalhes.segments_amount - filled_segments - 2 + local fill = math.abs (filled_segments - _detalhes.segments_amount) + segments_used = 0 + segments_filled = fill + + for i = _detalhes.segments_amount, 1, -1 do + + if (i <= fill) then + + local thisCombat = _detalhes.tabela_historico.tabelas [i] + if (thisCombat) then + local enemy = thisCombat.is_boss and thisCombat.is_boss.name + segments_used = segments_used + 1 + + if (thisCombat.is_boss and thisCombat.is_boss.name) then + + if (thisCombat.is_boss.killed) then + CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, "lime") + else + CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, "red") + end + + local portrait = _detalhes:GetBossPortrait (thisCombat.is_boss.mapid, thisCombat.is_boss.index) + if (portrait) then + CoolTip:AddIcon (portrait, 2, "top", 128, 64) + end + CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 16, 0.96875, 1, 0, 0.03125) + else + enemy = thisCombat.enemy + if (enemy) then + CoolTip:AddLine (thisCombat.enemy .." (#"..i..")", _, 1, "yellow") + else + CoolTip:AddLine (segmentos.past..i, _, 1, "silver") + end + + if (thisCombat.is_trash) then + CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.02734375, 0.11328125, 0.19140625, 0.3125) + else + CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16) + end + end + + CoolTip:AddMenu (1, instancia.TrocaTabela, i) + + CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white") + + local decorrido = (thisCombat.end_time or _detalhes._tempo) - thisCombat.start_time + local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) + CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white") + + CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white") + CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white") + + fight_amount = fight_amount + 1 + else + CoolTip:AddLine (Loc ["STRING_SEGMENT_LOWER"] .. " #" .. i, _, 1, "gray") + CoolTip:AddMenu (1, instancia.TrocaTabela, i) + CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16, nil, nil, nil, nil, empty_segment_color) + CoolTip:AddLine (Loc ["STRING_SEGMENT_EMPTY"], _, 2) + end + + if (menuIndex) then + menuIndex = menuIndex + 1 + if (instancia.segmento == i) then + CoolTip:SetLastSelected ("main", menuIndex); --print (2) + menuIndex = nil + end + end + + end + + end + + ----------- current + CoolTip:AddLine (segmentos.current_standard, _, 1, "white") + CoolTip:AddMenu (1, instancia.TrocaTabela, 0) + CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16, nil, nil, nil, nil, "orange") + + local enemy = _detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name or _detalhes.tabela_vigente.enemy or "--x--x--" + + if (_detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name) then + local portrait = _detalhes:GetBossPortrait (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index) + if (portrait) then + CoolTip:AddIcon (portrait, 2, "top", 128, 64) + end + end + + CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white") + + if (not _detalhes.tabela_vigente.end_time) then + if (_detalhes.in_combat) then + local decorrido = _detalhes._tempo - _detalhes.tabela_vigente.start_time + local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) + CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white") + else + CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", "--x--x--", 2, "white", "white") + end + else + local decorrido = (_detalhes.tabela_vigente.end_time) - _detalhes.tabela_vigente.start_time + local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) + CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white") + end + + + CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", _detalhes.tabela_vigente.data_inicio, 2, "white", "white") + CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", _detalhes.tabela_vigente.data_fim or "in progress", 2, "white", "white") + + --> fill é a quantidade de menu que esta sendo mostrada + if (instancia.segmento == 0) then + if (fill - 2 == menuIndex) then + CoolTip:SetLastSelected ("main", fill - 1)--; print (21) + elseif (fill - 1 == menuIndex) then + CoolTip:SetLastSelected ("main", fill)--; print (22) + else + CoolTip:SetLastSelected ("main", fill + 1)--; print (23) + end + + menuIndex = nil + end + + ----------- overall + --CoolTip:AddLine (segmentos.overall_standard, _, 1, "white") Loc ["STRING_REPORT_LAST"] .. " " .. fight_amount .. " " .. Loc ["STRING_REPORT_FIGHTS"] + CoolTip:AddLine (Loc ["STRING_SEGMENT_OVERALL"], _, 1, "white") + CoolTip:AddMenu (1, instancia.TrocaTabela, -1) + CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16, nil, nil, nil, nil, "orange") + + CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", "--x--x--", 2, "white", "white")--localize-me + + if (not _detalhes.tabela_overall.end_time) then + if (_detalhes.in_combat) then + local decorrido = _detalhes._tempo - _detalhes.tabela_overall.start_time + local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) + CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white") + else + CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", "--x--x--", 2, "white", "white") + end + else + local decorrido = (_detalhes.tabela_overall.end_time) - _detalhes.tabela_overall.start_time + local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) + CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white") + end + + local earlyFight = "" + for i = _detalhes.segments_amount, 1, -1 do + if (_detalhes.tabela_historico.tabelas [i]) then + earlyFight = _detalhes.tabela_historico.tabelas [i].data_inicio + break + end + end + CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", earlyFight, 2, "white", "white") + + local lastFight = "" + for i = 1, _detalhes.segments_amount do + if (_detalhes.tabela_historico.tabelas [i] and _detalhes.tabela_historico.tabelas [i].data_fim ~= 0) then + lastFight = _detalhes.tabela_historico.tabelas [i].data_fim + break + end + end + CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", lastFight, 2, "white", "white") + + --> fill é a quantidade de menu que esta sendo mostrada + if (instancia.segmento == -1) then + if (fill - 2 == menuIndex) then + CoolTip:SetLastSelected ("main", fill)--; print (31) + elseif (fill - 1 == menuIndex) then + CoolTip:SetLastSelected ("main", fill+1)--; print (32) + else + CoolTip:SetLastSelected ("main", fill + 2)--; print (33) + end + menuIndex = nil + end + + --------------------------------------------- + + if (instancia.consolidate) then + CoolTip:SetOwner (self, "topleft", "topright", 3) + else + CoolTip:SetOwner (self) + end + + CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus) + CoolTip:SetOption ("SubMenuIsTooltip", true) + + CoolTip:SetOption ("ButtonHeightMod", -4) + CoolTip:SetOption ("ButtonsYMod", -4) + CoolTip:SetOption ("YSpacingMod", 4) + + CoolTip:SetOption ("ButtonHeightModSub", 4) + CoolTip:SetOption ("ButtonsYModSub", 0) + CoolTip:SetOption ("YSpacingModSub", -4) + + CoolTip:ShowCooltip() + + self:SetScript ("OnUpdate", nil) + end + +end + + + function gump:CriaCabecalho (BaseFrame, instancia) -- texturas da barra superior @@ -2588,10 +2871,9 @@ function gump:CriaCabecalho (BaseFrame, instancia) local CoolTip = _G.GameCooltip --> SELEÇÃO DO MODO ---------------------------------------------------------------------------------------------------------------------------------------------------- - BaseFrame.cabecalho.modo_selecao = gump:NewDetailsButton (BaseFrame, _, instancia, instancia.AlteraModo, instancia, -2, 16, 16, - "Interface\\GossipFrame\\HealerGossipIcon") - BaseFrame.cabecalho.modo_selecao:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) + BaseFrame.cabecalho.modo_selecao = gump:NewButton (BaseFrame, nil, "DetailsModeButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\GossipFrame\HealerGossipIcon]]) + BaseFrame.cabecalho.modo_selecao:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) BaseFrame.cabecalho.modo_selecao:SetPoint ("BOTTOMLEFT", BaseFrame.cabecalho.ball, "BOTTOMRIGHT", 0, 2) --> Generating Cooltip menu from table template @@ -2624,7 +2906,6 @@ function gump:CriaCabecalho (BaseFrame, instancia) {text = Loc ["STRING_OPTIONS_WINDOW"]}, {func = _detalhes.OpenOptionsWindow}, {icon = "Interface\\AddOns\\Details\\images\\modo_icones", l = 32/256*4, r = 32/256*5, t = 0, b = 1, width = 20, height = 20}, - --{icon = "Interface\\HELPFRAME\\OpenTicketIcon", width = 24, height = 20} } --> Cooltip raw method for enter/leave show/hide @@ -2650,39 +2931,12 @@ function gump:CriaCabecalho (BaseFrame, instancia) checked = 4 end - self:SetScript ("OnUpdate", function (self, elapsed) - passou = passou+elapsed - if (passou > 0.15) then - self:SetScript ("OnUpdate", nil) - - CoolTip:Reset() - CoolTip:SetType ("menu") - CoolTip:AddFromTable (modeMenuTable) - CoolTip:SetLastSelected ("main", checked) - CoolTip:SetFixedParameter (instancia) - CoolTip:SetColor ("main", "transparent") - - CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus) - CoolTip:SetOption ("ButtonHeightMod", -5) - CoolTip:SetOption ("ButtonsYMod", -5) - CoolTip:SetOption ("YSpacingMod", 1) - CoolTip:SetOption ("FixedHeight", 106) - --CoolTip:SetOption ("FixedWidth", 138) - CoolTip:SetOption ("FixedWidthSub", 146) - CoolTip:SetOption ("SubMenuIsTooltip", true) - - if (_detalhes.tutorial.main_help_button > 9) then - CoolTip:SetOption ("IgnoreSubMenu", true) - end - - if (instancia.consolidate) then - CoolTip:SetOwner (self, "topleft", "topright", 3) - else - CoolTip:SetOwner (self) - end - CoolTip:ShowCooltip() - end - end) + parameters_table [1] = instancia + parameters_table [2] = passou + parameters_table [3] = checked + parameters_table [4] = modeMenuTable + + self:SetScript ("OnUpdate", build_mode_list) end) BaseFrame.cabecalho.modo_selecao:SetScript ("OnLeave", function (self) @@ -2692,44 +2946,66 @@ function gump:CriaCabecalho (BaseFrame, instancia) BaseFrame.cabecalho.button_mouse_over = false if (_detalhes.popup.active) then - local passou = 0 - self:SetScript ("OnUpdate", function (self, elapsed) - passou = passou+elapsed - if (passou > 0.3) then - if (not _detalhes.popup.mouseOver and not _detalhes.popup.buttonOver) then - _detalhes.popup:ShowMe (false) - end - self:SetScript ("OnUpdate", nil) - end - end) + parameters_table [2] = 0 + self:SetScript ("OnUpdate", on_leave_menu) else self:SetScript ("OnUpdate", nil) end end) --> SELECIONAR O SEGMENTO ---------------------------------------------------------------------------------------------------------------------------------------------------- - - --[[ - BaseFrame.cabecalho.segmento = gump:NewButton (BaseFrame, nil, "DetailsSegmentButton"..instancia.meu_id, nil, 16, 16, function() end, nil, nil, "Interface\GossipFrame\TrainerGossipIcon") + BaseFrame.cabecalho.segmento = gump:NewButton (BaseFrame, nil, "DetailsSegmentButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\GossipFrame\TrainerGossipIcon]]) BaseFrame.cabecalho.segmento:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) - + BaseFrame.cabecalho.segmento:SetHook ("OnMouseUp", function (button, buttontype) + if (buttontype == "LeftButton") then + local segmento_goal = instancia.segmento + 1 - if (segmento_goal > _detalhes.segments_amount) then - + if (segmento_goal > segments_used) then + segmento_goal = -1 + elseif (segmento_goal > _detalhes.segments_amount) then + segmento_goal = -1 end + + local total_shown = segments_filled+2 + local goal = segmento_goal+1 + + local select_ = math.abs (goal - total_shown) + GameCooltip:Select (1, select_) + + return instancia:TrocaTabela (segmento_goal) elseif (buttontype == "RightButton") then - --instancia:TrocaTabela (-2) + + local segmento_goal = instancia.segmento - 1 + if (segmento_goal < -1) then + segmento_goal = segments_used + end + + local total_shown = segments_filled+2 + local goal = segmento_goal+1 + + local select_ = math.abs (goal - total_shown) + GameCooltip:Select (1, select_) + + return instancia:TrocaTabela (segmento_goal) + + elseif (buttontype == "MiddleButton") then + + local segmento_goal = 0 + + local total_shown = segments_filled+2 + local goal = segmento_goal+1 + + local select_ = math.abs (goal - total_shown) + GameCooltip:Select (1, select_) + + return instancia:TrocaTabela (segmento_goal) + end end) - --]] - - BaseFrame.cabecalho.segmento = gump:NewDetailsButton (BaseFrame, _, instancia, instancia.TrocaTabela, instancia, -2, 16, 16, "Interface\\GossipFrame\\TrainerGossipIcon") - BaseFrame.cabecalho.segmento:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) - BaseFrame.cabecalho.segmento:SetPoint ("left", BaseFrame.cabecalho.modo_selecao, "right", 0, 0) - + --> Cooltip raw method for show/hide onenter/onhide BaseFrame.cabecalho.segmento:SetScript ("OnEnter", function (self) gump:Fade (BaseFrame.button_stretch, "alpha", 0.3) @@ -2742,206 +3018,9 @@ function gump:CriaCabecalho (BaseFrame, instancia) passou = 0.15 end - self:SetScript ("OnUpdate", function (self, elapsed) - passou = passou+elapsed - if (passou > 0.15) then - - --> here we are using normal Add calls - CoolTip:Reset() - CoolTip:SetType ("menu") - CoolTip:SetFixedParameter (instancia) - CoolTip:SetColor ("main", "transparent") - - ----------- segments - local menuIndex = 0 - _detalhes.segments_amount = math.floor (_detalhes.segments_amount) - - local fight_amount = 0 - - local filled_segments = 0 - for i = 1, _detalhes.segments_amount do - if (_detalhes.tabela_historico.tabelas [i]) then - filled_segments = filled_segments + 1 - else - break - end - end - - filled_segments = _detalhes.segments_amount - filled_segments - 2 - local fill = math.abs (filled_segments - _detalhes.segments_amount) - - for i = _detalhes.segments_amount, 1, -1 do - - if (i <= fill) then - - local thisCombat = _detalhes.tabela_historico.tabelas [i] - if (thisCombat) then - local enemy = thisCombat.is_boss and thisCombat.is_boss.name - - if (thisCombat.is_boss and thisCombat.is_boss.name) then - - if (thisCombat.is_boss.killed) then - CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, "lime") - else - CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, "red") - end - - local portrait = _detalhes:GetBossPortrait (thisCombat.is_boss.mapid, thisCombat.is_boss.index) - if (portrait) then - CoolTip:AddIcon (portrait, 2, "top", 128, 64) - end - CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 16, 0.96875, 1, 0, 0.03125) - else - enemy = thisCombat.enemy - if (enemy) then - CoolTip:AddLine (thisCombat.enemy .." (#"..i..")", _, 1, "yellow") - else - CoolTip:AddLine (segmentos.past..i, _, 1, "silver") - end - CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16) - end - - CoolTip:AddMenu (1, instancia.TrocaTabela, i) - - CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white") - - local decorrido = (thisCombat.end_time or _detalhes._tempo) - thisCombat.start_time - local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) - CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white") - - CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white") - CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white") - - fight_amount = fight_amount + 1 - else - CoolTip:AddLine (Loc ["STRING_SEGMENT_LOWER"] .. " #" .. i, _, 1, "gray") - CoolTip:AddMenu (1, instancia.TrocaTabela, i) - CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16, nil, nil, nil, nil, empty_segment_color) - CoolTip:AddLine (Loc ["STRING_SEGMENT_EMPTY"], _, 2) - end - - if (menuIndex) then - menuIndex = menuIndex + 1 - if (instancia.segmento == i) then - CoolTip:SetLastSelected ("main", menuIndex) - menuIndex = nil - end - end - - end - - end - - ----------- current - CoolTip:AddLine (segmentos.current_standard, _, 1, "white") - CoolTip:AddMenu (1, instancia.TrocaTabela, 0) - CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16, nil, nil, nil, nil, "orange") - - local enemy = _detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name or _detalhes.tabela_vigente.enemy or "--x--x--" - - if (_detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name) then - local portrait = _detalhes:GetBossPortrait (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index) - if (portrait) then - CoolTip:AddIcon (portrait, 2, "top", 128, 64) - end - end - - CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white") - - if (not _detalhes.tabela_vigente.end_time) then - if (_detalhes.in_combat) then - local decorrido = _detalhes._tempo - _detalhes.tabela_vigente.start_time - local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) - CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white") - else - CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", "--x--x--", 2, "white", "white") - end - else - local decorrido = (_detalhes.tabela_vigente.end_time) - _detalhes.tabela_vigente.start_time - local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) - CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white") - end - - - CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", _detalhes.tabela_vigente.data_inicio, 2, "white", "white") - CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", _detalhes.tabela_vigente.data_fim or "in progress", 2, "white", "white") - - --> fill é a quantidade de menu que esta sendo mostrada - if (instancia.segmento == 0) then - CoolTip:SetLastSelected ("main", fill + 1) - menuIndex = nil - end - - ----------- overall - --CoolTip:AddLine (segmentos.overall_standard, _, 1, "white") Loc ["STRING_REPORT_LAST"] .. " " .. fight_amount .. " " .. Loc ["STRING_REPORT_FIGHTS"] - CoolTip:AddLine (Loc ["STRING_SEGMENT_OVERALL"], _, 1, "white") - CoolTip:AddMenu (1, instancia.TrocaTabela, -1) - CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16, nil, nil, nil, nil, "orange") - - CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", "--x--x--", 2, "white", "white")--localize-me - - if (not _detalhes.tabela_overall.end_time) then - if (_detalhes.in_combat) then - local decorrido = _detalhes._tempo - _detalhes.tabela_overall.start_time - local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) - CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white") - else - CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", "--x--x--", 2, "white", "white") - end - else - local decorrido = (_detalhes.tabela_overall.end_time) - _detalhes.tabela_overall.start_time - local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) - CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white") - end - - local earlyFight = "" - for i = _detalhes.segments_amount, 1, -1 do - if (_detalhes.tabela_historico.tabelas [i]) then - earlyFight = _detalhes.tabela_historico.tabelas [i].data_inicio - break - end - end - CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", earlyFight, 2, "white", "white") - - local lastFight = "" - for i = 1, _detalhes.segments_amount do - if (_detalhes.tabela_historico.tabelas [i] and _detalhes.tabela_historico.tabelas [i].data_fim ~= 0) then - lastFight = _detalhes.tabela_historico.tabelas [i].data_fim - break - end - end - CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", lastFight, 2, "white", "white") - - --> fill é a quantidade de menu que esta sendo mostrada - if (instancia.segmento == -1) then - CoolTip:SetLastSelected ("main", fill + 2) - menuIndex = nil - end - - --------------------------------------------- - - if (instancia.consolidate) then - CoolTip:SetOwner (self, "topleft", "topright", 3) - else - CoolTip:SetOwner (self) - end - - CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus) - CoolTip:SetOption ("SubMenuIsTooltip", true) - - CoolTip:SetOption ("ButtonHeightMod", -4) - CoolTip:SetOption ("ButtonsYMod", -4) - CoolTip:SetOption ("YSpacingMod", 4) - - CoolTip:SetOption ("ButtonHeightModSub", 4) - CoolTip:SetOption ("ButtonsYModSub", 0) - CoolTip:SetOption ("YSpacingModSub", -4) - - CoolTip:ShowCooltip() - - self:SetScript ("OnUpdate", nil) - end - end) + parameters_table [1] = instancia + parameters_table [2] = passou + self:SetScript ("OnUpdate", build_segment_list) end) --> Cooltip raw method @@ -2952,16 +3031,8 @@ function gump:CriaCabecalho (BaseFrame, instancia) BaseFrame.cabecalho.button_mouse_over = false if (_detalhes.popup.active) then - local passou = 0 - self:SetScript ("OnUpdate", function (self, elapsed) - passou = passou+elapsed - if (passou > 0.3) then - if (not _detalhes.popup.mouseOver and not _detalhes.popup.buttonOver) then - _detalhes.popup:ShowMe (false) - end - self:SetScript ("OnUpdate", nil) - end - end) + parameters_table [2] = 0 + self:SetScript ("OnUpdate", on_leave_menu) else self:SetScript ("OnUpdate", nil) end diff --git a/gumps/janela_report.lua b/gumps/janela_report.lua index 01efbe48..764d1f90 100644 --- a/gumps/janela_report.lua +++ b/gumps/janela_report.lua @@ -77,7 +77,7 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals end if (_detalhes.janela_report.ativa) then - UIFrameFlash (_detalhes.janela_report, 0.2, 0.2, 0.19, true, 0, 0) + _detalhes.janela_report:Flash (0.2, 0.2, 0.4, true, 0, 0) end _detalhes.janela_report.ativa = true @@ -125,7 +125,7 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals end if (_detalhes.janela_report.ativa) then - UIFrameFlash (_detalhes.janela_report, 0.2, 0.2, 0.19, true, 0, 0) + _detalhes.janela_report:Flash (0.2, 0.2, 0.4, true, 0, 0) end _detalhes.janela_report.ativa = true @@ -411,11 +411,13 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals _tinsert (_UISpecialFrames, este_gump:GetName()) este_gump:SetScript ("OnHide", function (self) + --[[ avoid taint problems if (not este_gump.hidden or este_gump.fading_in) then --> trick to fade an window closed by pressing escape este_gump:Show() gump:Fade (este_gump, "in") - _detalhes.janela_report.ativa = false end + --]] + _detalhes.janela_report.ativa = false end) este_gump:SetPoint ("CENTER", UIParent) @@ -476,6 +478,7 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals este_gump.enviar:SetText (Loc ["STRING_REPORTFRAME_SEND"]) gump:Fade (este_gump, 1) + gump:CreateFlashAnimation (este_gump) return este_gump diff --git a/images/icons.tga b/images/icons.tga index e1493878a20c6c6e810c5a1323dac221ec3771dd..c94dae999aee71f0da8a4ae1d475be5211aee94b 100644 GIT binary patch delta 6858 zcmYjV2Uyff+uhxeEJY9m6qKg)Dj-doD54@35DTc-6+}U)B1KqOsiO211f_SR8x+NY zioJVPuD#*4q9`5SZ)Rcr|9zg5ok?=ubLO3rNzQjG#2!(M;xf4`F2NOQBF!9_wY0ed zna*bZpl>cAnM~#=@Agvi4+;8e1~+&e%gApeD9Kyg;+eButxO-@(gw zCTp0zyk#z=l?Z6)EWI;NcdjKb&4nyRXU$iTvqVOWH7sr$s~Fhw0#=X(BC!kX!v5X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;yJ-`%7#@tE&&G?DrqgIZECe*r;X2YXwb6F$Q&P3&kxc zC~#m*f(*o{!H@?g4Fx3J$j6O(g5w=>AH&oeT2EPA`4D}=nCm3B)Irq3r9!e+sN;rE^INbKHSh$_A}-_{Pk`=*k4K=~AL&AG4e=!8AL4fqH*3ZmBLq8kn28D8Zdx2 zgk>lE*laQ~iCu4`V*$D_(L)VxQkTmE+4VX$D8ix b[2] end) diff --git a/plugins/Details_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua index 70ab96e3..e84e94c1 100644 --- a/plugins/Details_EncounterDetails/frames.lua +++ b/plugins/Details_EncounterDetails/frames.lua @@ -482,7 +482,7 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: BossFrame.raidbackground = BossFrame:CreateTexture (nil, "BACKGROUND") BossFrame.raidbackground:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 244, -74) - BossFrame.raidbackground:SetWidth (512) + BossFrame.raidbackground:SetWidth (450) BossFrame.raidbackground:SetHeight (256) --> background completo diff --git a/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua b/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua index e42f5cc9..92351eda 100644 --- a/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua +++ b/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua @@ -77,6 +77,57 @@ local siege_of_orgrimmar = { [71865] = 14, -- Garrosh Hellscream }, + trash_ids = { + --Immerseus + [73349] = true, --Tormented Initiate + [73342] = true, --Fallen Pool Tender + [73226] = true, --Lesser Sha Pool + [73191] = true, --Aqueius Defender + + -- Norushen + [72655] = true, --Fragment of Pride + [72658] = true, --Amalmated Hubris + [72662] = true, --Vanity + [72663] = true, --Arrogance + [72661] = true, --Zeal + + --Sha of Pride + [72791] = true, --lingering corruption + --[] = true, -- + --[] = true, -- + --[] = true, -- + + --Galakras + --[72367] = true, --dragonmaw tidal shaman + --[72354] = true, --dragonmaw bonecrusher + [72365] = true, --dragonmaw canoner + [72350] = true, --dragonmaw elite grunt + --[72351] = true, --dragonmaw flamebarer + + --> shamans + [72412] = true, -- korkron grunt + [72150] = true, -- kro kron shadowmage + [72451] = true, -- + [72455] = true, -- + [72490] = true, --overseer mojka + [72434] = true, --tresure guard + [72421] = true, --korkron overseer + [72452] = true, --dire wolf + [72496] = true, --overseer thathung + [72562] = true, --poison bolt toten + + --> nazgrim + [72131] = true, -- blind blade master + [72191] = true, -- overlord runthak + [72194] = true, -- hellscreen demolisher + [72564] = true, -- doom lord + [71771] = true, -- korkron arcweaver + [71772] = true, -- korkron assassin + [71773] = true, -- krokron warshaman + [71770] = true, -- krokron iron blade + [71715] = true, -- orgrimmar faithful + }, + encounters = { ------------> Immerseus ------------------------------------------------------------------------------ @@ -149,6 +200,11 @@ local siege_of_orgrimmar = { boss = "The Fallen Protectors", portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Golden Lotus Council]], + combat_end = {2, { 71479, -- He Softfoot + 71480, -- Sun Tenderheart + 71475, -- Rook Stonetoe + }}, + spell_mechanics = { [144397] = {0x8000, 0x1}, --> Vengeful Strikes (Rook Stonetoe) [143023] = {0x8}, --> Corrupted Brew (Rook Stonetoe) @@ -488,6 +544,8 @@ local siege_of_orgrimmar = { boss = "Iron Juggernaut", portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Iron Juggernaut]], + combat_end = {1, 71466}, + spell_mechanics = { [144464] = {0x100}, --> Flame Vents [144467] = {0x100, 0x1}, --> Ignite Armor @@ -512,7 +570,8 @@ local siege_of_orgrimmar = { phases = { { --> phase 1: Pressing the Attack: Assault Mode adds = { - 72050 --> Crawler Mines + 72050, --> Crawler Mines + 71466 --> iron juggernaut }, spells = { 144464, --> Flame Vents @@ -528,7 +587,7 @@ local siege_of_orgrimmar = { }, { --> phase 2: Breaking the Defense: Siege Mode: adds = { - + 71466 --> iron juggernaut }, spells = { 144483, --> Seismic Activity @@ -547,6 +606,7 @@ local siege_of_orgrimmar = { [7] = { boss = "Kor'kron Dark Shaman", portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-KorKron Dark Shaman]], + combat_end = {1, 71859}, spell_mechanics = { [144303] = {0x1}, --Swipe @@ -624,6 +684,8 @@ local siege_of_orgrimmar = { boss = "General Nazgrim", portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-General Nazgrim]], + combat_end = {1, 71515}, + spell_mechanics = { [143494] = {0x100}, --Sundering Blow [143638] = {0x1}, --Bonecracker @@ -680,6 +742,8 @@ local siege_of_orgrimmar = { boss = "Malkorok", portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Malkorok]], + combat_end = {1, 71454}, + spell_mechanics = { [142861] = {0x200}, --Ancient Miasma [142906] = {0x200}, --Ancient Miasma @@ -912,6 +976,8 @@ local siege_of_orgrimmar = { boss = "Thok the Bloodthirsty", portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Thok the Bloodthirsty]], + combat_end = {1, 71529}, + spell_mechanics = { [143426] = {0x100}, --Fearsome Roar [143428] = {0x40}, --Tail Lash @@ -936,7 +1002,7 @@ local siege_of_orgrimmar = { phases = { { --> phase 1: A Cry in the Darkness adds = { - + 71529 --> Thok the Bloodthirsty }, spells = { 143426, --Fearsome Roar @@ -972,6 +1038,8 @@ local siege_of_orgrimmar = { boss = "Siegecrafter Blackfuse", portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Siegecrafter Blackfuse]], + combat_end = {1, 71504}, + spell_mechanics = { [144335] = {0x8}, --Matter Purification Beam [143385] = {0x100}, --Electrostatic Charge @@ -1041,6 +1109,18 @@ local siege_of_orgrimmar = { [13] = { boss = "Paragons of the Klaxxi", portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Klaxxi Paragons]], + + combat_end = {2, { + 71161, --Kil'ruk the Wind-Reaver + 71157, --Xaril the Poisoned Mind + 71158, --Rik'kal the Dissector + 71152, --Skeer the Bloodseeker + 71160, --Iyyokuk the Lucid + 71155, --Korven the Prime + 71156, -- Kaz'tik the Manipulator + 71154, -- Ka'roz the Locust + 71153, -- Hisek the Swarmkeeper + }}, spell_mechanics = { --Kil'ruk the Wind-Reaver @@ -1234,6 +1314,8 @@ local siege_of_orgrimmar = { boss = "Garrosh Hellscream", portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Garrosh Hellscream]], + combat_end = {1, 71865}, + spell_mechanics = { [144582] = {0x1}, --Hamstring (Kor'kron Warbringers) [144758] = {0x1, 0x40}, --Desecrate @@ -1257,6 +1339,7 @@ local siege_of_orgrimmar = { 71979, --Kor'kron Warbringers 71983, --Farseer Wolf Riders 71984, --Siege Engineers + 71865, --Garrosh Hellscream }, spells = { 144758, --Desecrate @@ -1272,6 +1355,7 @@ local siege_of_orgrimmar = { 72237, --Embodied Fears 72238, --Embodied Doubts 72236, --Embodied Despairs + 71865, --Garrosh Hellscream }, spells = { 144969 --Annihilate @@ -1280,8 +1364,8 @@ local siege_of_orgrimmar = { { --> phase 3: adds = { - 72272 --Minion of Y'Shaarj - + 72272, --Minion of Y'Shaarj + 71865, --Garrosh Hellscream }, spells = { 144989, --Whirling Corruption @@ -1298,7 +1382,8 @@ local siege_of_orgrimmar = { { --> phase 4: adds = { - 72272 --Minion of Y'Shaarj + 72272, --Minion of Y'Shaarj + 71865, --Garrosh Hellscream }, spells = { 145033, --Empowered Whirling Corruption