- Improvements on Overall Data.

This commit is contained in:
Tercio
2015-02-20 14:52:39 -02:00
parent e9d559abac
commit 4954ac14d3
21 changed files with 391 additions and 129 deletions
+24 -6
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -3771,7 +3771,7 @@ function _detalhes.refresh:r_atributo_damage (este_jogador, shadow)
_setmetatable (este_jogador, _detalhes.atributo_damage)
este_jogador.__index = _detalhes.atributo_damage
--> restaura as metas dos containers
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow.spells)
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells)
end
function _detalhes.clear:c_atributo_damage (este_jogador)
+2 -2
View File
@@ -1564,9 +1564,9 @@ function _detalhes.refresh:r_atributo_energy (este_jogador, shadow)
_setmetatable (este_jogador, _detalhes.atributo_energy)
este_jogador.__index = _detalhes.atributo_energy
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow.spells)
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells)
if (not shadow.powertype) then
if (shadow and not shadow.powertype) then
shadow.powertype = este_jogador.powertype
end
end
+1 -1
View File
@@ -2441,7 +2441,7 @@ function _detalhes.refresh:r_atributo_heal (este_jogador, shadow)
_setmetatable (este_jogador, atributo_heal)
este_jogador.__index = atributo_heal
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow.spells)
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells)
end
function _detalhes.clear:c_atributo_heal (este_jogador)
+17 -17
View File
@@ -2456,9 +2456,9 @@ function atributo_misc:r_connect_shadow (actor, no_refresh)
end
if (actor.buff_uptime) then
if (not shadow.buff_uptime_spell_targets) then
if (not shadow.buff_uptime_targets) then
shadow.buff_uptime = 0
shadow.buff_uptime_spell_targets = {}
shadow.buff_uptime_targets = {}
shadow.buff_uptime_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
@@ -2627,28 +2627,28 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
--> refresh interrupts
if (este_jogador.interrupt_targets) then
if (not shadow.interrupt_targets) then
if (shadow and not shadow.interrupt_targets) then
shadow.interrupt = 0
shadow.interrupt_targets = {}
shadow.interrupt_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
shadow.interrompeu_oque = {}
end
_detalhes.refresh:r_container_habilidades (este_jogador.interrupt_spells, shadow.interrupt_spells)
_detalhes.refresh:r_container_habilidades (este_jogador.interrupt_spells, shadow and shadow.interrupt_spells)
end
--> refresh buff uptime
if (este_jogador.buff_uptime_targets) then
if (not shadow.buff_uptime_spell_targets) then
if (shadow and not shadow.buff_uptime_targets) then
shadow.buff_uptime = 0
shadow.buff_uptime_spell_targets = {}
shadow.buff_uptime_targets = {}
shadow.buff_uptime_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
_detalhes.refresh:r_container_habilidades (este_jogador.buff_uptime_spells, shadow.buff_uptime_spells)
_detalhes.refresh:r_container_habilidades (este_jogador.buff_uptime_spells, shadow and shadow.buff_uptime_spells)
end
--> refresh buff uptime
if (este_jogador.debuff_uptime_targets) then
if (not shadow.debuff_uptime_targets) then
if (shadow and not shadow.debuff_uptime_targets) then
shadow.debuff_uptime = 0
if (este_jogador.boss_debuff) then
shadow.debuff_uptime_targets = {}
@@ -2662,49 +2662,49 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
end
shadow.debuff_uptime_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
_detalhes.refresh:r_container_habilidades (este_jogador.debuff_uptime_spells, shadow.debuff_uptime_spells)
_detalhes.refresh:r_container_habilidades (este_jogador.debuff_uptime_spells, shadow and shadow.debuff_uptime_spells)
end
--> refresh cooldowns defensive
if (este_jogador.cooldowns_defensive_targets) then
if (not shadow.cooldowns_defensive_targets) then
if (shadow and not shadow.cooldowns_defensive_targets) then
shadow.cooldowns_defensive = 0
shadow.cooldowns_defensive_targets = {}
shadow.cooldowns_defensive_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
_detalhes.refresh:r_container_habilidades (este_jogador.cooldowns_defensive_spells, shadow.cooldowns_defensive_spells)
_detalhes.refresh:r_container_habilidades (este_jogador.cooldowns_defensive_spells, shadow and shadow.cooldowns_defensive_spells)
end
--> refresh ressers
if (este_jogador.ress_targets) then
if (not shadow.ress_targets) then
if (shadow and not shadow.ress_targets) then
shadow.ress = 0
shadow.ress_targets = {}
shadow.ress_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
_detalhes.refresh:r_container_habilidades (este_jogador.ress_spells, shadow.ress_spells)
_detalhes.refresh:r_container_habilidades (este_jogador.ress_spells, shadow and shadow.ress_spells)
end
--> refresh dispells
if (este_jogador.dispell_targets) then
if (not shadow.dispell_targets) then
if (shadow and not shadow.dispell_targets) then
shadow.dispell = 0
shadow.dispell_targets = {}
shadow.dispell_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
shadow.dispell_oque = {}
end
_detalhes.refresh:r_container_habilidades (este_jogador.dispell_spells, shadow.dispell_spells)
_detalhes.refresh:r_container_habilidades (este_jogador.dispell_spells, shadow and shadow.dispell_spells)
end
--> refresh cc_breaks
if (este_jogador.cc_break_targets) then
if (not shadow.cc_break) then
if (shadow and not shadow.cc_break) then
shadow.cc_break = 0
shadow.cc_break_targets = {}
shadow.cc_break_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
shadow.cc_break_oque = {}
end
_detalhes.refresh:r_container_habilidades (este_jogador.cc_break_spells, shadow.cc_break_spells)
_detalhes.refresh:r_container_habilidades (este_jogador.cc_break_spells, shadow and shadow.cc_break_spells)
end
end
+17 -1
View File
@@ -33,9 +33,21 @@ function historico:adicionar_overall (tabela)
end
end
--> store the segments added to the overall data
_detalhes.tabela_overall.segments_added = _detalhes.tabela_overall.segments_added or {}
tinsert (_detalhes.tabela_overall.segments_added, {name = tabela:GetCombatName (true), elapsed = tabela:GetCombatTime(), clock = tabela:GetDate()[1]})
_detalhes.tabela_overall = _detalhes.tabela_overall + tabela
tabela.overall_added = true
if (not _detalhes.tabela_overall.overall_enemy_name) then
_detalhes.tabela_overall.overall_enemy_name = tabela.is_boss and tabela.is_boss.name or tabela.enemy
else
if (_detalhes.tabela_overall.overall_enemy_name ~= (tabela.is_boss and tabela.is_boss.name or tabela.enemy)) then
_detalhes.tabela_overall.overall_enemy_name = "-- x -- x --"
end
end
if (_detalhes.tabela_overall.start_time == 0) then
_detalhes.tabela_overall.start_time = tabela.start_time
_detalhes.tabela_overall.end_time = tabela.end_time
@@ -222,16 +234,20 @@ function _detalhes:CheckFreeze (instancia, index_liberado, tabela)
end
end
function _detalhes:OverallOptions (reset_new_boss, reset_new_challenge)
function _detalhes:OverallOptions (reset_new_boss, reset_new_challenge, reset_on_logoff)
if (reset_new_boss == nil) then
reset_new_boss = _detalhes.overall_clear_newboss
end
if (reset_new_challenge == nil) then
reset_new_challenge = _detalhes.overall_clear_newchallenge
end
if (reset_on_logoff == nil) then
reset_on_logoff = _detalhes.overall_clear_logout
end
_detalhes.overall_clear_newboss = reset_new_boss
_detalhes.overall_clear_newchallenge = reset_new_challenge
_detalhes.overall_clear_logout = reset_on_logoff
end
function historico:resetar_overall()
+201 -27
View File
@@ -49,6 +49,66 @@
tabela._NameIndexTable = mapa
end
--> reaplica as tabelas no overall
function _detalhes:RestauraOverallMetaTables()
local is_in_instance = select (1, IsInInstance())
local combate = _detalhes.tabela_overall
combate.overall_refreshed = true
combate.hasSaved = true
combate.__call = _detalhes.call_combate
_detalhes.refresh:r_combate (combate)
_detalhes.refresh:r_container_combatentes (combate [class_type_dano])
_detalhes.refresh:r_container_combatentes (combate [class_type_cura])
_detalhes.refresh:r_container_combatentes (combate [class_type_e_energy])
_detalhes.refresh:r_container_combatentes (combate [class_type_misc])
local todos_atributos = {combate [class_type_dano]._ActorTable, combate [class_type_cura]._ActorTable, combate [class_type_e_energy]._ActorTable, combate [class_type_misc]._ActorTable}
for class_type, atributo in _ipairs (todos_atributos) do
for _, esta_classe in _ipairs (atributo) do
local nome = esta_classe.nome
if (is_in_instance and _detalhes.remove_realm_from_name) then
esta_classe.displayName = nome:gsub (("%-.*"), "")
elseif (_detalhes.remove_realm_from_name) then
esta_classe.displayName = nome:gsub (("%-.*"), "%*")
else
esta_classe.displayName = nome
end
if (class_type == class_type_dano) then
_detalhes.refresh:r_atributo_damage (esta_classe)
elseif (class_type == class_type_cura) then
_detalhes.refresh:r_atributo_heal (esta_classe)
elseif (class_type == class_type_e_energy) then
_detalhes.refresh:r_atributo_energy (esta_classe)
elseif (class_type == class_type_misc) then
_detalhes.refresh:r_atributo_misc (esta_classe)
end
end
end
for class_type, atributo in _ipairs (todos_atributos) do
for _, esta_classe in _ipairs (atributo) do
if (esta_classe.ownerName) then --> nome do owner
esta_classe.owner = combate (class_type, esta_classe.ownerName)
end
end
end
end
--> reaplica indexes e metatables
function _detalhes:RestauraMetaTables()
@@ -78,10 +138,13 @@
end
--> tempo padrao do overall
--combate_overall.start_time = _tempo
combate_overall.start_time = GetTime()
--combate_overall.end_time = _tempo
combate_overall.end_time = GetTime()
local overall_saved = combate_overall.overall_refreshed
if (not overall_saved) then
combate_overall.start_time = GetTime()
combate_overall.end_time = GetTime()
end
local is_in_instance = select (1, IsInInstance())
@@ -90,15 +153,29 @@
for index, combate in _ipairs (tabelas_do_historico) do
combate.hasSaved = true
--> aumenta o tempo do combate do overall
if (combate.end_time and combate.start_time) then
combate_overall.start_time = combate_overall.start_time - (combate.end_time - combate.start_time)
end
--> recupera a meta e indexes da tabela do combate
_detalhes.refresh:r_combate (combate, combate_overall)
--> aumenta o tempo do combate do overall
if (combate.end_time and combate.start_time and not overall_saved) then
combate_overall.start_time = combate_overall.start_time - (combate.end_time - combate.start_time)
end
if (not overall_saved and combate.overall_added) then
if (not _detalhes.tabela_overall.overall_enemy_name) then
_detalhes.tabela_overall.overall_enemy_name = combate.is_boss and combate.is_boss.name or combate.enemy
else
if (_detalhes.tabela_overall.overall_enemy_name ~= (combate.is_boss and combate.is_boss.name or combate.enemy)) then
_detalhes.tabela_overall.overall_enemy_name = "-- x -- x --"
end
end
combate_overall.segments_added =combate_overall.segments_added or {}
tinsert (combate_overall.segments_added, {name = combate:GetCombatName (true), elapsed = combate:GetCombatTime(), clock = combate:GetDate()[1]})
end
--> recupera a meta e indexes dos 4 container
_detalhes.refresh:r_container_combatentes (combate [class_type_dano], overall_dano)
_detalhes.refresh:r_container_combatentes (combate [class_type_cura], overall_cura)
@@ -124,28 +201,28 @@
local shadow
if (class_type == class_type_dano) then
if (combate.overall_added) then
if (combate.overall_added and not overall_saved) then
shadow = atributo_damage:r_connect_shadow (esta_classe)
else
shadow = atributo_damage:r_onlyrefresh_shadow (esta_classe)
end
elseif (class_type == class_type_cura) then
if (combate.overall_added) then
if (combate.overall_added and not overall_saved) then
shadow = atributo_heal:r_connect_shadow (esta_classe)
else
shadow = atributo_heal:r_onlyrefresh_shadow (esta_classe)
end
elseif (class_type == class_type_e_energy) then
if (combate.overall_added) then
if (combate.overall_added and not overall_saved) then
shadow = atributo_energy:r_connect_shadow (esta_classe)
else
shadow = atributo_energy:r_onlyrefresh_shadow (esta_classe)
end
elseif (class_type == class_type_misc) then
if (combate.overall_added) then
if (combate.overall_added and not overall_saved) then
shadow = atributo_misc:r_connect_shadow (esta_classe)
else
shadow = atributo_misc:r_onlyrefresh_shadow (esta_classe)
@@ -291,17 +368,35 @@
end
function _detalhes:DoOwnerCleanup()
for index, combat in _ipairs (_detalhes.tabela_historico.tabelas or {}) do
local combats = _detalhes.tabela_historico.tabelas or {}
local overall_added
if (not _detalhes.overall_clear_logout) then
tinsert (combats, _detalhes.tabela_overall)
overall_added = true
end
for index, combat in _ipairs (combats) do
for index, container in _ipairs (combat) do
for index, esta_classe in _ipairs (container._ActorTable) do
esta_classe.owner = nil
end
end
end
if (overall_added) then
tremove (combats, #combats)
end
end
function _detalhes:DoClassesCleanup()
for index, combat in _ipairs (_detalhes.tabela_historico.tabelas or {}) do
local combats = _detalhes.tabela_historico.tabelas or {}
local overall_added
if (not _detalhes.overall_clear_logout) then
tinsert (combats, _detalhes.tabela_overall)
overall_added = true
end
for index, combat in _ipairs (combats) do
for class_type, container in _ipairs (combat) do
for index, esta_classe in _ipairs (container._ActorTable) do
@@ -321,32 +416,60 @@
end
end
end
if (overall_added) then
tremove (combats, #combats)
end
end
function _detalhes:DoContainerCleanup()
for index, combat in _ipairs (_detalhes.tabela_historico.tabelas or {}) do
local combats = _detalhes.tabela_historico.tabelas or {}
local overall_added
if (not _detalhes.overall_clear_logout) then
tinsert (combats, _detalhes.tabela_overall)
overall_added = true
end
for index, combat in _ipairs (combats) do
_detalhes.clear:c_combate (combat)
for index, container in _ipairs (combat) do
_detalhes.clear:c_container_combatentes (container)
end
end
if (overall_added) then
tremove (combats, #combats)
end
end
function _detalhes:DoContainerIndexCleanup()
for index, combat in _ipairs (_detalhes.tabela_historico.tabelas or {}) do
local combats = _detalhes.tabela_historico.tabelas or {}
local overall_added
if (not _detalhes.overall_clear_logout) then
tinsert (combats, _detalhes.tabela_overall)
overall_added = true
end
for index, combat in _ipairs (combats) do
for index, container in _ipairs (combat) do
_detalhes.clear:c_container_combatentes_index (container)
end
end
if (overall_added) then
tremove (combats, #combats)
end
end
--> limpa indexes, metatables e shadows
function _detalhes:PrepareTablesForSave()
_detalhes.clear_ungrouped = true
--> clear instances
_detalhes:DoInstanceCleanup()
_detalhes:DoClassesCleanup()
_detalhes:DoContainerCleanup()
_detalhes:DoClassesCleanup() --aumentou 1 combat
_detalhes:DoContainerCleanup() --aumentou 1 combat
--> clear combats
local tabelas_de_combate = {}
@@ -373,12 +496,65 @@
local tabela_atual = _detalhes.tabela_vigente or _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
--> limpa a tabela overall
_detalhes.tabela_overall = nil
if (_detalhes.overall_clear_logout) then
_detalhes.tabela_overall = nil
_detalhes_database.tabela_overall = nil
else
local _combate = _detalhes.tabela_overall
_combate.previous_combat = nil
local todos_atributos = {_combate [class_type_dano] or {}, _combate [class_type_cura] or {}, _combate [class_type_e_energy] or {}, _combate [class_type_misc] or {}}
for class_type, _tabela in _ipairs (todos_atributos) do
local conteudo = _tabela._ActorTable
--> Limpa tabelas que não estejam em grupo
if (conteudo) then
if (_detalhes.clear_ungrouped) then
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
while (_iter.data) do --search key: ~deletar ~apagar
local can_erase = true
if (_iter.data.grupo or _iter.data.boss or _iter.data.boss_fight_component) then
can_erase = false
else
local owner = _iter.data.owner
if (owner) then
local owner_actor = _combate [class_type]._NameIndexTable [owner.nome]
if (owner_actor) then
local owner_actor = _combate [class_type]._ActorTable [owner_actor]
if (owner_actor) then
if (owner.grupo or owner.boss or owner.boss_fight_component) then
can_erase = false
end
end
end
end
end
if (can_erase) then
_table_remove (conteudo, _iter.index)
_iter.cleaned = _iter.cleaned + 1
_iter.data = conteudo [_iter.index]
else
_iter.index = _iter.index + 1
_iter.data = conteudo [_iter.index]
end
end
if (_iter.cleaned > 0) then
ReconstroiMapa (_tabela)
end
end
end
end
end
for _, _tabela in _ipairs (historico_tabelas) do
tabelas_de_combate [#tabelas_de_combate+1] = _tabela
end
for tabela_index, _combate in _ipairs (tabelas_de_combate) do
--> limpa a tabela do grafico
@@ -409,9 +585,7 @@
--> Limpa tabelas que não estejam em grupo
if (conteudo) then
_detalhes.clear_ungrouped = true
if (_detalhes.clear_ungrouped) then
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
@@ -503,7 +677,7 @@
end
end
if (_iter.cleaned > 0) then --> desencargo de consciência, reconstruir o mapa depois de excluir
if (_iter.cleaned > 0) then
ReconstroiMapa (_tabela)
end
@@ -513,7 +687,7 @@
end
end
--> panic mode
if (_detalhes.segments_panic_mode and _detalhes.can_panic_mode) then
if (_detalhes.tabela_vigente.is_boss) then
+67 -57
View File
@@ -178,71 +178,81 @@ function _detalhes:LoadCombatTables()
_detalhes:UpdateContainerCombatentes()
else
--> build basic containers
-- segments
_detalhes.tabela_historico = _detalhes_database.tabela_historico or _detalhes.historico:NovoHistorico()
-- overall
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
-- pets
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
if (_detalhes_database.tabela_pets) then
_detalhes.tabela_pets.pets = table_deepcopy (_detalhes_database.tabela_pets)
end
_detalhes:UpdateContainerCombatentes()
--> if the core revision was incremented, reset all combat data
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < _detalhes.realversion) then
--> details was been hard upgraded
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
--> build basic containers
-- segments
_detalhes.tabela_historico = _detalhes_database.tabela_historico or _detalhes.historico:NovoHistorico()
-- overall
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
-- pets
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
if (_detalhes_database.tabela_pets) then
_detalhes.tabela_pets.pets = table_deepcopy (_detalhes_database.tabela_pets)
end
_detalhes:UpdateContainerCombatentes()
else
--> check integrity
local combat = _detalhes.tabela_historico.tabelas [1]
if (combat) then
if (not combat[1] or not combat[2] or not combat[3] or not combat[4]) then
--> something went wrong in last logon, let's just reset and we are good to go
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
_detalhes:UpdateContainerCombatentes()
--> if the core revision was incremented, reset all combat data
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < _detalhes.realversion) then
--> details was been hard upgraded
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
_detalhes:UpdateContainerCombatentes()
_detalhes_database.tabela_historico = nil
_detalhes_database.tabela_overall = nil
else
--> check integrity
local combat = _detalhes.tabela_historico.tabelas [1]
if (combat) then
if (not combat[1] or not combat[2] or not combat[3] or not combat[4]) then
--> something went wrong in last logon, let's just reset and we are good to go
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
_detalhes:UpdateContainerCombatentes()
end
end
end
end
--> re-build all indexes and metatables
_detalhes:RestauraMetaTables()
if (not _detalhes.overall_clear_logout) then
if (_detalhes_database.tabela_overall) then
_detalhes.tabela_overall = _detalhes_database.tabela_overall
_detalhes:RestauraOverallMetaTables()
end
end
--> re-build all indexes and metatables
_detalhes:RestauraMetaTables()
--> get last combat table
local historico_UM = _detalhes.tabela_historico.tabelas[1]
--> get last combat table
local historico_UM = _detalhes.tabela_historico.tabelas[1]
if (historico_UM) then
_detalhes.tabela_vigente = historico_UM --> significa que elas eram a mesma tabela, então aqui elas se tornam a mesma tabela
else
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
end
--> need refresh for all containers
for _, container in ipairs (_detalhes.tabela_overall) do
container.need_refresh = true
end
for _, container in ipairs (_detalhes.tabela_vigente) do
container.need_refresh = true
end
if (historico_UM) then
_detalhes.tabela_vigente = historico_UM --> significa que elas eram a mesma tabela, então aqui elas se tornam a mesma tabela
else
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
end
--> need refresh for all containers
for _, container in ipairs (_detalhes.tabela_overall) do
container.need_refresh = true
end
for _, container in ipairs (_detalhes.tabela_vigente) do
container.need_refresh = true
end
--> erase combat data from the database
_detalhes_database.tabela_vigente = nil
_detalhes_database.tabela_historico = nil
_detalhes_database.tabela_pets = nil
-- double check for pet container
if (not _detalhes.tabela_pets or not _detalhes.tabela_pets.pets) then
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
end
_detalhes:UpdateContainerCombatentes()
--> erase combat data from the database
_detalhes_database.tabela_vigente = nil
_detalhes_database.tabela_historico = nil
_detalhes_database.tabela_pets = nil
-- double check for pet container
if (not _detalhes.tabela_pets or not _detalhes.tabela_pets.pets) then
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
end
_detalhes:UpdateContainerCombatentes()
end
end
+10 -8
View File
@@ -18,15 +18,17 @@ do
if (not class) then
for _, container in _ipairs (_detalhes.tabela_overall) do
local index = container._NameIndexTable [name]
if (index) then
local actor = container._ActorTable [index]
if (actor.classe ~= "UNGROUPPLAYER") then
local left, right, top, bottom = unpack (_detalhes.class_coords [actor.classe] or unknown_class_coords)
local r, g, b = unpack (_detalhes.class_colors [actor.classe])
return actor.classe, left, right, top, bottom, r or 1, g or 1, b or 1
--if (container._NameIndexTable) then
local index = container._NameIndexTable [name]
if (index) then
local actor = container._ActorTable [index]
if (actor.classe ~= "UNGROUPPLAYER") then
local left, right, top, bottom = unpack (_detalhes.class_coords [actor.classe] or unknown_class_coords)
local r, g, b = unpack (_detalhes.class_colors [actor.classe])
return actor.classe, left, right, top, bottom, r or 1, g or 1, b or 1
end
end
end
--end
end
return "UNKNOW", 0.75, 1, 0.75, 1, 1, 1, 1, 1
+1
View File
@@ -913,6 +913,7 @@ local default_profile = {
overall_flag = 0xD,
overall_clear_newboss = true,
overall_clear_newchallenge = true,
overall_clear_logout = false,
--> skins
standard_skin = false,
+5
View File
@@ -64,11 +64,16 @@ function _detalhes:SaveConfig()
_detalhes:SaveLocalInstanceConfig()
--> cleanup
_detalhes:PrepareTablesForSave()
_detalhes_database.tabela_instancias = {} --_detalhes.tabela_instancias --[[instances now saves only inside the profile --]]
_detalhes_database.tabela_historico = _detalhes.tabela_historico
if (not _detalhes.overall_clear_logout) then
_detalhes_database.tabela_overall = _detalhes.tabela_overall
end
local name, ttype, difficulty, difficultyName, maxPlayers, playerDifficulty, isDynamicInstance, mapID, instanceGroupSize = GetInstanceInfo()
if (ttype == "party" or ttype == "raid") then
--> salvar container de pet
+15
View File
@@ -4194,6 +4194,19 @@ function window:CreateFrame2()
--
window:CreateLineBackground2 (frame2, "OverallNewChallengeSlider", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_CHALLENGE_DESC"])
--erase on logout overall_clear_logout
g:NewLabel (frame2, _, "$parentOverallOnLogoutLabel", "OverallOnLogoutLabel", Loc ["STRING_OPTIONS_OVERALL_LOGOFF"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallOnLogoutSlider", "OverallOnLogoutSlider", 60, 20, _, _, false)
frame2.OverallOnLogoutSlider:SetPoint ("left", frame2.OverallOnLogoutLabel, "right", 2, 0)
--
frame2.OverallOnLogoutSlider.OnSwitch = function (self, _, value)
_detalhes:OverallOptions (nil, nil, value)
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
--
window:CreateLineBackground2 (frame2, "OverallOnLogoutSlider", "OverallOnLogoutLabel", Loc ["STRING_OPTIONS_OVERALL_LOGOFF_DESC"])
--> captures
--> icons
@@ -4337,6 +4350,7 @@ function window:CreateFrame2()
{"OverallDataAllLabel", 10, true},
{"OverallNewBossLabel", 11, true},
{"OverallNewChallengeLabel", 12},
{"OverallOnLogoutLabel", 13},
}
window:arrange_menu (frame2, left_side, x, window.top_start_at)
@@ -9952,6 +9966,7 @@ end --> if not window
_G.DetailsOptionsWindow2OverallNewBossSlider.MyObject:SetValue (_detalhes.overall_clear_newboss)
_G.DetailsOptionsWindow2OverallNewChallengeSlider.MyObject:SetValue (_detalhes.overall_clear_newchallenge)
_G.DetailsOptionsWindow2OverallOnLogoutSlider.MyObject:SetValue (_detalhes.overall_clear_logout)
_G.DetailsOptionsWindow2CaptureDamageSlider.MyObject:SetValue (_detalhes.capture_real ["damage"])
_G.DetailsOptionsWindow2CaptureHealSlider.MyObject:SetValue (_detalhes.capture_real ["heal"])
+22 -1
View File
@@ -5314,7 +5314,9 @@ local build_segment_list = function (self, elapsed)
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")
local enemy_name = _detalhes.tabela_overall.overall_enemy_name
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy_name, 2, "white", "white")
if (not _detalhes.tabela_overall:GetEndTime()) then
if (_detalhes.in_combat) then
@@ -5350,6 +5352,25 @@ local build_segment_list = function (self, elapsed)
end
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", lastFight, 2, "white", "white")
-- combats added
local combats_added = _detalhes.tabela_overall.segments_added or _detalhes.empty_table
CoolTip:AddLine ("Segments" .. ":", #combats_added, 2, "white", "white")
if (#combats_added > 0) then
CoolTip:AddLine ("", "", 2, "white", "white")
end
for i, segment in _ipairs (combats_added) do
local minutos, segundos = _math_floor (segment.elapsed/60), _math_floor (segment.elapsed%60)
local name = segment.name
if (name:len() > 20) then
name = string.sub (name, 1, #name - (#name - 20))
end
CoolTip:AddLine ("" .. name, minutos.."m "..segundos.."s", 2, "white", "white")
end
--> fill é a quantidade de menu que esta sendo mostrada
if (instancia.segmento == -1) then
if (fill - 2 == menuIndex) then
+1 -1
View File
@@ -1,4 +1,4 @@
local L = LibStub("AceLocale-3.0"):NewLocale("Details", "deDE")
if not L then return end
@localization(locale="deDE", format="lua_additive_table", escape-non-ascii=true)@
@localization(locale="deDE", format="lua_additive_table")@
+1 -1
View File
@@ -1,4 +1,4 @@
local L = LibStub("AceLocale-3.0"):NewLocale("Details", "esES")
if not L then return end
@localization(locale="esES", format="lua_additive_table", escape-non-ascii=true)@
@localization(locale="esES", format="lua_additive_table")@
+1 -1
View File
@@ -1,4 +1,4 @@
local L = LibStub("AceLocale-3.0"):NewLocale("Details", "esMX")
if not L then return end
@localization(locale="esMX", format="lua_additive_table", escape-non-ascii=true)@
@localization(locale="esMX", format="lua_additive_table")@
+1 -1
View File
@@ -1,4 +1,4 @@
local L = LibStub("AceLocale-3.0"):NewLocale("Details", "frFR")
if not L then return end
@localization(locale="frFR", format="lua_additive_table", escape-non-ascii=true)@
@localization(locale="frFR", format="lua_additive_table")@
+1 -1
View File
@@ -1,4 +1,4 @@
local L = LibStub("AceLocale-3.0"):NewLocale("Details", "koKR")
if not L then return end
@localization(locale="koKR", format="lua_additive_table", escape-non-ascii=true)@
@localization(locale="koKR", format="lua_additive_table")@
+1 -1
View File
@@ -1,7 +1,7 @@
local L = LibStub("AceLocale-3.0"):NewLocale("Details", "ptBR")
if not L then return end
@localization(locale="ptBR", format="lua_additive_table", escape-non-ascii=true)@
@localization(locale="ptBR", format="lua_additive_table")@
+1 -1
View File
@@ -1,4 +1,4 @@
local L = LibStub("AceLocale-3.0"):NewLocale("Details", "ruRU")
if not L then return end
@localization(locale="ruRU", format="lua_additive_table", escape-non-ascii=true)@
@localization(locale="ruRU", format="lua_additive_table")@
+1 -1
View File
@@ -1,4 +1,4 @@
local L = LibStub("AceLocale-3.0"):NewLocale("Details", "zhTW")
if not L then return end
@localization(locale="zhTW", format="lua_additive_table", escape-non-ascii=true)@
@localization(locale="zhTW", format="lua_additive_table")@