- Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.
Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.
This commit is contained in:
@@ -1825,6 +1825,10 @@ end
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:CheckSwitchToCurrent()
|
||||
if (DetailsReportWindow and DetailsReportWindow:IsShown()) then
|
||||
_detalhes.delay_CheckSwitchToCurrent = true
|
||||
return
|
||||
end
|
||||
for _, instance in _ipairs (_detalhes.tabela_instancias) do
|
||||
if (instance.ativa and instance.baseframe and instance.segmento ~= 0 and instance.auto_current) then
|
||||
instance:TrocaTabela (0) --> muda o segmento pra current
|
||||
@@ -1897,7 +1901,7 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
|
||||
local segmento = instancia.segmento
|
||||
|
||||
local _fadeType, _fadeSpeed = _unpack (_detalhes.row_fade_in)
|
||||
|
||||
|
||||
if (segmento == _detalhes.segments_amount) then --> significa que o index [5] passou a ser [6] com a entrada da nova tabela
|
||||
instancia.showing = historico.tabelas [_detalhes.segments_amount] --> então ele volta a pegar o index [5] que antes era o index [4]
|
||||
|
||||
@@ -1906,6 +1910,7 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
|
||||
instancia.v_barras = true
|
||||
instancia:ResetaGump()
|
||||
instancia:AtualizaGumpPrincipal (true)
|
||||
_detalhes:AtualizarJanela (instancia)
|
||||
|
||||
elseif (segmento < _detalhes.segments_amount and segmento > 0) then
|
||||
instancia.showing = historico.tabelas [segmento]
|
||||
@@ -1915,6 +1920,7 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
|
||||
instancia.v_barras = true
|
||||
instancia:ResetaGump()
|
||||
instancia:AtualizaGumpPrincipal (true)
|
||||
_detalhes:AtualizarJanela (instancia)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+31
-10
@@ -312,8 +312,27 @@ end
|
||||
--[1] tabela [2] time [3] nome [4] classe [5] maxhealth [6] time of death
|
||||
--[1] true damage/ false heal [2] spellid [3] amount [4] time [5] current health [6] source
|
||||
|
||||
local report_table = {}
|
||||
local ReportSingleDeathFunc = function (IsCurrent, IsReverse, AmtLines)
|
||||
|
||||
AmtLines = AmtLines + 1
|
||||
|
||||
local t = {}
|
||||
for i = 1, _math_min (#report_table, AmtLines) do
|
||||
local table = report_table [i]
|
||||
t [#t+1] = table [1] .. table [4] .. table [2] .. table [3]
|
||||
end
|
||||
|
||||
local title = tremove (t, 1)
|
||||
t = _detalhes.table.reverse (t)
|
||||
tinsert (t, 1, title)
|
||||
|
||||
_detalhes:SendReportLines (t)
|
||||
|
||||
end
|
||||
|
||||
function atributo_misc:ReportSingleDeadLine (morte, instancia)
|
||||
--
|
||||
|
||||
local barra = instancia.barras [morte.minha_barra]
|
||||
|
||||
local max_health = morte [5]
|
||||
@@ -333,11 +352,11 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
|
||||
end
|
||||
local default_len = _detalhes.fontstring_len:GetStringWidth()
|
||||
|
||||
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. Loc ["STRING_ACTORFRAME_REPORTAT"] .. " " .. morte [6]}
|
||||
wipe (report_table)
|
||||
local report_array = report_table
|
||||
report_array[1] = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. Loc ["STRING_ACTORFRAME_REPORTAT"] .. " " .. morte [6], "", "", ""}
|
||||
|
||||
local report_array = {}
|
||||
|
||||
for index, evento in _ipairs (morte [1]) do
|
||||
for index, evento in _ipairs (_detalhes.table.reverse (morte [1])) do
|
||||
if (evento [1] and type (evento [1]) == "boolean") then --> damage
|
||||
if (evento [3]) then
|
||||
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
|
||||
@@ -381,16 +400,18 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
|
||||
end
|
||||
end
|
||||
|
||||
for index = #report_array, 1, -1 do
|
||||
local table = report_array [index]
|
||||
reportar [#reportar+1] = table [1] .. table [4] .. table [2] .. table [3]
|
||||
end
|
||||
_detalhes:SendReportWindow (ReportSingleDeathFunc, nil, nil, true)
|
||||
|
||||
--for index = #report_array, 1, -1 do
|
||||
-- local table = report_array [index]
|
||||
-- reportar [#reportar+1] = table [1] .. table [4] .. table [2] .. table [3]
|
||||
--end
|
||||
|
||||
--for index, table in _ipairs (report_array) do
|
||||
-- reportar [#reportar+1] = table [1] .. table [4] .. table [2] .. table [3]
|
||||
--end
|
||||
|
||||
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
|
||||
--return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
|
||||
end
|
||||
|
||||
function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
|
||||
|
||||
@@ -35,7 +35,11 @@ function historico:adicionar_overall (tabela)
|
||||
|
||||
--> 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]})
|
||||
tinsert (_detalhes.tabela_overall.segments_added, 1, {name = tabela:GetCombatName (true), elapsed = tabela:GetCombatTime(), clock = tabela:GetDate()[1]})
|
||||
|
||||
if (#_detalhes.tabela_overall.segments_added > 20) then
|
||||
tremove (_detalhes.tabela_overall.segments_added, 21)
|
||||
end
|
||||
|
||||
_detalhes.tabela_overall = _detalhes.tabela_overall + tabela
|
||||
tabela.overall_added = true
|
||||
@@ -291,8 +295,7 @@ function historico:adicionar (tabela)
|
||||
|
||||
--> chama a função que irá atualizar as instâncias com segmentos no histórico
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos_AfterCombat, self)
|
||||
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizarJanela)
|
||||
--_detalhes:InstanciaCallFunction (_detalhes.AtualizarJanela)
|
||||
end
|
||||
|
||||
--> verifica se tem alguma instancia congelada mostrando o segmento recém liberado
|
||||
|
||||
+19
-4
@@ -230,7 +230,7 @@
|
||||
--> internal functions
|
||||
-- _detalhes.statistics = {container_calls = 0, container_pet_calls = 0, container_unknow_pet = 0, damage_calls = 0, heal_calls = 0, absorbs_calls = 0, energy_calls = 0, pets_summons = 0}
|
||||
|
||||
-- ~start ~inicio
|
||||
-- ~start ~inicio ~novo ñovo
|
||||
function _detalhes:EntrarEmCombate (...)
|
||||
|
||||
if (_detalhes.debug) then
|
||||
@@ -333,7 +333,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
-- ~end
|
||||
-- ~end ~leave
|
||||
function _detalhes:SairDoCombate (bossKilled, from_encounter_end)
|
||||
|
||||
if (_detalhes.debug) then
|
||||
@@ -592,8 +592,8 @@
|
||||
_detalhes:CancelTimer (_detalhes.cloud_process)
|
||||
end
|
||||
|
||||
_detalhes.in_combat = false --sinaliza ao addon que não há combate no momento
|
||||
_detalhes.leaving_combat = false --sinaliza que não esta mais saindo do combate
|
||||
_detalhes.in_combat = false
|
||||
_detalhes.leaving_combat = false
|
||||
|
||||
_detalhes:OnCombatPhaseChanged()
|
||||
_table_wipe (_detalhes.tabela_vigente.PhaseData.damage_section)
|
||||
@@ -964,8 +964,23 @@
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:PostponeInstanceToCurrent (instance)
|
||||
if ((instance.last_interaction+6 < _detalhes._tempo) and (not DetailsReportWindow or not DetailsReportWindow:IsShown())) then
|
||||
if (instance.segmento == 0) then
|
||||
return _detalhes:TrocaSegmentoAtual (instance)
|
||||
end
|
||||
end
|
||||
_detalhes:ScheduleTimer ("PostponeInstanceToCurrent", 2, instance)
|
||||
end
|
||||
|
||||
function _detalhes:TrocaSegmentoAtual (instancia)
|
||||
if (instancia.segmento == 0) then --> esta mostrando a tabela Atual
|
||||
|
||||
if ((instancia.last_interaction and (instancia.last_interaction+6 > _detalhes._tempo)) or (DetailsReportWindow and DetailsReportWindow:IsShown())) then
|
||||
--> postpone
|
||||
return _detalhes:ScheduleTimer ("PostponeInstanceToCurrent", 2, instancia)
|
||||
end
|
||||
|
||||
instancia.showing =_detalhes.tabela_vigente
|
||||
instancia:ResetaGump()
|
||||
_detalhes.gump:Fade (instancia, "in", nil, "barras")
|
||||
|
||||
@@ -566,6 +566,8 @@
|
||||
--> enter
|
||||
JoinChannelByName (room_name)
|
||||
_detalhes.is_connected = true
|
||||
|
||||
_detalhes:SendEvent ("REALM_CHANNEL_ENTER")
|
||||
end
|
||||
|
||||
function _detalhes:LeaveChatChannel()
|
||||
@@ -601,6 +603,8 @@
|
||||
_detalhes.is_connected = false
|
||||
|
||||
_detalhes.listener:UnregisterEvent ("CHAT_MSG_CHANNEL")
|
||||
|
||||
_detalhes:SendEvent ("REALM_CHANNEL_LEAVE")
|
||||
end
|
||||
|
||||
function _detalhes:DoZoneCheck()
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
--File Revision: 1
|
||||
--Last Modification: 27/07/2013
|
||||
-- Change Log:
|
||||
-- 27/07/2013: Finished alpha version.
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
+22
-11
@@ -188,9 +188,31 @@
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
--> reverse numerical table
|
||||
function _detalhes:reverse_table (t)
|
||||
local new = {}
|
||||
local index = 1
|
||||
for i = #t, 1, -1 do
|
||||
new [index] = t[i]
|
||||
index = index + 1
|
||||
end
|
||||
return new
|
||||
end
|
||||
|
||||
_detalhes.table = {}
|
||||
|
||||
function _detalhes.table.reverse (t)
|
||||
local new = {}
|
||||
local index = 1
|
||||
for i = #t, 1, -1 do
|
||||
new [index] = t[i]
|
||||
index = index + 1
|
||||
end
|
||||
return new
|
||||
end
|
||||
--yah, i know
|
||||
|
||||
function _detalhes.table.copy (t1, t2)
|
||||
local table_deepcopy = table_deepcopy
|
||||
for key, value in pairs (t2) do
|
||||
@@ -309,17 +331,6 @@
|
||||
return from > #s and "" or s:match(".*%S", from)
|
||||
end
|
||||
|
||||
--> reverse numerical table
|
||||
function _detalhes:reverse_table (t)
|
||||
local new = {}
|
||||
local index = 1
|
||||
for i = #t, 1, -1 do
|
||||
new [index] = t[i]
|
||||
index = index + 1
|
||||
end
|
||||
return new
|
||||
end
|
||||
|
||||
-- lua base64 codec (c) 2006-2008 by Alex Kloss - http://www.it-rfc.de - licensed under the terms of the LGPL2 - http://lua-users.org/wiki/BaseSixtyFour
|
||||
do
|
||||
_detalhes._encode = {}
|
||||
|
||||
+10
-6
@@ -1,13 +1,10 @@
|
||||
--File Revision: 1
|
||||
--Last Modification: 27/07/2013
|
||||
-- Change Log:
|
||||
-- 27/07/2013: Finished alpha version.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
|
||||
--> Event types:
|
||||
_detalhes.RegistredEvents = {
|
||||
--> instances
|
||||
@@ -50,7 +47,12 @@
|
||||
|
||||
--> buffs
|
||||
["BUFF_UPDATE"] = {},
|
||||
["BUFF_UPDATE_DEBUFFPOWER"] = {}
|
||||
["BUFF_UPDATE_DEBUFFPOWER"] = {},
|
||||
|
||||
--> network
|
||||
["REALM_CHANNEL_ENTER"] = {},
|
||||
["REALM_CHANNEL_LEAVE"] = {},
|
||||
|
||||
}
|
||||
|
||||
local function AlreadyRegistred (_tables, _object)
|
||||
@@ -93,6 +95,8 @@ local common_events = {
|
||||
["GROUP_ONENTER"] = true,
|
||||
["GROUP_ONLEAVE"] = true,
|
||||
["ZONE_TYPE_CHANGED"] = true,
|
||||
["REALM_CHANNEL_ENTER"] = true,
|
||||
["REALM_CHANNEL_LEAVE"] = true,
|
||||
}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@ local classe_icones = _G.CLASS_ICON_TCOORDS
|
||||
|
||||
function _detalhes:AbreJanelaInfo (jogador, from_att_change)
|
||||
|
||||
--print (debugstack())
|
||||
|
||||
if (not _detalhes.row_singleclick_overwrite [self.atributo] or not _detalhes.row_singleclick_overwrite [self.atributo][self.sub_atributo]) then
|
||||
_detalhes:FechaJanelaInfo()
|
||||
return
|
||||
|
||||
@@ -348,6 +348,7 @@ local function OnEnterMainWindow (instancia, self)
|
||||
instancia.is_interacting = true
|
||||
instancia:SetMenuAlpha (nil, nil, nil, nil, true)
|
||||
instancia:SetAutoHideMenu (nil, nil, true)
|
||||
instancia.last_interaction = _detalhes._tempo or time()
|
||||
|
||||
if (instancia.baseframe:GetFrameLevel() > instancia.rowframe:GetFrameLevel()) then
|
||||
instancia.rowframe:SetFrameLevel (instancia.baseframe:GetFrameLevel())
|
||||
|
||||
@@ -572,6 +572,11 @@ General/Trade: 255 189 192
|
||||
este_gump:SetScript ("OnHide", function (self)
|
||||
_detalhes.janela_report.ativa = false
|
||||
_detalhes.last_report_id = nil
|
||||
|
||||
if (_detalhes.delay_CheckSwitchToCurrent) then
|
||||
_detalhes.delay_CheckSwitchToCurrent = nil
|
||||
_detalhes:CheckSwitchToCurrent()
|
||||
end
|
||||
end)
|
||||
|
||||
este_gump:SetWidth (320)
|
||||
|
||||
@@ -1172,7 +1172,9 @@ function TimeAttack:OnEvent (_, event, ...)
|
||||
|
||||
--> Register needed events
|
||||
_G._detalhes:RegisterEvent (TimeAttack, "COMBAT_PLAYER_ENTER")
|
||||
|
||||
_G._detalhes:RegisterEvent (TimeAttack, "REALM_CHANNEL_ENTER")
|
||||
_G._detalhes:RegisterEvent (TimeAttack, "REALM_CHANNEL_LEAVE")
|
||||
|
||||
--> create widgets
|
||||
CreatePluginFrames()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user