- 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.
This commit is contained in:
@@ -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]])
|
||||
|
||||
@@ -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
|
||||
--]]
|
||||
@@ -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
|
||||
|
||||
+12
-10
@@ -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
|
||||
|
||||
+7
-16
@@ -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
|
||||
|
||||
+121
-68
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+29
-13
@@ -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
|
||||
|
||||
+18
-9
@@ -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
|
||||
|
||||
+67
-2
@@ -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
|
||||
|
||||
+27
-14
@@ -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
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+24
-24
@@ -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
|
||||
|
||||
|
||||
+341
-270
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Binary file not shown.
@@ -15,6 +15,7 @@ if not Loc then return end
|
||||
Loc ["STRING_TOOOLD"] = "could not be installed because your Details! version is too old."
|
||||
Loc ["STRING_TOOOLD2"] = "your Details! version isn't the same."
|
||||
Loc ["STRING_CHANGED_TO_CURRENT"] = "Segment changed to current"
|
||||
Loc ["STRING_SEGMENT_TRASH"] = "Next Boss Cleanup"
|
||||
|
||||
Loc ["STRING_INSTANCE_LIMIT"] = "max instance number has been reached, you can modify this limit over options panel."
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ if not Loc then return end
|
||||
Loc ["STRING_TOOOLD"] = "nao pode ser instalado pois sua versao do Details! e muito antiga."
|
||||
Loc ["STRING_TOOOLD2"] = "a sua versao do Details! nao e a mesma."
|
||||
Loc ["STRING_CHANGED_TO_CURRENT"] = "Segmento trocado para atual"
|
||||
Loc ["STRING_SEGMENT_TRASH"] = "Caminho do Proximo Boss"
|
||||
|
||||
Loc ["STRING_INSTANCE_LIMIT"] = "o limite de instancias foi atingido, voce pode modificar este limite no painel de opcoes."
|
||||
|
||||
|
||||
@@ -341,8 +341,10 @@ local function EnemySkills (habilidade, barra)
|
||||
|
||||
for index, tabela in _ipairs (tabela_jogadores) do
|
||||
local coords = CLASS_ICON_TCOORDS [tabela[3]]
|
||||
if (coords) then
|
||||
GameTooltip:AddDoubleLine ("|TInterface\\AddOns\\Details\\images\\classes_small:14:14:0:0:128:128:"..(coords[1]*128)..":"..(coords[2]*128)..":"..(coords[3]*128)..":"..(coords[4]*128).."|t "..tabela[1]..": ", _detalhes:comma_value(tabela[2]).." (".._cstr("%.1f", (tabela[2]/total) * 100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
end
|
||||
--GameTooltip:AddDoubleLine ("|TInterface\\AddOns\\Details\\images\\classes_small:14:14:0:0:128:128:"..coords[1]..":"..coords[2]..":"..coords[3]..":"..coords[4].."|t "..tabela[1]..": ", _detalhes:comma_value(tabela[2]).." (".._cstr("%.1f", (tabela[2]/total) * 100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddDoubleLine ("|TInterface\\AddOns\\Details\\images\\classes_small:14:14:0:0:128:128:"..(coords[1]*128)..":"..(coords[2]*128)..":"..(coords[3]*128)..":"..(coords[4]*128).."|t "..tabela[1]..": ", _detalhes:comma_value(tabela[2]).." (".._cstr("%.1f", (tabela[2]/total) * 100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -842,7 +844,7 @@ function EncounterDetails:OpenAndRefresh()
|
||||
tabela.dano_em_total = tabela.dano_em_total + alvo.total
|
||||
end
|
||||
else
|
||||
print ("actor not found: " ..alvo.nome )
|
||||
--print ("actor not found: " ..alvo.nome )
|
||||
end
|
||||
end
|
||||
_table_sort (tabela.dano_em, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user