- fixed issue with healing and damage cache where both did not update.

- fixed issue with micro displays were sometimes did lua error.
- fixed a issue when reporting to a instance group didn't work.
- fixes on siege of orgrimmar raid info.
- major fixes and improvements on internal garbage collector.
- added options for background alpha and window alpha.
- now when editing a image, the instance background changes on-the-fly.
- now if no instance have current segment when a combat start, the lower instance will switch to current.
- added a option for disable the auto switch to current.
- added the time type when reporting damage or healing done.
- added a format phrase when reporting damage or healing done.
- added a option for hide the micro display.
- added options for memory were the core changes within the value.
- little redesign on segments menu.
This commit is contained in:
Tercio
2013-09-18 23:54:06 -03:00
parent b28fa74f64
commit 27817f34d9
28 changed files with 1982 additions and 319 deletions
+1 -1
View File
@@ -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.0"
_detalhes.userversion = "v1.4.6"
_detalhes.version = "Alpha 006"
_detalhes.realversion = 6
+8 -4
View File
@@ -453,13 +453,17 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
--> organiza as tabelas
if (_detalhes.in_combat) then
if (_detalhes.in_combat and instancia.segmento == 0) then
using_cache = true
end
if (using_cache and instancia.segmento == 0) then
if (using_cache) then
conteudo = _detalhes.cache_damage_group
if (#conteudo < 1) then
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
end
_table_sort (conteudo, _detalhes.SortKeySimple)
if (conteudo[1][keyName] < 1) then
@@ -2114,8 +2118,8 @@ function atributo_damage:FF_funcao_de_criacao (_, _, link)
return tabela
end
function atributo_damage:ColetarLixo()
return _detalhes:ColetarLixo (class_type)
function atributo_damage:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
local function ReconstroiMapa (tabela)
+2 -2
View File
@@ -658,8 +658,8 @@ function atributo_energy:Iniciar (iniciar)
return false --retorna se o dps esta aberto ou fechado para este jogador
end
function atributo_energy:ColetarLixo()
return _detalhes:ColetarLixo (class_type)
function atributo_energy:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
local function ReconstroiMapa (tabela)
+10 -5
View File
@@ -119,7 +119,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
--> não há barras para mostrar -- not have something to show
if (#showing._ActorTable < 1) then --> não há barras para mostrar
--> colocado isso recentemente para fazer as barras de dano sumirem na troca de atributo
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
end
--> total
@@ -205,12 +205,17 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
elseif (instancia.modo == modo_GROUP) then --> mostrando GROUP
if (_detalhes.in_combat) then
if (_detalhes.in_combat and instancia.segmento == 0) then
using_cache = true
end
if (using_cache and instancia.segmento == 0) then
if (using_cache) then
conteudo = _detalhes.cache_healing_group
if (#conteudo < 1) then
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
end
_detalhes:ContainerSort (conteudo, nil, keyName)
@@ -1353,8 +1358,8 @@ function atributo_heal:Iniciar (iniciar)
end
end
function atributo_heal:ColetarLixo()
return _detalhes:ColetarLixo (class_type)
function atributo_heal:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
function _detalhes.refresh:r_atributo_heal (este_jogador, shadow)
+174 -8
View File
@@ -620,6 +620,7 @@ function _detalhes:SnapTextures (remove)
end
--> cria uma janela para uma nova instância
--> search key: ~new ~nova
function _detalhes:NovaInstancia (ID)
-- Uma nova instância será uma extensão do acetimer somada com uma cópia da classe detalhes_funções
@@ -662,6 +663,13 @@ end
nova_instancia.bar_mod = 0
nova_instancia.bgdisplay_loc = 0
nova_instancia.bg_alpha = _detalhes.default_bg_alpha
nova_instancia.bg_r = _detalhes.default_bg_color
nova_instancia.bg_g = _detalhes.default_bg_color
nova_instancia.bg_b = _detalhes.default_bg_color
nova_instancia.auto_current = true
nova_instancia.barrasInfo["alturaReal"] = nova_instancia.barrasInfo.altura+nova_instancia.barrasInfo.espaco.entre
nova_instancia.posicao = {
@@ -764,12 +772,22 @@ end
------------------------------------------------------------------------------------------------------------------------
--> ao reiniciar o addon esta função é rodada para recriar a janela da instância
--> search key: ~restaura
function _detalhes:RestauraJanela (index, temp)
--if (index ~= self.meu_id) then
--print ("DEBUG: Algo de errado, o index esta diferente do meu_id")
--end
self.bg_alpha = self.bg_alpha or _detalhes.default_bg_alpha
self.bg_r = self.bg_r or _detalhes.default_bg_color
self.bg_g = self.bg_g or _detalhes.default_bg_color
self.bg_b = self.bg_b or _detalhes.default_bg_color
if (self.auto_current == nil) then
self.auto_current = true
end
local _baseframe, _bgframe, _bgframe_display, _scrollframe = gump:CriaJanelaPrincipal (self.meu_id, self)
self.baseframe = _baseframe
@@ -848,19 +866,19 @@ function _detalhes:RestauraJanela (index, temp)
self.StatusBarSaved.center = "DETAILS_STATUSBAR_PLUGIN_CLOCK"
end
local clock = _detalhes.StatusBar:CreateStatusBarChildForInstance (self, self.StatusBarSaved.center or "DETAILS_STATUSBAR_PLUGIN_CLOCK")
_detalhes.StatusBar:SetCenterPlugin (self, clock)
_detalhes.StatusBar:SetCenterPlugin (self, clock, true)
if (self.StatusBarSaved.left and self.StatusBarSaved.left == "NONE") then
self.StatusBarSaved.left = "DETAILS_STATUSBAR_PLUGIN_PSEGMENT"
end
local segment = _detalhes.StatusBar:CreateStatusBarChildForInstance (self, self.StatusBarSaved.left or "DETAILS_STATUSBAR_PLUGIN_PSEGMENT")
_detalhes.StatusBar:SetLeftPlugin (self, segment)
_detalhes.StatusBar:SetLeftPlugin (self, segment, true)
if (self.StatusBarSaved.right and self.StatusBarSaved.right == "NONE") then
self.StatusBarSaved.right = "DETAILS_STATUSBAR_PLUGIN_PDPS"
end
local dps = _detalhes.StatusBar:CreateStatusBarChildForInstance (self, self.StatusBarSaved.right or "DETAILS_STATUSBAR_PLUGIN_PDPS")
_detalhes.StatusBar:SetRightPlugin (self, dps)
_detalhes.StatusBar:SetRightPlugin (self, dps, true)
--
if (not self.last_modo) then
@@ -909,6 +927,20 @@ function _detalhes:RefreshBars (instance)
end
end
function _detalhes:SetBackgroundColor (...)
local r, g, b = gump:ParseColors (...)
self.bgdisplay:SetBackdropColor (r, g, b, self.bg_alpha or _detalhes.default_bg_alpha)
self.bg_r = r
self.bg_g = g
self.bg_b = b
end
function _detalhes:SetBackgroundAlpha (alpha)
alpha = alpha or _detalhes.default_bg_alpha
self.bgdisplay:SetBackdropColor (self.bg_r or _detalhes.default_bg_color, self.bg_g or _detalhes.default_bg_color, self.bg_b or _detalhes.default_bg_color, alpha)
self.bg_alpha = alpha
end
function _detalhes:GetSize()
return self.bgframe:GetWidth(), self.bgframe:GetHeight()
end
@@ -934,6 +966,33 @@ end
------------------------------------------------------------------------------------------------------------------------
function _detalhes:HaveOneCurrentInstance()
local have = false
for _, instance in _ipairs (_detalhes.tabela_instancias) do
if (instance.ativa and instance.baseframe and instance.segmento == 0) then
return
end
end
local lower = _detalhes:GetLowerInstanceNumber()
if (lower) then
local instance = _detalhes:GetInstance (lower)
if (instance and instance.auto_current) then
instance:TrocaTabela (0) --> muda o segmento pra current
return instance:InstanceAlert (Loc ["STRING_CHANGED_TO_CURRENT"], {[[Interface\GossipFrame\TrainerGossipIcon]], 18, 18, false}, 6)
else
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
return instance:InstanceAlert (Loc ["STRING_CHANGED_TO_CURRENT"], {[[Interface\GossipFrame\TrainerGossipIcon]], 18, 18, false}, 6)
end
end
end
end
end
function _detalhes:Freeze (instancia)
if (not instancia) then
@@ -1048,7 +1107,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
local update_coolTip = false
if (segmento == -2) then --> clicou para mudar de segmento
segmento = instancia.segmento+1
segmento = instancia.segmento + 1
if (segmento > _detalhes.segments_amount) then
segmento = -1
@@ -1515,6 +1574,39 @@ function _detalhes:AlteraModo (instancia, qual)
_detalhes.popup:Select (1, checked)
end
local function GetDpsHps (_thisActor, key)
local keyname
if (key == "dps") then
keyname = "last_dps"
elseif (key == "hps") then
keyname = "last_hps"
end
if (_thisActor [keyname]) then
return _thisActor [keyname]
else
if ((_detalhes.time_type == 2 and _thisActor.grupo) or not _detalhes:CaptureGet ("damage")) then
local dps = _thisActor.total / _thisActor:GetCombatTime()
_thisActor [keyname] = dps
return dps
else
if (not _thisActor.on_hold) then
local dps = _thisActor.total/_thisActor:Tempo() --calcula o dps deste objeto
_thisActor [keyname] = dps --salva o dps dele
return dps
else
if (_thisActor [keyname] == 0) then --> não calculou o dps dele ainda mas entrou em standby
local dps = _thisActor.total/_thisActor:Tempo()
_thisActor [keyname] = dps
return dps
else
return _thisActor [keyname]
end
end
end
end
end
--> Reportar o que esta na janela da instância
function _detalhes:monta_relatorio (este_relatorio, custom)
@@ -1546,11 +1638,23 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
local is_current = _G ["Details_Report_CB_1"]:GetChecked()
local is_reverse = _G ["Details_Report_CB_2"]:GetChecked()
if (not _detalhes.fontstring_len) then
_detalhes.fontstring_len = _detalhes.listener:CreateFontString (nil, "background", "GameFontNormal")
end
local _, fontSize = FCF_GetChatWindowInfo (1)
local fonte, _, flags = _detalhes.fontstring_len:GetFont()
_detalhes.fontstring_len:SetFont (fonte, fontSize, flags)
_detalhes.fontstring_len:SetText ("hello details!")
local default_len = _detalhes.fontstring_len:GetStringWidth()
--> pegar a font do chat
--_detalhes.fontstring_len:
if (not is_reverse) then
if (not is_current) then
--> assumindo que self é sempre uma instância aqui.
local total, keyName, first
local total, keyName, keyNameSec, first
local atributo = self.atributo
local container = self.showing [atributo]._ActorTable
@@ -1566,9 +1670,15 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
keyName = "frag"
else
total, keyName, first = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
if (self.sub_atributo == 1) then
keyNameSec = "dps"
end
end
elseif (atributo == 2) then --> heal
total, keyName, first = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
if (self.sub_atributo == 1) then
keyNameSec = "hps"
end
elseif (atributo == 3) then --> energy
total, keyName, first = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
elseif (atributo == 4) then --> misc
@@ -1595,9 +1705,26 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
if (_thisActor) then
local amount = _thisActor [keyName]
if (_type (amount) == "number" and amount > 0) then --1236
report_lines [#report_lines+1] = i..".".. _thisActor.nome.." ".. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)"
if (keyNameSec) then
local dps = GetDpsHps (_thisActor, keyNameSec)
local name = _thisActor.nome.." "
_detalhes.fontstring_len:SetText (name)
local stringlen = _detalhes.fontstring_len:GetStringWidth()
while (stringlen < default_len) do
name = name .. "."
_detalhes.fontstring_len:SetText (name)
stringlen = _detalhes.fontstring_len:GetStringWidth()
end
report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _math_floor (dps) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
else
report_lines [#report_lines+1] = i..". ".. _thisActor.nome.." ".. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)"
end
elseif (_type (amount) == "string") then
report_lines [#report_lines+1] = i..".".. _thisActor.nome.." ".. amount
report_lines [#report_lines+1] = i..". ".. _thisActor.nome.." ".. amount
else
break
end
@@ -1643,10 +1770,16 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
container = reportarFrags
keyName = "frag"
else
if (self.sub_atributo == 1) then
keyNameSec = "dps"
end
total, keyName, first = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
end
elseif (atributo == 2) then --> heal
total, keyName, first = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
if (self.sub_atributo == 1) then
keyNameSec = "hps"
end
elseif (atributo == 3) then --> energy
total, keyName, first = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
elseif (atributo == 4) then --> misc
@@ -1674,7 +1807,24 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
if (_type (amount) == "number") then
if (amount > 0) then
report_lines [#report_lines+1] = i..".".. _thisActor.nome.." ".. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)"
if (keyNameSec) then
local dps = GetDpsHps (_thisActor, keyNameSec)
local name = _thisActor.nome.." "
_detalhes.fontstring_len:SetText (name)
local stringlen = _detalhes.fontstring_len:GetStringWidth()
while (stringlen < default_len) do
name = name .. "."
_detalhes.fontstring_len:SetText (name)
stringlen = _detalhes.fontstring_len:GetStringWidth()
end
report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _math_floor (dps) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
else
report_lines [#report_lines+1] = i..".".. _thisActor.nome.." ".. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)"
end
quantidade = quantidade + 1
if (quantidade == amt) then
break
@@ -1782,6 +1932,13 @@ function _detalhes:envia_relatorio (linhas, custom)
end
linhas[1] = linhas[1] .. ". " .. Loc ["STRING_REPORT_FIGHT"] .. ": " .. luta
end
if (_detalhes.time_type == 2) then
linhas[1] = linhas[1] .. " (Co)"
else
linhas[1] = linhas[1] .. " (Cr)"
end
local editbox = _detalhes.janela_report.editbox
@@ -1809,6 +1966,7 @@ function _detalhes:envia_relatorio (linhas, custom)
for i = 1, #linhas do
_SendChatMessage (linhas[i], "CHANNEL", nil, _GetChannelName (channel))
end
return
elseif (to_who == "WHISPER") then --> whisper
@@ -1848,6 +2006,14 @@ function _detalhes:envia_relatorio (linhas, custom)
return
end
if (to_who == "RAID") then
--LE_PARTY_CATEGORY_HOME - default
--LE_PARTY_CATEGORY_INSTANCE - player's automatic group, raid finder?.
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
to_who = "INSTANCE_CHAT"
end
end
for i = 1, #linhas do
_SendChatMessage (linhas[i], to_who)
end
+2 -2
View File
@@ -1198,8 +1198,8 @@ function atributo_misc:Iniciar (iniciar)
return false --retorna se o dps esta aberto ou fechado para este jogador
end
function atributo_misc:ColetarLixo()
return _detalhes:ColetarLixo (class_type)
function atributo_misc:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
local function ReconstroiMapa (tabela)
+2 -2
View File
@@ -245,9 +245,9 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
-- tipo do container
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if (self.tipo == container_playernpc) then --> CONTAINER COMUM
--if (self.tipo == container_playernpc) then --> CONTAINER COMUM
elseif (self.tipo == container_damage) then --> CONTAINER DAMAGE
if (self.tipo == container_damage) then --> CONTAINER DAMAGE
get_class_ (novo_objeto, nome, flag)
+25 -6
View File
@@ -45,9 +45,14 @@ function historico:adicionar (tabela)
if (index < 3) then
for _, jogador in ipairs (container._ActorTable) do
--> limpeza
--> remover a tabela de last events
jogador.last_events_table = nil
--> verifica se ele ainda esta registrado na time machine
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
else
break
@@ -61,18 +66,32 @@ function historico:adicionar (tabela)
--> verifica se precisa apagar a última tabela do histórico
if (#self.tabelas > _detalhes.segments_amount) then
-- BETA subtração do combate overall
_detalhes.tabela_overall = _detalhes.tabela_overall - self.tabelas [#self.tabelas]
_detalhes.tabela_overall.start_time = _detalhes.tabela_overall.start_time + (self.tabelas[#self.tabelas].end_time-self.tabelas[#self.tabelas].start_time)
--print (#self.tabelas)
local combat_removed = self.tabelas [#self.tabelas]
--> diminuir quantidades no overall
_detalhes.tabela_overall = _detalhes.tabela_overall - combat_removed
_detalhes.tabela_overall.start_time = _detalhes.tabela_overall.start_time + (combat_removed.end_time-combat_removed.start_time)
local amt_mortes = #self.tabelas[#self.tabelas].last_events_tables --> quantas mortes teve nessa luta
local amt_mortes = #combat_removed.last_events_tables --> quantas mortes teve nessa luta
if (amt_mortes > 0) then
for i = #_detalhes.tabela_overall.last_events_tables, #_detalhes.tabela_overall.last_events_tables-amt_mortes, -1 do
_table_remove (_detalhes.tabela_overall.last_events_tables, #_detalhes.tabela_overall.last_events_tables)
end
end
--> verificar novamente a time machine
for _, jogador in ipairs (combat_removed [1]._ActorTable) do --> damage
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
for _, jogador in ipairs (combat_removed [2]._ActorTable) do --> heal
if (jogador.timeMachine) then
jogador:DesregistrarNaTimeMachine()
end
end
--> remover
_table_remove (self.tabelas, #self.tabelas)
_detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
+12 -1
View File
@@ -258,9 +258,11 @@
end
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente)
_detalhes:HaveOneCurrentInstance()
end
function _detalhes:SairDoCombate()
function _detalhes:SairDoCombate (bossKilled)
--> 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
@@ -285,6 +287,10 @@
_detalhes:Msg ("(debug) forcing equalize actors behavior.")
_detalhes:EqualizeActorsSchedule (_detalhes.host_of)
end
--> verifica memoria
_detalhes:CheckMemoryAfterCombat()
else
if (_detalhes:GetBossDetails (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)) then
@@ -296,6 +302,11 @@
_detalhes:Msg ("(debug) found encounter on last fight, freezing parser for 30 seconds.")
end
if (bossKilled) then
_detalhes.tabela_vigente.is_boss.killed = true
end
local bossFunction, bossFunctionType = _detalhes:GetBossFunction (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)
if (bossFunction) then
if (_bit_band (bossFunctionType, 0x2) ~= 0) then --end of combat
+136 -46
View File
@@ -728,55 +728,153 @@
end
end
function _detalhes:CheckMemoryAfterCombat()
if (_detalhes.next_memory_check < time()) then
if (_detalhes.debug) then
_detalhes:Msg ("checking memory after combat.")
end
_detalhes.next_memory_check = time()+_detalhes.intervalo_memoria
UpdateAddOnMemoryUsage()
local memory = GetAddOnMemoryUsage ("Details")
if (memory > _detalhes.memory_ram) then
_detalhes:IniciarColetaDeLixo (true, 60) --> sending true doesn't check anythink
end
end
end
function _detalhes:CheckMemoryPeriodically()
if (_detalhes.next_memory_check <= time() and not _InCombatLockdown() and not _detalhes.in_combat) then
_detalhes.next_memory_check = time() + _detalhes.intervalo_memoria - 3
UpdateAddOnMemoryUsage()
local memory = GetAddOnMemoryUsage ("Details")
if (_detalhes.debug) then
_detalhes:Msg ("checking memory periodically. Using: ",math.floor (memory), "of", _detalhes.memory_ram)
end
if (memory > _detalhes.memory_ram) then
if (_detalhes.debug) then
_detalhes:Msg ("Memory is too high, starting garbage collector")
end
_detalhes:IniciarColetaDeLixo (1, 60) --> sending 1 only check for combat and ignore garbage collect cooldown
end
end
end
function _detalhes:IniciarColetaDeLixo (forcar)
function _detalhes:IniciarColetaDeLixo (forcar, lastevent)
if (not forcar) then
if (_detalhes.ultima_coleta + _detalhes.intervalo_coleta > _detalhes._tempo + 1) then
return
elseif (_detalhes.in_combat or _InCombatLockdown() or _detalhes:IsInInstance()) then
if (_detalhes.debug) then
_detalhes:Msg ("garbage collect queued due combatlockdown (forced false)")
end
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 5)
return
end
else
if (type (forcar) ~= "boolean") then
if (forcar == 1) then
if (_detalhes.in_combat or _InCombatLockdown()) then
if (_detalhes.debug) then
_detalhes:Msg ("garbage collect queued due combatlockdown (forced 1)")
end
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 5, forcar)
return
end
end
end
end
if (_detalhes.debug) then
if (forcar) then
_detalhes:Msg ("collecting garbage with forced state.")
_detalhes:Msg ("collecting garbage with forced state: ", forcar)
else
_detalhes:Msg ("collecting garbage.")
end
end
local memory = GetAddOnMemoryUsage ("Details")
--> reseta o cache do parser
_detalhes:ClearParserCache()
local limpados = atributo_damage:ColetarLixo() + atributo_heal:ColetarLixo() + atributo_energy:ColetarLixo() + atributo_misc:ColetarLixo()
--> limpa barras que não estão sendo usadas nas instâncias.
for index, instancia in _ipairs (_detalhes.tabela_instancias) do
if (instancia.barras and instancia.barras [1]) then
for i, barra in _ipairs (instancia.barras) do
if (not barra:IsShown()) then
barra.minha_tabela = nil
end
end
end
end
--> faz a coleta nos 4 atributos
local damage = atributo_damage:ColetarLixo (lastevent)
local heal = atributo_heal:ColetarLixo (lastevent)
local energy = atributo_energy:ColetarLixo (lastevent)
local misc = atributo_misc:ColetarLixo (lastevent)
local limpados = damage + heal + energy + misc
--> refresh nas janelas
if (limpados > 0) then
_detalhes:InstanciaCallFunction (_detalhes.reset_window)
end
--print ("coletados: " .. limpados)
_detalhes:ManutencaoTimeMachine()
--> print cache states
if (_detalhes.debug) then
_detalhes:Msg ("removed: damage "..damage.." heal "..heal.." energy "..energy.." misc "..misc)
end
--> elimina pets antigos
local _new_PetTable = {}
for PetSerial, PetTable in _pairs (_detalhes.tabela_pets.pets) do
if (PetTable[4] + _detalhes.intervalo_coleta > _detalhes._tempo + 1) then
_new_PetTable [PetSerial] = PetTable
end
end
_table_wipe (_detalhes.tabela_pets.pets)
_detalhes.tabela_pets.pets = _new_PetTable
--> wipa container de escudos
_table_wipe (_detalhes.escudos)
_detalhes.ultima_coleta = _detalhes._tempo
if (_detalhes.debug) then
collectgarbage()
UpdateAddOnMemoryUsage()
local memory2 = GetAddOnMemoryUsage ("Details")
_detalhes:Msg ("memory antes: "..memory.." memory depois: "..memory2)
end
end
local function FazColeta (_combate, tipo)
--> combates Normais
local function FazColeta (_combate, tipo, intervalo_overwrite)
local conteudo = _combate [tipo]._ActorTable
local _iter = {index = 1, data = conteudo[1], cleaned = 0}
local _tempo = _time()
local links_removed = 0
while (_iter.data) do
local _actor = _iter.data
local can_garbage = false
if (not _actor.grupo and not _actor.boss and not _actor.boss_fight_component and _actor.last_event + _detalhes.intervalo_coleta < _tempo) then
local t
if (intervalo_overwrite) then
t = _actor.last_event + intervalo_overwrite
else
t = _actor.last_event + _detalhes.intervalo_coleta
end
if (not _actor.grupo and not _actor.boss and not _actor.boss_fight_component and t < _tempo) then
local owner = _actor.owner
if (owner) then
local owner_actor = _combate (tipo, owner.nome)
@@ -807,6 +905,11 @@
end
_iter.cleaned = _iter.cleaned+1
if (_actor.tipo == 1 or _actor.tipo == 2) then
_actor:DesregistrarNaTimeMachine()
end
_table_remove (conteudo, _iter.index)
_iter.data = conteudo [_iter.index]
else
@@ -816,6 +919,10 @@
end
if (_detalhes.debug) then
-- _detalhes:Msg ("- garbage collect:", tipo, "actors removed:",_iter.cleaned)
end
if (_iter.cleaned > 0) then
ReconstroiMapa (_combate [tipo])
_combate [tipo].need_refresh = true
@@ -824,21 +931,13 @@
return _iter.cleaned
end
function _detalhes:ColetarLixo (tipo)
for index, instancia in _ipairs (_detalhes.tabela_instancias) do
if (instancia:IsAtiva()) then
for i, barra in _ipairs (instancia.barras) do
if (not barra:IsShown()) then
barra.minha_tabela = nil
end
end
end
end
--> Combate overall
function _detalhes:ColetarLixo (tipo, lastevent)
local _tempo = _time()
local limpados = 0
--> monta a lista de combates
local tabelas_de_combate = {}
for _, _tabela in _ipairs (_detalhes.tabela_historico.tabelas) do
if (_tabela ~= _detalhes.tabela_vigente) then
@@ -847,17 +946,16 @@
end
tabelas_de_combate [#tabelas_de_combate+1] = _detalhes.tabela_vigente
--> faz a coleta em todos os combates para este atributo
for _, _combate in _ipairs (tabelas_de_combate) do
limpados = limpados + FazColeta (_combate, tipo)
limpados = limpados + FazColeta (_combate, tipo, lastevent)
end
--> clear shadow tables
--> limpa a tabela overall
local _overall_combat = _detalhes.tabela_overall
local conteudo = _overall_combat [tipo]._ActorTable
_iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
--collectgarbage()
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
while (_iter.data) do
local _actor = _iter.data
@@ -875,12 +973,7 @@
end
_table_wipe (meus_links)
end
--if (tipo == 1 and #new_weak_table > 0) then
-- print (can_garbage, _actor.nome)
--end
if (can_garbage or not meus_links) then --> não há referências a este objeto
if (not _actor.owner) then --> pet
@@ -889,7 +982,18 @@
--> apaga a referência deste jogador na tabela overall
_iter.cleaned = _iter.cleaned+1
if (_detalhes.debug) then
if (#_actor.links > 0) then
_detalhes:Msg (_actor.nome, " has been garbaged but have links: ", #_actor.links)
end
end
if (_actor.tipo == 1 or _actor.tipo == 2) then
_actor:DesregistrarNaTimeMachine()
end
_table_remove (conteudo, _iter.index)
_iter.data = conteudo [_iter.index]
else
_actor.links = new_weak_table
@@ -898,21 +1002,7 @@
end
end
--> elimina pets antigos
local _new_PetTable = {}
for PetSerial, PetTable in _pairs (_detalhes.tabela_pets.pets) do
if (PetTable[4] + _detalhes.intervalo_coleta > _detalhes._tempo + 1) then
_new_PetTable [PetSerial] = PetTable
end
end
_table_wipe (_detalhes.tabela_pets.pets)
_detalhes.tabela_pets.pets = _new_PetTable
--> wipa container de escudos
_table_wipe (_detalhes.escudos)
--> termina o coletor de lixo
if (_iter.cleaned > 0) then
_overall_combat[tipo].need_refresh = true
+118 -63
View File
@@ -63,15 +63,15 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> cache
--> damage
local damage_cache = {}
local damage_cache_pets = {}
local damage_cache_petsOwners = {}
local damage_cache = setmetatable ({}, _detalhes.weaktable)
local damage_cache_pets = setmetatable ({}, _detalhes.weaktable)
local damage_cache_petsOwners = setmetatable ({}, _detalhes.weaktable)
--> heaing
local healing_cache = {}
local healing_cache = setmetatable ({}, _detalhes.weaktable)
--> energy
local energy_cache = {}
local energy_cache = setmetatable ({}, _detalhes.weaktable)
--> misc
local misc_cache = {}
local misc_cache = setmetatable ({}, _detalhes.weaktable)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
@@ -153,6 +153,12 @@
------------------------------------------------------------------------------------------------
--> get actors
--> debug - no cache
--[[
local este_jogador, meu_dono, who_name = _current_damage_container:PegarCombatente (who_serial, who_name, who_flags, true)
local jogador_alvo, alvo_dono, alvo_name = _current_damage_container:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true)
--]]
--[
--> damager
local este_jogador, meu_dono = damage_cache [who_name] or damage_cache_pets [who_serial], damage_cache_petsOwners [who_serial]
@@ -188,6 +194,7 @@
end
end
--]]
--> damager shadow
local shadow = este_jogador.shadow
@@ -209,41 +216,7 @@
--> record death log
local t = jogador_alvo.last_events_table
local i = t.n
--[[
if (not i) then
local isOriginal = jogador_alvo.last_events_table.original
if (isOriginal) then
isOriginal = "IsOriginal = TRUE"
else
isOriginal = "IsOriginal = FALSE"
end
local indexes = #jogador_alvo.last_events_table
if (not indexes) then
indexes = "Indexes = NIL"
else
indexes = "Indexes = "..indexes
end
local resync = _detalhes.tabela_vigente.resincked
if (resync) then
resync = "resync = TRUE"
else
resync = "resync = FALSE"
end
local saved = _detalhes.tabela_vigente.hasSaved
if (saved) then
saved = "saved = TRUE"
else
saved = "saved = FALSE"
end
print ("Report the lines shown, click on reset button and type /reload")
print ("We are investigation this issue, this information is important to us.")
assert (false, "Please Report This Error on the Blue Button: Parser 194: " .. isOriginal .. " " .. indexes .. " " .. resync .. " " .. saved)
end
--]]
t.n = i + 1
t = t [i]
@@ -504,6 +477,12 @@
------------------------------------------------------------------------------------------------
--> get actors
--> debug - no cache
--[[
local este_jogador, meu_dono, who_name = _current_heal_container:PegarCombatente (who_serial, who_name, who_flags, true)
local jogador_alvo, alvo_dono, alvo_name = _current_heal_container:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true)
--]]
--[
local este_jogador, meu_dono = healing_cache [who_name]
if (not este_jogador) then --> pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_heal_container:PegarCombatente (who_serial, who_name, who_flags, true)
@@ -519,7 +498,7 @@
healing_cache [alvo_name] = jogador_alvo
end
end
--]]
local shadow = este_jogador.shadow
local shadow_of_target = jogador_alvo.shadow
@@ -1013,6 +992,12 @@
--> get actors
--> main actor
--> debug - no cache
--[[
local este_jogador, meu_dono, who_name = _current_energy_container:PegarCombatente (who_serial, who_name, who_flags, true)
local jogador_alvo, alvo_dono, alvo_name = _current_energy_container:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true)
--]]
--[
local este_jogador, meu_dono = energy_cache [who_name]
if (not este_jogador) then --> pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_energy_container:PegarCombatente (who_serial, who_name, who_flags, true)
@@ -1029,6 +1014,7 @@
energy_cache [alvo_name] = jogador_alvo
end
end
--]]
--> actor targets
local este_alvo = este_jogador.targets._NameIndexTable [alvo_name]
@@ -1107,6 +1093,12 @@
--> get actors
--> main actor
--> debug - no cache
--[[
local este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
--]]
--[
local este_jogador, meu_dono = misc_cache [who_name]
if (not este_jogador) then --> pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
@@ -1114,7 +1106,7 @@
misc_cache [who_name] = este_jogador
end
end
--]]
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
@@ -1193,6 +1185,11 @@
--> get actors
--> main actor
--> debug - no cache
--[[
local este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
--]]
--[
local este_jogador, meu_dono = misc_cache [who_name]
if (not este_jogador) then --> pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
@@ -1200,7 +1197,7 @@
misc_cache [who_name] = este_jogador
end
end
--]]
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
@@ -1301,6 +1298,11 @@
--> get actors
--> main actor
--> debug - no cache
--[[
local este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
--]]
--[
local este_jogador, meu_dono = misc_cache [who_name]
if (not este_jogador) then --> pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
@@ -1308,7 +1310,7 @@
misc_cache [who_name] = este_jogador
end
end
--]]
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
@@ -1516,6 +1518,11 @@
--> get actors
--> main actor
--> debug - no cache
--[[
local este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
--]]
--[
local este_jogador, meu_dono = misc_cache [who_name]
if (not este_jogador) then --> pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
@@ -1523,7 +1530,7 @@
misc_cache [who_name] = este_jogador
end
end
--]]
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
@@ -1658,7 +1665,7 @@
if (_detalhes.debug) then
_detalhes:Msg ("(debug) combat finished: encounter objective is completed")
end
_detalhes:SairDoCombate()
_detalhes:SairDoCombate (true)
end
end
@@ -2133,11 +2140,69 @@
_tempo = _detalhes._tempo
end
function _detalhes:PrintParserCacheIndexes()
local amount = 0
for n, nn in pairs (damage_cache) do
amount = amount + 1
end
print ("parser damage_cache", amount)
amount = 0
for n, nn in pairs (damage_cache_pets) do
amount = amount + 1
end
print ("parser damage_cache_pets", amount)
amount = 0
for n, nn in pairs (damage_cache_petsOwners) do
amount = amount + 1
end
print ("parser damage_cache_petsOwners", amount)
amount = 0
for n, nn in pairs (healing_cache) do
amount = amount + 1
end
print ("parser healing_cache", amount)
amount = 0
for n, nn in pairs (energy_cache) do
amount = amount + 1
end
print ("parser energy_cache", amount)
amount = 0
for n, nn in pairs (misc_cache) do
amount = amount + 1
end
print ("parser misc_cache", amount)
print ("group damage", #_detalhes.cache_damage_group)
print ("group damage", #_detalhes.cache_healing_group)
end
function _detalhes:ClearParserCache()
damage_cache = {}
healing_cache = {}
energy_cache = {}
misc_cache = {}
--> clear cache | not sure if replacing the old table is the best approach
table.wipe (damage_cache)
table.wipe (damage_cache_pets)
table.wipe (damage_cache_petsOwners)
table.wipe (healing_cache)
table.wipe (energy_cache)
table.wipe (misc_cache)
damage_cache = setmetatable ({}, _detalhes.weaktable)
damage_cache_pets = setmetatable ({}, _detalhes.weaktable)
damage_cache_petsOwners = setmetatable ({}, _detalhes.weaktable)
healing_cache = setmetatable ({}, _detalhes.weaktable)
energy_cache = setmetatable ({}, _detalhes.weaktable)
misc_cache = setmetatable ({}, _detalhes.weaktable)
end
--serach key: ~cache
@@ -2168,18 +2233,8 @@
_recording_took_damage = _detalhes.RecordRealTimeTookDamage
_recording_ability_with_buffs = _detalhes.RecordPlayerAbilityWithBuffs
_in_combat = _detalhes.in_combat
--> clear cache
damage_cache = {}
damage_cache_pets = {}
damage_cache_petsOwners = {}
healing_cache = {}
energy_cache = {}
misc_cache = {}
return _detalhes:ClearParserCache()
end
+78 -3
View File
@@ -58,7 +58,7 @@
end
--> functions to set the three statusbar places: left, center and right
function _detalhes.StatusBar:SetCenterPlugin (instance, childObject)
function _detalhes.StatusBar:SetCenterPlugin (instance, childObject, fromStartup)
childObject.frame:Show()
childObject.frame:SetPoint ("center", instance.baseframe.rodape.StatusBarCenterAnchor, "center")
_detalhes.StatusBar:AlignPluginText (childObject, 2)
@@ -69,10 +69,19 @@
if (childObject.OnEnable) then
childObject:OnEnable()
end
if (fromStartup and childObject.options.isHidden) then
childObject.frame.text:Hide()
end
return true
end
function _detalhes.StatusBar:SetLeftPlugin (instance, childObject)
function _detalhes.StatusBar:SetLeftPlugin (instance, childObject, fromStartup)
if (not childObject) then
return
end
childObject.frame:Show()
childObject.frame:SetPoint ("left", instance.baseframe.rodape.StatusBarLeftAnchor, "left")
@@ -84,10 +93,15 @@
if (childObject.OnEnable) then
childObject:OnEnable()
end
if (fromStartup and childObject.options.isHidden) then
childObject.frame.text:Hide()
end
return true
end
function _detalhes.StatusBar:SetRightPlugin (instance, childObject)
function _detalhes.StatusBar:SetRightPlugin (instance, childObject, fromStartup)
childObject.frame:Show()
childObject.frame:SetPoint ("right", instance.baseframe.rodape.direita, "right", -20, 10)
_detalhes.StatusBar:AlignPluginText (childObject, 3)
@@ -98,6 +112,11 @@
if (childObject.OnEnable) then
childObject:OnEnable()
end
if (fromStartup and childObject.options.isHidden) then
childObject.frame.text:Hide()
end
return true
end
@@ -126,6 +145,16 @@
--> select a new plugin in for an instance anchor
local ChoosePlugin = function (_, _, index, current_child, anchor)
if (index == -1) then --> hide
current_child.frame.text:Hide()
_detalhes.StatusBar:ApplyOptions (current_child, "hidden", true)
return
else
_detalhes.StatusBar:ApplyOptions (current_child, "hidden", false)
current_child.frame.text:Show()
end
local pluginMestre = _detalhes.StatusBar.Plugins [index]
local instance = current_child.instance -- instance que estamos usando agora
@@ -210,6 +239,7 @@
frame.child:Setup()
else
GameCooltip:Reset()
GameCooltip:AddMenu (1, ChoosePlugin, -1, frame.child, frame.child.anchor, Loc ["STRING_PLUGIN_CLEAN"], [[Interface\Buttons\UI-GroupLoot-Pass-Down]], true)
for index, _name_and_icon in _ipairs (_detalhes.StatusBar.Menu) do
GameCooltip:AddMenu (1, ChoosePlugin, index, frame.child, frame.child.anchor, _name_and_icon [1], _name_and_icon [2], true)
end
@@ -308,6 +338,8 @@
child.options.textFace = value
end
child:SetFontFace (child.text, SharedMedia:Fetch ("font", child.options.textFace))
elseif (option == "hidden") then
child.options.isHidden = value
else
if (child [option] and type (child [option]) == "function") then
child [option] (_, child, value)
@@ -773,6 +805,49 @@ do
end
---------> BUILT-IN CLEAR PLUGIN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--[[
do
--> Create the plugin Object
local PClear1 = _detalhes:NewPluginObject ("Details_Attribute", DETAILSPLUGIN_ALWAYSENABLED, "STATUSBAR")
local PClear2 = _detalhes:NewPluginObject ("Details_Attribute", DETAILSPLUGIN_ALWAYSENABLED, "STATUSBAR")
local PClear3 = _detalhes:NewPluginObject ("Details_Attribute", DETAILSPLUGIN_ALWAYSENABLED, "STATUSBAR")
--> Handle events (must have)
function PClear1:OnDetailsEvent (event)
return
end
function PClear2:OnDetailsEvent (event)
return
end
function PClear3:OnDetailsEvent (event)
return
end
--> Create Plugin Frames (must have)
function PClear1:CreateChildObject (instance)
local myframe = _detalhes.StatusBar:CreateChildFrame (instance, "DetailsPClear1Instance" .. instance:GetInstanceId(), DEFAULT_CHILD_WIDTH, DEFAULT_CHILD_HEIGHT)
local new_child = _detalhes.StatusBar:CreateChildTable (instance, PClear1, myframe)
return new_child
end
function PClear2:CreateChildObject (instance)
local myframe = _detalhes.StatusBar:CreateChildFrame (instance, "DetailsPClear2Instance" .. instance:GetInstanceId(), DEFAULT_CHILD_WIDTH, DEFAULT_CHILD_HEIGHT)
local new_child = _detalhes.StatusBar:CreateChildTable (instance, PClear2, myframe)
return new_child
end
function PClear3:CreateChildObject (instance)
local myframe = _detalhes.StatusBar:CreateChildFrame (instance, "DetailsPClear3Instance" .. instance:GetInstanceId(), DEFAULT_CHILD_WIDTH, DEFAULT_CHILD_HEIGHT)
local new_child = _detalhes.StatusBar:CreateChildTable (instance, PClear3, myframe)
return new_child
end
--]] --> Install
-- _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_CLEAN"].." 1", [[Interface\Buttons\UI-GroupLoot-Pass-Down]], PClear1, "DETAILS_STATUSBAR_PLUGIN_PCLEAR1")
-- _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_CLEAN"].." 2", [[Interface\Buttons\UI-GroupLoot-Pass-Down]], PClear2, "DETAILS_STATUSBAR_PLUGIN_PCLEAR2")
-- _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_CLEAN"].." 3", [[Interface\Buttons\UI-GroupLoot-Pass-Down]], PClear3, "DETAILS_STATUSBAR_PLUGIN_PCLEAR3")
--end
---------> default options panel ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local window = _detalhes.gump:NewPanel (UIParent, nil, "DetailsStatusBarOptions", nil, 300, 180)
+25 -12
View File
@@ -1,13 +1,13 @@
--File Revision: 1
--Last Modification: 27/07/2013
--File Revision: 2
--Last Modification: 12/09/2013
-- Change Log:
-- 27/07/2013: Finished alpha version.
-- 12/09/2013: Fixed some problems with garbage collector.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local _tempo = time()
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -66,7 +66,6 @@
jogador:RegistrarNaTimeMachine()
end
end
end
function timeMachine:Desligar()
@@ -86,9 +85,15 @@
if (not timeMachine.ligada) then
return
end
local esta_tabela = timeMachine.tabelas [self.tipo]
esta_tabela [self.timeMachine] = nil
self.timeMachine = nil
local timeMachineContainer = timeMachine.tabelas [self.tipo]
local actorTimeMachineID = self.timeMachine
if (timeMachineContainer [actorTimeMachineID] == self) then
self:TerminarTempo()
self.timeMachine = nil
timeMachineContainer [actorTimeMachineID] = false
end
end
function _detalhes:RegistrarNaTimeMachine()
@@ -96,11 +101,6 @@
return
end
--if (self.tipo == 3) then
-- print (debugstack())
-- return
--end
local esta_tabela = timeMachine.tabelas [self.tipo]
_table_insert (esta_tabela, self)
self.timeMachine = #esta_tabela
@@ -109,13 +109,21 @@
function _detalhes:ManutencaoTimeMachine()
for tipo, tabela in _ipairs (timeMachine.tabelas) do
local t = {}
local removed = 0
for index, jogador in _ipairs (tabela) do
if (jogador) then
t [#t+1] = jogador
jogador.timeMachine = #t
else
removed = removed + 1
end
end
timeMachine.tabelas [tipo] = t
if (_detalhes.debug) then
_detalhes:Msg ("timemachine r"..removed.."| e"..#t.."| t"..tipo)
end
end
end
@@ -203,3 +211,8 @@
self.last_event = tempo
end
end
function _detalhes:PrintTimeMachineIndexes()
print ("timemachine damage", #timeMachine.tabelas [1])
print ("timemachine heal", #timeMachine.tabelas [2])
end
+55 -11
View File
@@ -8,6 +8,8 @@ local g = _detalhes.gump
window:SetMovable (true)
tinsert (UISpecialFrames, "DetailsImageEdit")
window.hooks = {}
local background = g:NewImage (window, _, "$parentBackground", _, _, _, nil, "background")
background:SetAllPoints()
background:SetTexture (0, 0, 0, .8)
@@ -43,6 +45,9 @@ local g = _detalhes.gump
topSlider:SetHook ("OnValueChange", function (_, _, value)
topCoordTexture.image:SetHeight (window.frame:GetHeight()/100*value)
if (window.callback_func) then
window.accept (true)
end
end)
topSlider:Hide()
@@ -73,6 +78,9 @@ local g = _detalhes.gump
bottomSlider:SetHook ("OnValueChange", function (_, _, value)
value = math.abs (value-100)
bottomCoordTexture.image:SetHeight (math.max (window.frame:GetHeight()/100*value, 1))
if (window.callback_func) then
window.accept (true)
end
end)
bottomSlider:Hide()
@@ -101,6 +109,9 @@ local g = _detalhes.gump
leftSlider:SetHook ("OnValueChange", function (_, _, value)
leftCoordTexture.image:SetWidth (window.frame:GetWidth()/100*value)
if (window.callback_func) then
window.accept (true)
end
end)
leftSlider:Hide()
@@ -130,6 +141,9 @@ local g = _detalhes.gump
rightSlider:SetHook ("OnValueChange", function (_, _, value)
value = math.abs (value-100)
rightCoordTexture.image:SetWidth (math.max (window.frame:GetWidth()/100*value, 1))
if (window.callback_func) then
window.accept (true)
end
end)
rightSlider:Hide()
@@ -202,8 +216,14 @@ local g = _detalhes.gump
local selectedColor = function (default)
if (default) then
edit_texture:SetVertexColor (unpack (default))
if (window.callback_func) then
window.accept (true)
end
else
edit_texture:SetVertexColor (ColorPickerFrame:GetColorRGB())
if (window.callback_func) then
window.accept (true)
end
end
end
@@ -282,6 +302,9 @@ local g = _detalhes.gump
alphaSlider:SetHook ("OnValueChange", function (_, _, value)
edit_texture:SetAlpha (value/100)
if (window.callback_func) then
window.accept (true)
end
end)
local resizer = CreateFrame ("Button", nil, window.widget)
@@ -320,6 +343,10 @@ local g = _detalhes.gump
leftCoordTexture.image:SetWidth (window.frame:GetWidth()/100*leftSlider:GetValue())
bottomCoordTexture:SetHeight (math.max ( (window.frame:GetHeight() / 100 * math.abs (bottomSlider:GetValue()-100)), 1))
topCoordTexture:SetHeight (window.frame:GetHeight()/100*topSlider:GetValue())
if (window.callback_func) then
window.accept (true)
end
end)
--> change size
@@ -353,6 +380,10 @@ local g = _detalhes.gump
rightTexCoordButton:Enable()
end
haveHFlip = not haveHFlip
if (window.callback_func) then
window.accept (true)
end
elseif (side == 2) then
if (not haveVFlip) then
@@ -379,6 +410,9 @@ local g = _detalhes.gump
bottomTexCoordButton:Enable()
end
haveVFlip = not haveVFlip
if (window.callback_func) then
window.accept (true)
end
end
end
@@ -391,11 +425,14 @@ local g = _detalhes.gump
flipButtonV:InstallCustomTexture()
--> accept
local accept = function()
buttonsBackground:Hide()
window:Hide()
alphaFrame:Hide()
ColorPickerFrame:Hide()
window.accept = function (keep_editing)
if (not keep_editing) then
buttonsBackground:Hide()
window:Hide()
alphaFrame:Hide()
ColorPickerFrame:Hide()
end
local coords = {}
if (haveHFlip) then
@@ -417,7 +454,7 @@ local g = _detalhes.gump
return window.callback_func (edit_texture.width, edit_texture.height, {edit_texture:GetVertexColor()}, edit_texture:GetAlpha(), coords, window.extra_param)
end
local acceptButton = g:NewButton (buttonsBackground, _, "$parentAcceptButton", _, 100, 20, accept, _, _, _, "DONE")
local acceptButton = g:NewButton (buttonsBackground, _, "$parentAcceptButton", _, 100, 20, window.accept, _, _, _, "DONE")
acceptButton:SetPoint ("topleft", window, "topright", 10, -200)
acceptButton:InstallCustomTexture()
@@ -432,24 +469,27 @@ window:Hide()
local ttexcoord
function g:ImageEditor (callback, texture, texcoord, colors, width, height, extraParam)
texcoord = texcoord or {0, 1, 0, 1}
ttexcoord = texcoord
colors = colors or {1, 1, 1, 1}
edit_texture:SetTexture (texture)
edit_texture.width = width
edit_texture.height = height
colors = colors or {1, 1, 1, 1}
edit_texture:SetVertexColor (colors [1], colors [2], colors [3])
edit_texture:SetAlpha (colors [4] or 1)
texcoord = texcoord or {0, 1, 0, 1}
ttexcoord = texcoord
_detalhes:ScheduleTimer ("RefreshImageEditor", 0.2)
window:Show()
window.callback_func = callback
window.extra_param = extraParam
buttonsBackground:Show()
table.wipe (window.hooks)
end
function _detalhes:RefreshImageEditor()
@@ -476,6 +516,10 @@ window:Hide()
topSlider:SetValue (ttexcoord[3]*100)
bottomSlider:SetValue (ttexcoord[4]*100)
end
if (window.callback_func) then
window.accept (true)
end
end
+28
View File
@@ -19,8 +19,28 @@ local SliderMetaFunctions = {}
SliderMetaFunctions.__call = function (_table, value)
if (not value) then
if (_table.isSwitch) then
if (_table.slider:GetValue() == 1) then
return false
else
return true
end
end
return _table.slider:GetValue()
else
if (_table.isSwitch) then
if (type (value) == "boolean") then
if (value) then
_table.slider:SetValue (2)
else
_table.slider:SetValue (1)
end
else
_table.slider:SetValue (value)
end
return
end
return _table.slider:SetValue (value)
end
end
@@ -163,6 +183,11 @@ local SliderMetaFunctions = {}
_rawset (self, "FixedValue", value)
end
--> set value
function SliderMetaFunctions:SetValue (value)
return self (value)
end
-- thumb size
function SliderMetaFunctions:SetThumbSize (w, h)
if (not w) then
@@ -382,6 +407,7 @@ function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, de
--> build frames
local slider = gump:NewSlider (parent, container, name, member, w, h, 1, 2, 1, defaultv)
slider:SetBackdrop ({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8,
bgFile = [[Interface\AddOns\Details\images\background]], insets = {left = 3, right = 3, top = 5, bottom = 5}})
@@ -406,6 +432,8 @@ function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, de
slider:SetValue (2)
slider:SetValue (defaultv)
slider.isSwitch = true
return slider
end
+4
View File
@@ -117,6 +117,8 @@ function _detalhes:SaveDataOnLogout()
_detalhes_global.clear_ungrouped = _detalhes.clear_ungrouped
_detalhes_global.update_speed = _detalhes.update_speed
_detalhes_global.time_type = _detalhes.time_type
_detalhes_global.memory_threshold = _detalhes.memory_threshold
_detalhes_global.memory_ram = _detalhes.memory_ram
_detalhes_global.SpellOverwriteUser = _detalhes.SpellOverwriteUser
@@ -309,6 +311,8 @@ end --]]
_detalhes.clear_ungrouped = _detalhes_global.clear_ungrouped or _detalhes.clear_ungrouped
_detalhes.update_speed = _detalhes_global.update_speed or _detalhes.update_speed
_detalhes.time_type = _detalhes_global.time_type or _detalhes.time_type
_detalhes.memory_threshold = _detalhes_global.memory_threshold
_detalhes.memory_ram = _detalhes_global.memory_ram
_detalhes.SpellOverwriteUser = _detalhes_global.SpellOverwriteUser or _detalhes.SpellOverwriteUser
else
+459 -2
View File
@@ -85,6 +85,11 @@ function SlashCmdList.DETAILS (msg, editbox)
local name, realm = UnitName ("party"..i)
print (name, " -- ", realm)
end
elseif (msg == "cacheparser") then
_detalhes:PrintParserCacheIndexes()
elseif (msg == "parsercache") then
_detalhes:PrintParserCacheIndexes()
elseif (msg == "captures") then
for k, v in pairs (_detalhes.capture_real) do
@@ -175,6 +180,14 @@ function SlashCmdList.DETAILS (msg, editbox)
_detalhes.gump:ImageEditor (callback, "Interface\\TALENTFRAME\\bg-paladin-holy", nil, {1, 1, 1, 1}) -- {0.25, 0.25, 0.25, 0.25}
elseif (msg == "chat") then
local name, fontSize, r, g, b, a, shown, locked = FCF_GetChatWindowInfo (1);
print (name,"|",fontSize,"|", r,"|", g,"|", b,"|", a,"|", shown,"|", locked)
--local fontFile, unused, fontFlags = self:GetFont();
--self:SetFont(fontFile, fontSize, fontFlags);
elseif (msg == "error") then
a = nil + 1
@@ -284,10 +297,10 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "debug") then
if (_detalhes.debug) then
_detalhes.debug = false
print ("Details Diagnostic mode OFF")
_detalhes:Msg ("diagnostic mode has been turned off.")
else
_detalhes.debug = true
print ("Details Diagnostic mode ON")
_detalhes:Msg ("diagnostic mode has been turned on.")
end
--> debug combat log
@@ -303,6 +316,9 @@ function SlashCmdList.DETAILS (msg, editbox)
end
--> debug
elseif (msg == "tables") then
_detalhes:tables()
elseif (msg == "gs") then
_detalhes:teste_grayscale()
@@ -323,3 +339,444 @@ function SlashCmdList.DETAILS (msg, editbox)
end
end
function _detalhes:tables ()
-- generate a graphviz graph from a lua table structure
local string_result = ""
local function append( tab, ... )
for i = 1, select( '#', ... ) do
tab[ #tab + 1 ] = (select( i, ... ))
end
return tab
end
local function abbrev( str, data )
local escape = "\\\\"
if data.use_html then
escape = "\\"
end
local s = string.gsub( str, "[^%w?!=/+*-_.:,; ]", function( c )
-- local s = string.gsub( str, "[^%w_]", function( c )
return escape .. string.byte( c )
end )
if string.len( s ) > 20 then
s = string.sub( s, 1, 17 ) .. "..."
end
return "'" .. s .. "'"
end
local function update_node_depth( val, data, depth )
data.node2depth[ val ] = math.min( data.node2depth[ val ] or depth, depth )
end
local function define_node( data, node )
assert( not data.node2id[ node.value ] )
local id = data.n_nodes
data.n_nodes = data.n_nodes + 1
data.node2id[ node.value ] = id
append( data.nodes, node )
return id
end
local function define_edge( data, edge )
append( data.edges, edge )
end
local function get_metatable( val, enabled )
if enabled then
if type( debug ) == "table" and
type( debug.getmetatable ) == "function" then
return debug.getmetatable( val )
elseif type( getmetatable ) == "function" then
return getmetatable( val )
end
end
end
local function get_environment( val, enabled )
if enabled then
if type( debug ) == "table" and
type( debug.getfenv ) == "function" then
return debug.getfenv( val )
elseif type( getfenv ) == "function" and
type( val ) == "function" then
return getfenv( val )
end
end
end
-- generate dot code for references
local function dottify_metatable_ref( val, id1, mt, id2, data )
append( data.edges, {
A = val, A_id = id1,
B = mt, B_id = id2,
style = "dashed",
arrowtail = "odiamond",
label = "metatable",
color = "blue"
} )
data.nodes[ data.node2id[ val ] ].important = true
data.nodes[ data.node2id[ mt ] ].important = true
end
local function dottify_environment_ref( val, id1, env, id2, data )
append( data.edges, {
A = val, A_id = id1,
B = env, B_id = id2,
style = "dotted",
arrowtail = "dot",
label = "environment",
color = "red"
} )
data.nodes[ data.node2id[ val ] ].important = true
data.nodes[ data.node2id[ env ] ].important = true
end
local function dottify_upvalue_ref( val, id1, upv, id2, data, name )
append( data.edges, {
A = val, A_id = id1,
B = upv, B_id = id2,
style = "dashed",
label = name or "#upvalue",
color = "green"
} )
data.nodes[ data.node2id[ val ] ].important = true
data.nodes[ data.node2id[ upv ] ].important = true
end
local function dottify_ref( val1, id1, val2, id2, data )
append( data.edges, {
A = val1, A_id = id1,
B = val2, B_id = id2,
style = "solid",
arrowhead = "normal",
} )
end
-- forward declarations
local dottify_table, dottify_userdata, dottify_thread, dottify_function
local function make_label( tab, v, data, id, subid, depth )
if type( v ) == "table" then
local id2 = dottify_table( v, data, depth+1 )
dottify_ref( tab, id..":"..subid, v, id2..":0", data )
return tostring( v )
elseif type( v ) == "userdata" then
local id2 = dottify_userdata( v, data, depth+1 )
dottify_ref( tab, id..":"..subid, v, id2, data )
return tostring( v )
elseif type( v ) == "function" then
local id2 = dottify_function( v, data, depth+1 )
dottify_ref( tab, id..":"..subid, v, id2, data )
return tostring( v )
elseif type( v ) == "thread" then
local id2 = dottify_thread( v, data, depth+1 )
dottify_ref( tab, id..":"..subid, v, id2, data )
return tostring( v )
elseif type( v ) == "string" then
return abbrev( v, data )
elseif type( v ) == "number" or type( v ) == "boolean" then
return tostring( v )
else
error( "unsupported primitive lua type" )
end
end
function dottify_table( tab, data, depth )
assert( type( tab ) == "table" )
update_node_depth( tab, data, depth )
if not data.node2id[ tab ] then
local node = {
value = tab
}
local id = define_node( data, node )
local label
-- build label for this table
if data.use_html then
node.shape = "plaintext"
label = [[<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"><TR><TD PORT="0" COLSPAN="2" BGCOLOR="lightgrey">]] .. tostring( tab ) .. [[</TD></TR>]]
else
node.shape = "record"
label = "{ <0> " .. tostring( tab )
end
local handled = {}
local n = 1
-- first the array part
for i,v in ipairs( tab ) do
local el_label = make_label( tab, v, data, id, n, depth )
if data.use_html then
label = label .. [[<TR><TD PORT="]] .. n .. [[" COLSPAN="2">]] .. el_label .. [[</TD></TR>]]
else
label = label .. " | <" .. n .. "> " .. el_label
end
n = n + 1
handled[ i ] = true
end
-- and then the hash part
local keys, values = {}, {}
for k,v in pairs( tab ) do
node.important = true
if not handled[ k ] then -- skip array part elements
local k_label = make_label( tab, k, data, id, "k"..n, depth )
local v_label = make_label( tab, v, data, id, "v"..n, depth )
if data.use_html then
label = label .. [[ <TR><TD PORT="k]] .. n .. [[">]] .. k_label .. [[</TD><TD PORT="v]] .. n .. [[">]] .. v_label .. [[</TD></TR>]]
else
append( keys, "<k" .. n .. "> " .. k_label )
append( values, "<v" .. n .. "> " .. v_label )
end
n = n + 1
end
end
if data.use_html then
node.label = label .. [[</TABLE>]]
else
if next( keys ) ~= nil then
label = label .. " | { { " .. table.concat( keys, " | " ) ..
" } | { " .. table.concat( values, " | " ) .. " } }"
end
node.label = label .. " }"
end
-- and now the metatable
local mt = get_metatable( tab, data.show_metatables )
if type( mt ) == "table" then
local id2 = dottify_table( mt, data, depth+1 )
dottify_metatable_ref( tab, id .. ":0", mt, id2 .. ":0", data )
end
end
return data.node2id[ tab ]
end
function dottify_userdata( udata, data, depth )
assert( type( udata ) == "userdata" )
update_node_depth( udata, data, depth )
if not data.node2id[ udata ] then
local id = define_node( data, {
value = udata,
label = tostring( udata ),
shape = "box"
} )
-- the metatable
local mt = get_metatable( udata, data.show_metatables )
if type( mt ) == "table" then
local id2 = dottify_table( mt, data, depth+1 )
dottify_metatable_ref( udata, id, mt, id2..":0", data )
end
-- the environment
local env = get_environment( udata, data.show_environments )
if type( env ) == "table" then
local id2 = dottify_table( env, data, depth+1 )
dottify_environment_ref( udata, id, env, id2..":0", data )
end
end
return data.node2id[ udata ]
end
function dottify_thread( thread, data, depth )
assert( type( thread ) == "thread" )
update_node_depth( thread, data, depth )
if not data.node2id[ thread ] then
local id = define_node( data, {
value = thread,
label = tostring( thread ),
shape = "triangle"
} )
-- the environment
local env = get_environment( val, data.show_environments )
if type( env ) == "table" then
local id2 = dottify_table( env, data, depth+1 )
dottify_environment_ref( thread, id, env, id2..":0", data )
end
end
return data.node2id[ thread ]
end
function dottify_function( func, data, depth )
assert( type( func ) == "function" )
update_node_depth( func, data, depth )
if not data.node2id[ func ] then
local id = define_node( data, {
value = func,
label = tostring( func ),
shape = "ellipse"
} )
-- the environment
local env = get_environment( func, data.show_environments )
if type( env ) == "table" then
local id2 = dottify_table( env, data, depth+1 )
dottify_environment_ref( func, id, env, id2..":0", data )
end
-- the upvalues
if data.show_upvalues and
type( debug ) == "table" and
type( debug.getupvalue ) == "function" then
local n = 1
repeat
local name, upvalue = debug.getupvalue( func, n )
if type( upvalue ) == "table" then
local id2 = dottify_table( upvalue, data, depth+1 )
dottify_upvalue_ref( func, id, upvalue, id2..":0", data, name )
elseif type( upvalue ) == "userdata" then
local id2 = dottify_userdata( upvalue, data, depth+1 )
dottify_upvalue_ref( func, id, upvalue, id2, data, name )
elseif type( upvalue ) == "function" then
local id2 = dottify_function( upvalue, data, depth+1 )
dottify_upvalue_ref( func, id, upvalue, id2, data, name )
elseif type( upvalue ) == "thread" then
local id2 = dottify_thread( upvalue, data, depth+1 )
dottify_upvalue_ref( func, id, upvalue, id2, data, name )
end
n = n + 1
until name == nil
end
end
return data.node2id[ func ]
end
local option_names = {
"label", "shape", "style", "dir", "arrowhead", "arrowtail", "color",
"fillcolor"
}
local function process_options( obj )
local options = {}
for _,opt in ipairs( option_names ) do
if obj[ opt ] then
local quote_on = "\""
local quote_off = "\""
if opt == "label" and type( obj[ opt ] ) == "string" and
obj[ opt ]:match( "^<.*>$" ) then
quote_on, quote_off = "<", ">"
end
append( options, tostring( opt ) .. "=" .. quote_on ..
tostring( obj[ opt ] ) .. quote_off )
end
end
return options
end
local function write_nodes( file, data )
for _,n in ipairs( data.nodes ) do
if (data.max_depth <= 0 or
data.node2depth[ n.value ] <= data.max_depth) and
(data.show_unimportant or n.important) then
local options = process_options( n )
string_result = string_result .. " " .. tostring( data.node2id[ n.value ] ) .. " [" .. table.concat( options, "," ) .. "];--PULALINHA--"
end
end
end
local function write_edges( file, data )
for _,e in ipairs( data.edges ) do
if (data.max_depth <= 0 or
(data.node2depth[ e.A ] <= data.max_depth and
data.node2depth[ e.B ] <= data.max_depth)) and
(data.show_unimportant or
(data.nodes[ data.node2id[ e.A ] ].important and
data.nodes[ data.node2id[ e.B ] ].important)) then
local id1 = e.A_id or data.node2id[ e.A ]
local id2 = e.B_id or data.node2id[ e.B ]
local options = process_options( e )
string_result = string_result .. " " .. tostring( id1 ) .. " -> " .. tostring( id2 ) .. " [" .. table.concat( options, "," ) .. "];--PULALINHA--"
end
end
end
-- main function
local function dottify( filename, val, ... )
local data = {
n_nodes = 1,
node2id = {},
node2depth = {},
nodes = {},
edges = {},
show_metatables = true,
show_upvalues = true,
show_environments = false,
use_html = true,
show_unimportant = false,
max_depth = 0,
}
for i = 1, select( '#', ... ) do
local opt = select( i, ... )
if opt == "noenvironments" then
data.show_environments = false
elseif opt == "nometatables" then
data.show_metatables = false
elseif opt == "noupvalues" then
data.show_upvalues = false
elseif opt == "nohtml" then
data.use_html = false
elseif opt == "environments" then
data.show_environments = true
elseif opt == "metatables" then
data.show_metatables = true
elseif opt == "upvalues" then
data.show_upvalues = true
elseif opt == "html" then
data.use_html = true
elseif opt == "unimportant" then
data.show_unimportant = true
elseif type( opt ) == "number" then
data.max_depth = opt
end
end
local t = type( val )
if t == "table" then
local id = dottify_table( val, data, 1 )
data.nodes[ id ].important = true
elseif t == "function" then
local id = dottify_function( val, data, 1 )
data.nodes[ id ].important = true
elseif t == "thread" then
local id = dottify_thread( val, data, 1 )
data.nodes[ id ].important = true
elseif t == "userdata" then
local id = dottify_userdata( val, data, 1 )
data.nodes[ id ].important = true
else
io.stderr:write( "warning: unsuitable value for dotlua!<br>" )
end
--local file = assert( io.open( filename, "w" ) )
string_result = string_result .. "digraph {--PULALINHA--"
--file:write( "digraph {\n" )
write_nodes ( o, data )
write_edges ( o, data )
string_result = string_result .. "}--PULALINHA--"
--file:write( "}\n" )
--file:close()
return o
end
dottify ( nil, _detalhes, "nohtml")
print ("running...", string.len (string_result))
--_G ["_detalhes_database"].aaaaaaaa = string_result
_detalhes:CopyPaste (string_result)
return dottify
end
+144 -37
View File
@@ -15,7 +15,7 @@ function _detalhes:OpenOptionsWindow (instance)
-- Most of details widgets have the same 6 first parameters: parent, container, global name, parent key, width, height
window = g:NewPanel (UIParent, _, "DetailsOptionsWindow", _, 700, 340)
window = g:NewPanel (UIParent, _, "DetailsOptionsWindow", _, 700, 360)
window.instance = instance
tinsert (UISpecialFrames, "DetailsOptionsWindow")
window:SetPoint ("center", UIParent, "Center")
@@ -28,11 +28,85 @@ function _detalhes:OpenOptionsWindow (instance)
local c = window:CreateRightClickLabel ("medium")
c:SetPoint ("bottomleft", window, "bottomleft", 5, 5)
--------------- Memory
g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv
g:NewSlider (window, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", 80, 20, 1, 5, 1, _detalhes.segments_amount_to_save) -- min, max, step, defaultv
g:NewSlider (window, _, "$parentSliderUpdateSpeed", "updatespeedSlider", 160, 20, 0.3, 3, 0.1, _detalhes.update_speed, true) --parent, container, name, member, w, h, min, max, step, defaultv
g:NewLabel (window, _, "$parentLabelMemory", "memoryLabel", "memory threshold")
window.memoryLabel:SetPoint (10, -35)
--
g:NewSlider (window, _, "$parentSliderMemory", "memorySlider", 130, 20, 1, 4, 1, _detalhes.memory_threshold) -- min, max, step, defaultv
window.memorySlider:SetPoint ("left", window.memoryLabel, "right", 2, 0)
window.memorySlider:SetHook ("OnValueChange", function (slider, _, amount) --> slider, fixedValue, sliderValue
amount = math.floor (amount)
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
_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
_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
_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
_G.DetailsOptionsWindowSlider.MyObject:SetValue (_detalhes.segments_amount)
_G.DetailsOptionsWindowSliderSegmentsSave.MyObject:SetValue (_detalhes.segments_amount_to_save)
_G.DetailsOptionsWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed)
end
_detalhes.memory_threshold = amount
return true
end)
window.memorySlider.tooltip = "Details! try adjust it self with the amount of memory\navaliable on your system.\n\nAlso is recommeded keep the amount of\nsegments low if your system have 2gb ram or less."
window.memorySlider.thumb:SetSize (40, 12)
window.memorySlider.thumb:SetTexture ([[Interface\Buttons\UI-Listbox-Highlight2]])
window.memorySlider.thumb:SetVertexColor (.2, .2, .2, .9)
local t = _detalhes.memory_threshold
window.memorySlider:SetValue (1)
window.memorySlider:SetValue (2)
window.memorySlider:SetValue (t)
--------------- Max Segments
g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", "max segments")
window.segmentsLabel:SetPoint (10, -35)
window.segmentsLabel:SetPoint (10, -50)
--
g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv
window.segmentsSlider:SetPoint ("left", window.segmentsLabel, "right")
window.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
_detalhes.segments_amount = math.floor (amount)
@@ -41,18 +115,18 @@ function _detalhes:OpenOptionsWindow (instance)
--------------- Max Segments Saved
g:NewLabel (window, _, "$parentLabelSegmentsSave", "segmentsSaveLabel", "segments saved on logout")
window.segmentsSaveLabel:SetPoint (10, -50)
window.segmentsSaveLabel:SetPoint (10, -65)
--
g:NewSlider (window, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", 80, 20, 1, 5, 1, _detalhes.segments_amount_to_save) -- min, max, step, defaultv
window.segmentsSliderToSave:SetPoint ("left", window.segmentsSaveLabel, "right")
window.segmentsSliderToSave:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
_detalhes.segments_amount_to_save = amount
_detalhes.segments_amount_to_save = math.floor (amount)
end)
window.segmentsSliderToSave.tooltip = "How many segments will be saved on logout.\nHigher values may increase the time between a\nlogout button click and your character selection screen.\nIf you rarely check last day data, it`s high recommeded save only 1."
--------------- Panic Mode
g:NewLabel (window, _, "$parentPanicModeLabel", "panicModeLabel", "panic mode")
window.panicModeLabel:SetPoint (10, -65)
window.panicModeLabel:SetPoint (10, -80)
--
g:NewSwitch (window, _, "$parentPanicModeSlider", "panicModeSlider", 60, 20, _, _, _detalhes.segments_panic_mode)
window.panicModeSlider:SetPoint ("left", window.panicModeLabel, "right")
@@ -63,7 +137,7 @@ function _detalhes:OpenOptionsWindow (instance)
--------------- Animate Rows
g:NewLabel (window, _, "$parentAnimateLabel", "animateLabel", "dance bars")
window.animateLabel:SetPoint (10, -80)
window.animateLabel:SetPoint (10, -95)
--
g:NewSwitch (window, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv
window.animateSlider:SetPoint ("left",window.animateLabel, "right")
@@ -71,22 +145,9 @@ function _detalhes:OpenOptionsWindow (instance)
_detalhes.use_row_animations = value
end
--------------- Clear Ungrouped
--[[
g:NewLabel (window, _, "$parentClearUngroupedLabel", "clearungroupedLabel", "delete ungrouped on logout")
window.clearungroupedLabel:SetPoint (10, -65)
--
g:NewSwitch (window, _, "$parentClearUngroupedSlider", "clearungroupedSlider", 60, 20, _, _, _detalhes.clear_ungrouped) -- ltext, rtext, defaultv
window.clearungroupedSlider:SetPoint ("left", window.clearungroupedLabel, "right")
window.clearungroupedSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue
_detalhes.clear_ungrouped = value
end
window.clearungroupedSlider.tooltip = "erase actors without a group when you logout."
--]]
--------------- Use Scroll Bar
g:NewLabel (window, _, "$parentUseScrollLabel", "scrollLabel", "show scroll bar")
window.scrollLabel:SetPoint (10, -95)
window.scrollLabel:SetPoint (10, -110)
--
g:NewSwitch (window, _, "$parentUseScrollSlider", "scrollSlider", 60, 20, _, _, _detalhes.use_scroll) -- ltext, rtext, defaultv
window.scrollSlider:SetPoint ("left", window.scrollLabel, "right")
@@ -110,7 +171,7 @@ function _detalhes:OpenOptionsWindow (instance)
--------------- Animate scroll bar
g:NewLabel (window, _, "$parentAnimateScrollLabel", "animatescrollLabel", "animate scroll")
window.animatescrollLabel:SetPoint (10, -110)
window.animatescrollLabel:SetPoint (10, -125)
--
g:NewSwitch (window, _, "$parentClearAnimateScrollSlider", "animatescrollSlider", 60, 20, _, _, _detalhes.animate_scroll) -- ltext, rtext, defaultv
window.animatescrollSlider:SetPoint ("left", window.animatescrollLabel, "right")
@@ -120,9 +181,9 @@ function _detalhes:OpenOptionsWindow (instance)
--------------- Update Speed
g:NewLabel (window, _, "$parentUpdateSpeedLabel", "updatespeedLabel", "update speed")
window.updatespeedLabel:SetPoint (10, -125)
window.updatespeedLabel:SetPoint (10, -143)
--
g:NewSlider (window, _, "$parentSliderUpdateSpeed", "updatespeedSlider", 160, 20, 0.3, 3, 0.1, _detalhes.update_speed, true) --parent, container, name, member, w, h, min, max, step, defaultv
--g:NewSlider (window, _, "$parentSliderUpdateSpeed", "updatespeedSlider", 160, 20, 0.3, 3, 0.1, _detalhes.update_speed, true) --parent, container, name, member, w, h, min, max, step, defaultv
window.updatespeedSlider:SetPoint ("left", window.updatespeedLabel, "right")
window.updatespeedSlider:SetThumbSize (50)
window.updatespeedSlider.useDecimals = true
@@ -147,7 +208,7 @@ function _detalhes:OpenOptionsWindow (instance)
--------------- Time Type
g:NewLabel (window, _, "$parentTimeTypeLabel", "timetypeLabel", "time measure")
window.timetypeLabel:SetPoint (10, -143)
window.timetypeLabel:SetPoint (10, -163)
--
local onSelectTimeType = function (_, _, timetype)
_detalhes.time_type = timetype
@@ -165,23 +226,23 @@ function _detalhes:OpenOptionsWindow (instance)
--------------- Captures
g:NewImage (window, _, "$parentCaptureDamage", "damageCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
window.damageCaptureImage:SetPoint (10, -163)
window.damageCaptureImage:SetPoint (10, -183)
window.damageCaptureImage:SetTexCoord (0, 0.125, 0, 1)
g:NewImage (window, _, "$parentCaptureHeal", "healCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
window.healCaptureImage:SetPoint (10, -183)
window.healCaptureImage:SetPoint (10, -203)
window.healCaptureImage:SetTexCoord (0.125, 0.25, 0, 1)
g:NewImage (window, _, "$parentCaptureEnergy", "energyCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
window.energyCaptureImage:SetPoint (10, -203)
window.energyCaptureImage:SetPoint (10, -223)
window.energyCaptureImage:SetTexCoord (0.25, 0.375, 0, 1)
g:NewImage (window, _, "$parentCaptureMisc", "miscCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
window.miscCaptureImage:SetPoint (10, -223)
window.miscCaptureImage:SetPoint (10, -243)
window.miscCaptureImage:SetTexCoord (0.375, 0.5, 0, 1)
g:NewImage (window, _, "$parentCaptureAura", "auraCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
window.auraCaptureImage:SetPoint (10, -243)
window.auraCaptureImage:SetPoint (10, -263)
window.auraCaptureImage:SetTexCoord (0.5, 0.625, 0, 1)
g:NewLabel (window, _, "$parentCaptureDamageLabel", "damageCaptureLabel", "Damage")
@@ -247,7 +308,7 @@ function _detalhes:OpenOptionsWindow (instance)
--------------- Cloud Capture
g:NewLabel (window, _, "$parentCloudCaptureLabel", "cloudCaptureLabel", "Cloud Capture")
window.cloudCaptureLabel:SetPoint (10, -268)
window.cloudCaptureLabel:SetPoint (10, -288)
g:NewSwitch (window, _, "$parentCloudAuraSlider", "cloudCaptureSlider", 60, 20, _, _, _detalhes.cloud_capture)
window.cloudCaptureSlider:SetPoint ("left", window.cloudCaptureLabel, "right", 2)
@@ -258,7 +319,7 @@ function _detalhes:OpenOptionsWindow (instance)
--------------- Max Instances
g:NewLabel (window, _, "$parentLabelMaxInstances", "maxInstancesLabel", "max instances")
window.maxInstancesLabel:SetPoint (10, -288)
window.maxInstancesLabel:SetPoint (10, -314)
--
g:NewSlider (window, _, "$parentSliderMaxInstances", "maxInstancesSlider", 150, 20, 12, 30, 1, _detalhes.instances_amount) -- min, max, step, defaultv
window.maxInstancesSlider:SetPoint ("left", window.maxInstancesLabel, "right")
@@ -267,8 +328,11 @@ function _detalhes:OpenOptionsWindow (instance)
end)
window.maxInstancesSlider.tooltip = "Amount of windows which can be created."
-- Current Instalnce --------------------------------------------------------------------------------------------------------------------------------------------
-- Current Instalnce --------------------------------------------------------------------------------------------------------------------------------------------
--------------- Row textures
g:NewLabel (window, _, "$parentTextureLabel", "textureLabel", "row style")
window.textureLabel:SetPoint (250, -30)
@@ -351,6 +415,8 @@ function _detalhes:OpenOptionsWindow (instance)
local selectedAlpha = function()
local r, g, b = ColorPickerFrame:GetColorRGB()
local a = OpacitySliderFrame:GetValue()
a = _detalhes:Scale (0, 1, 0.5, 1, a) - 0.5
window.instancecolortexture:SetTexture (r, g, b)
window.instancecolortexture:SetAlpha (a)
@@ -362,8 +428,9 @@ function _detalhes:OpenOptionsWindow (instance)
local colorpick = function()
ColorPickerFrame.func = selectedColor
ColorPickerFrame.opacityFunc = selectedAlpha
ColorPickerFrame.cancelFunc = canceledColor
ColorPickerFrame.hasOpacity = false
ColorPickerFrame.hasOpacity = true --false
ColorPickerFrame.opacity = window.instance.color[4] or 1
ColorPickerFrame.previousValues = window.instance.color
ColorPickerFrame:SetParent (window.widget)
@@ -371,7 +438,7 @@ function _detalhes:OpenOptionsWindow (instance)
ColorPickerFrame:Show()
end
g:NewImage (window, _, "$parentInstanceColorTexture", "instancecolortexture", 100, 12)
g:NewImage (window, _, "$parentInstanceColorTexture", "instancecolortexture", 150, 12)
window.instancecolortexture:SetPoint ("left", window.instancecolor, "right", 2)
window.instancecolortexture:SetTexture (1, 1, 1)
@@ -634,6 +701,7 @@ function _detalhes:OpenOptionsWindow (instance)
if (tinstance.wallpaper.texture:find ("TALENTFRAME")) then
g:ImageEditor (callmeback, tinstance.wallpaper.texture, tinstance.wallpaper.texcoord, tinstance.wallpaper.overlay, window.instance.baseframe.wallpaper:GetWidth(), window.instance.baseframe.wallpaper:GetHeight())
else
tinstance.wallpaper.overlay [4] = 0.5
g:ImageEditor (callmeback, tinstance.wallpaper.texture, tinstance.wallpaper.texcoord, tinstance.wallpaper.overlay, window.instance.baseframe.wallpaper:GetWidth(), window.instance.baseframe.wallpaper:GetHeight())
end
end
@@ -648,6 +716,35 @@ function _detalhes:OpenOptionsWindow (instance)
window.editImage:InstallCustomTexture()
window.editImage:SetPoint ("left", window.anchorDropdown, "right", 2)
--
--------------- Alpha
g:NewLabel (window, _, "$parentAlphaLabel", "alphaLabel", "transparency")
window.alphaLabel:SetPoint (250, -230)
--
g:NewSlider (window, _, "$parentAlphaSlider", "alphaSlider", 160, 20, 0.02, 1, 0.02, instance.bg_alpha, true) -- min, max, step, defaultv
window.alphaSlider:SetPoint ("left", window.alphaLabel, "right", 2, 0)
window.alphaSlider.useDecimals = true
window.alphaSlider:SetHook ("OnValueChange", function (self, instance, amount) --> slider, fixedValue, sliderValue
self.amt:SetText (string.format ("%.2f", amount))
instance:SetBackgroundAlpha (amount)
return true
end)
window.alphaSlider.thumb:SetSize (30+(120*0.2)+2, 20*1.2)
window.alphaSlider.tooltip = "Change the background alpha for this instance"
--------------- Auto Current Segment
g:NewLabel (window, _, "$parentAutoCurrentLabel", "autoCurrentLabel", "auto switch to current")
window.autoCurrentLabel:SetPoint (250, -253)
g:NewSwitch (window, _, "$parentAutoCurrentSlider", "autoCurrentSlider", 60, 20, _, _, instance.auto_current)
window.autoCurrentSlider:SetPoint ("left", window.autoCurrentLabel, "right", 2)
window.autoCurrentSlider.tooltip = "Whenever a combat start and there is no other instance on\ncurrent segment, this instance auto switch to current segment."
window.autoCurrentSlider.OnSwitch = function (self, instance, value)
instance.auto_current = value
end
----------------------- Save Style Text Entry and Button -----------------------------------------
----- style name
@@ -666,7 +763,8 @@ function _detalhes:OpenOptionsWindow (instance)
fontSize = tonumber (window.fonsizeSlider.value),
fontFace = window.fontDropdown.value,
color = window.instance.color,
wallpaper = instance.wallpaper
wallpaper = instance.wallpaper,
alpha = tonumber (window.alphaSlider.value)
}
_detalhes.savedStyles [#_detalhes.savedStyles+1] = savedObject
window.saveStyleName.text = ""
@@ -695,6 +793,8 @@ function _detalhes:OpenOptionsWindow (instance)
instance:InstanceColor (style.color)
--wallpaper
instance:InstanceWallpaper (style.wallpaper)
--alpha
instance:SetBackgroundAlpha (style.alpha or _detalhes.default_bg_alpha)
--refresh
instance:RefreshBars()
--update options
@@ -703,6 +803,7 @@ function _detalhes:OpenOptionsWindow (instance)
_G.DetailsOptionsWindowTextureDropdown.MyObject:Select (style.texture)
_G.DetailsOptionsWindowFontDropdown.MyObject:Select (style.fontFace)
_G.DetailsOptionsWindowSliderFontSize.MyObject:SetValue (style.fontSize)
_G.DetailsOptionsWindowAlphaSlider.MyObject:SetValue (style.alpha or _detalhes.default_bg_alpha)
end
local createLoadMenu = function()
@@ -809,6 +910,12 @@ function _detalhes:OpenOptionsWindow (instance)
_G.DetailsOptionsWindowSliderFontSize.MyObject:SetFixedParameter (instance)
_G.DetailsOptionsWindowSliderFontSize.MyObject:SetValue (instance.barrasInfo.fontSize)
--
_G.DetailsOptionsWindowAutoCurrentSlider.MyObject:SetFixedParameter (instance)
_G.DetailsOptionsWindowAutoCurrentSlider.MyObject:SetValue (instance.auto_current)
--
_G.DetailsOptionsWindowAlphaSlider.MyObject:SetFixedParameter (instance)
_G.DetailsOptionsWindowAlphaSlider.MyObject:SetValue (instance.bg_alpha)
--
_G.DetailsOptionsWindowUseBackgroundSlider.MyObject:SetFixedParameter (instance)
_G.DetailsOptionsWindowBackgroundDropdown.MyObject:SetFixedParameter (instance)
_G.DetailsOptionsWindowBackgroundDropdown2.MyObject:SetFixedParameter (instance)
+113 -54
View File
@@ -1,3 +1,6 @@
--note: this file need a major clean up especially on function creation.
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
@@ -1333,7 +1336,7 @@ local function button_stretch_scripts (BaseFrame, BackGroundDisplay, instancia)
_detalhes:SendEvent ("DETAILS_INSTANCE_SIZECHANGED", nil, esta_instancia)
local _r, _g, _b, _a = esta_instancia.baseframe:GetBackdropColor()
gump:GradientEffect ( esta_instancia.baseframe, "frame", _r, _g, _b, _a, _detalhes.default_bg_color, _detalhes.default_bg_color, _detalhes.default_bg_color, _detalhes.default_bg_alpha, 0.5)
gump:GradientEffect ( esta_instancia.baseframe, "frame", _r, _g, _b, _a, instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha, 0.5)
if (esta_instancia.wallpaper.enabled) then
_r, _g, _b = esta_instancia.baseframe.wallpaper:GetVertexColor()
@@ -1351,7 +1354,7 @@ local function button_stretch_scripts (BaseFrame, BackGroundDisplay, instancia)
end
local _r, _g, _b, _a = BaseFrame:GetBackdropColor()
gump:GradientEffect ( BaseFrame, "frame", _r, _g, _b, _a, _detalhes.default_bg_color, _detalhes.default_bg_color, _detalhes.default_bg_color, _detalhes.default_bg_alpha, 0.5)
gump:GradientEffect ( BaseFrame, "frame", _r, _g, _b, _a, instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha, 0.5)
if (instancia.wallpaper.enabled) then
_r, _g, _b = BaseFrame.wallpaper:GetVertexColor()
_a = BaseFrame.wallpaper:GetAlpha()
@@ -1630,7 +1633,7 @@ function CreateAlertFrame (BaseFrame, instancia)
local rotate_frame = CreateFrame ("frame", nil, alert_bg)
rotate_frame:SetWidth (12)
rotate_frame:SetPoint ("right", alert_bg, "right")
rotate_frame:SetPoint ("right", alert_bg, "right", -2, 0)
rotate_frame:SetHeight (alert_bg:GetWidth())
local icon = rotate_frame:CreateTexture (nil, "overlay")
@@ -1790,7 +1793,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
BaseFrame:SetMaxResize (_detalhes.max_window_size.width, _detalhes.max_window_size.height)
BaseFrame:SetBackdrop (gump_fundo_backdrop)
BaseFrame:SetBackdropColor (_detalhes.default_bg_color, _detalhes.default_bg_color, _detalhes.default_bg_color, _detalhes.default_bg_alpha)
BaseFrame:SetBackdropColor (instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha)
--BaseFrame:SetBackdropColor (0, 0, 0, 1)
-- fundo
@@ -1803,7 +1806,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
BackGroundDisplay:SetPoint ("TOPLEFT", BaseFrame, "TOPLEFT")
BackGroundDisplay:SetPoint ("BOTTOMRIGHT", BaseFrame, "BOTTOMRIGHT")
BackGroundDisplay:SetBackdrop (gump_fundo_backdrop)
BackGroundDisplay:SetBackdropColor (_detalhes.default_bg_color, _detalhes.default_bg_color, _detalhes.default_bg_color, _detalhes.default_bg_alpha)
BackGroundDisplay:SetBackdropColor (instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha)
--BackGroundDisplay:SetBackdropColor (0, 0, 0, 1)
@@ -1832,9 +1835,14 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
if (not _detalhes.initializing) then
instancia._version:Hide()
end
--[[
BaseFrame.wallpaper = BaseFrame:CreateTexture (nil, "border")
BaseFrame.wallpaper:Hide()
BaseFrame.wallpaperUP = BackGroundDisplay:CreateTexture (nil, "overlay")
BaseFrame.wallpaperUP:Hide()
--]]
BaseFrame.wallpaper = BackGroundDisplay:CreateTexture (nil, "overlay")
BaseFrame.wallpaper:Hide()
BaseFrame.alert = CreateAlertFrame (BaseFrame, instancia)
@@ -2241,7 +2249,7 @@ function _detalhes:InstanceWallpaper (texture, anchor, alpha, texcoord, width, h
t:SetPoint ("topleft", self.baseframe, "topleft")
t:SetPoint ("bottomright", self.baseframe, "bottomright")
elseif (anchor == "center") then
t:SetPoint ("center", self.baseframe, "center")
t:SetPoint ("center", self.baseframe, "center", 0, 4)
elseif (anchor == "stretchLR") then
t:SetPoint ("center", self.baseframe, "center")
t:SetPoint ("left", self.baseframe, "left")
@@ -2380,7 +2388,9 @@ end
function _detalhes:UnConsolidateIcons()
self.consolidate = false
print (self.consolidateButton:GetObjectType())
if (not self.consolidateButton) then
return self:DefaultIcons()
end
self.consolidateButton:Hide()
return self:DefaultIcons()
end
@@ -2446,10 +2456,10 @@ function _detalhes:DefaultIcons (_mode, _segment, _attributes, _report)
if (_thisIcon2:IsShown()) then
_thisIcon:ClearAllPoints()
if (self.consolidate) then
_thisIcon:SetPoint ("topleft", _thisIcon2, "bottomleft", anchors[index][1], anchors[index][2]-2)
_thisIcon:SetPoint ("topleft", _thisIcon2.widget or _thisIcon2, "bottomleft", anchors[index][1], anchors[index][2]-2)
_thisIcon:SetParent (self.consolidateFrame)
else
_thisIcon:SetPoint ("left", _thisIcon2, "right", 0 + anchors[index][1], 0 + anchors[index][2])
_thisIcon:SetPoint ("left", _thisIcon2.widget or _thisIcon2, "right", 0 + anchors[index][1], 0 + anchors[index][2])
_thisIcon:SetParent (self.baseframe)
_thisIcon:SetFrameLevel (self.baseframe.UPFrame:GetFrameLevel()+1)
end
@@ -2476,6 +2486,7 @@ function _detalhes:DefaultIcons (_mode, _segment, _attributes, _report)
return true
end
local empty_segment_color = {1, 1, 1, .4}
function gump:CriaCabecalho (BaseFrame, instancia)
@@ -2697,6 +2708,23 @@ function gump:CriaCabecalho (BaseFrame, instancia)
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: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
end
elseif (buttontype == "RightButton") then
--instancia:TrocaTabela (-2)
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)
@@ -2727,51 +2755,79 @@ function gump:CriaCabecalho (BaseFrame, instancia)
----------- 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
local thisCombat = _detalhes.tabela_historico.tabelas [i]
if (thisCombat) then
local enemy = thisCombat.is_boss and thisCombat.is_boss.name
if (i <= fill) then
if (thisCombat.is_boss and thisCombat.is_boss.name) then
CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, "red")
local portrait = _detalhes:GetBossPortrait (thisCombat.is_boss.mapid, thisCombat.is_boss.index)
if (portrait) then
CoolTip:AddIcon (portrait, 2, "top", 128, 64)
end
else
enemy = thisCombat.enemy
if (enemy) then
CoolTip:AddLine (thisCombat.enemy .." (#"..i..")", _, 1, "yellow")
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
CoolTip:AddLine (segmentos.past..i, _, 1, "silver")
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
CoolTip:AddMenu (1, instancia.TrocaTabela, i)
CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16)
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")
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)
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
@@ -2779,7 +2835,7 @@ function gump:CriaCabecalho (BaseFrame, instancia)
----------- 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)
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--"
@@ -2810,15 +2866,17 @@ function gump:CriaCabecalho (BaseFrame, instancia)
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", _detalhes.segments_amount + 1)
CoolTip:SetLastSelected ("main", fill + 1)
menuIndex = nil
end
----------- overall
CoolTip:AddLine (segmentos.overall_standard, _, 1, "white")
--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)
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
@@ -2854,8 +2912,9 @@ function gump:CriaCabecalho (BaseFrame, instancia)
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", _detalhes.segments_amount + 2)
CoolTip:SetLastSelected ("main", fill + 2)
menuIndex = nil
end
@@ -2911,7 +2970,7 @@ function gump:CriaCabecalho (BaseFrame, instancia)
--> SELECIONAR O ATRIBUTO ----------------------------------------------------------------------------------------------------------------------------------------------------
BaseFrame.cabecalho.atributo = gump:NewDetailsButton (BaseFrame, _, instancia, instancia.TrocaTabela, instancia, -3, 16, 16, "Interface\\AddOns\\Details\\images\\sword")
BaseFrame.cabecalho.atributo:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1)
BaseFrame.cabecalho.atributo:SetPoint ("left", BaseFrame.cabecalho.segmento, "right", 0, 0)
BaseFrame.cabecalho.atributo:SetPoint ("left", BaseFrame.cabecalho.segmento.widget, "right", 0, 0)
--> Cooltip automatic method through Injection
+4 -4
View File
@@ -239,13 +239,13 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals
slider:SetThumbTexture (slider.thumb) --depois
slider:SetOrientation ("HORIZONTAL")
slider:SetMinMaxValues (1, 25)
slider:SetValueStep (1)
slider:SetMinMaxValues (1.0, 25.0)
slider:SetValueStep (1.0)
slider:SetWidth (232)
slider:SetHeight (20)
local last_value = _detalhes.report_lines or 5
slider:SetValue (last_value)
slider:SetValue (math.floor (last_value))
slider.amt = slider:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
local amt = slider:GetValue()
@@ -258,7 +258,7 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals
slider.amt:SetPoint ("center", slider.thumb, "center")
slider:SetScript ("OnValueChanged", function (self)
local amt = self:GetValue()
local amt = math.floor (self:GetValue())
_detalhes.report_lines = amt
if (amt < 10) then
amt = "0"..amt
+228 -4
View File
@@ -366,7 +366,7 @@ function _detalhes:OpenWelcomeWindow ()
interval_text:SetPoint ("topleft", window, "topleft", 30, -110)
local dance_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
dance_text:SetText ("Keeping 'Dance Bars' disabled may help save performance.")
dance_text:SetText ("Keeping 'Dance Bars' disabled also may help with performance.")
dance_text:SetWidth (460)
dance_text:SetHeight (40)
dance_text:SetJustifyH ("left")
@@ -421,6 +421,109 @@ function _detalhes:OpenWelcomeWindow ()
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> page 5
local bg44 = window:CreateTexture (nil, "overlay")
bg44:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg44:SetPoint ("bottomright", window, "bottomright", -10, 10)
bg44:SetHeight (125*3)--125
bg44:SetWidth (89*3)--82
bg44:SetAlpha (.1)
bg44:SetTexCoord (1, 0, 0, 1)
g:NewLabel (window, _, "$parentChangeMind44Label", "changemind44Label", "if you change your mind, you can always modify again through options panel", "GameFontNormal", 9, "orange")
window.changemind44Label:SetPoint ("center", window, "center")
window.changemind44Label:SetPoint ("bottom", window, "bottom", 0, 19)
window.changemind44Label.align = "|"
local texto44 = window:CreateFontString (nil, "overlay", "GameFontNormal")
texto44:SetPoint ("topleft", window, "topleft", 20, -80)
texto44:SetText ("Memory Adjustments:")
local interval_text4 = window:CreateFontString (nil, "overlay", "GameFontNormal")
interval_text4:SetText ("The amount of memory used by addons doesn't affect framerate, but, saving memory in computers which doesn't have much of it, may help the whole system. Details! try to be as flexible as possible to keep the game smooth even in not high-end hardware.")
interval_text4:SetWidth (460)
interval_text4:SetHeight (60)
interval_text4:SetJustifyH ("left")
interval_text4:SetJustifyV ("top")
interval_text4:SetTextColor (1, 1, 1, 1)
interval_text4:SetPoint ("topleft", window, "topleft", 30, -110)
--[[
local dance_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
dance_text:SetText ("Low amount of segments can keep memory .")
dance_text:SetWidth (460)
dance_text:SetHeight (40)
dance_text:SetJustifyH ("left")
dance_text:SetJustifyV ("top")
dance_text:SetTextColor (1, 1, 1, 1)
dance_text:SetPoint ("topleft", window, "topleft", 30, -170)
--]]
--------------- Max Segments
g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", "max segments")
window.segmentsLabel:SetPoint (31, -170)
--
g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv
window.segmentsSlider:SetPoint ("left", window.segmentsLabel, "right", 2, 0)
window.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
_detalhes.segments_amount = math.floor (amount)
end)
window.segmentsSlider.tooltip = "How many segments you want to maintain.\nFeel free to adjust this number to be comfortable for you."
--------------- memory
g:NewLabel (window, _, "$parentLabelMemory", "memoryLabel", "memory threshold")
window.memoryLabel:SetPoint (31, -185)
--
g:NewSlider (window, _, "$parentSliderMemory", "memorySlider", 130, 20, 1, 4, 1, _detalhes.memory_threshold) -- min, max, step, defaultv
window.memorySlider:SetPoint ("left", window.memoryLabel, "right", 2, 0)
window.memorySlider:SetHook ("OnValueChange", function (slider, _, amount) --> slider, fixedValue, sliderValue
amount = math.floor (amount)
if (amount == 1) then
slider.amt:SetText ("<= 1gb")
_detalhes.memory_ram = 16
elseif (amount == 2) then
slider.amt:SetText ("2gb")
_detalhes.memory_ram = 32
elseif (amount == 3) then
slider.amt:SetText ("4gb")
_detalhes.memory_ram = 64
elseif (amount == 4) then
slider.amt:SetText (">= 6gb")
_detalhes.memory_ram = 128
end
_detalhes.memory_threshold = amount
return true
end)
window.memorySlider.tooltip = "Details! try adjust it self with the amount of memory\navaliable on your system.\n\nAlso is recommeded keep the amount of\nsegments low if your system have 2gb ram or less."
window.memorySlider.thumb:SetSize (40, 10)
window.memorySlider.thumb:SetTexture ([[Interface\Buttons\UI-Listbox-Highlight2]])
window.memorySlider.thumb:SetVertexColor (.2, .2, .2, .9)
local t = _detalhes.memory_threshold
window.memorySlider:SetValue (1)
window.memorySlider:SetValue (2)
window.memorySlider:SetValue (t)
--------------- Max Segments Saved
g:NewLabel (window, _, "$parentLabelSegmentsSave", "segmentsSaveLabel", "segments saved on logout")
window.segmentsSaveLabel:SetPoint (31, -200)
--
g:NewSlider (window, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", 120, 20, 1, 5, 1, _detalhes.segments_amount_to_save) -- min, max, step, defaultv
window.segmentsSliderToSave:SetPoint ("left", window.segmentsSaveLabel, "right")
window.segmentsSliderToSave:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
_detalhes.segments_amount_to_save = math.floor (amount)
end)
window.segmentsSliderToSave.tooltip = "High values may increase the time between a\nlogout button click and your character selection screen.\n\nIf you rarely check 'last day data', it`s high recommeded save only 1."
pages [#pages+1] = {bg44, window.changemind44Label, texto44, interval_text4, window.memorySlider, window.memoryLabel, window.segmentsLabel, window.segmentsSlider, window.segmentsSaveLabel, window.segmentsSliderToSave}
for _, widget in ipairs (pages[#pages]) do
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> page 6
local bg6 = window:CreateTexture (nil, "overlay")
bg6:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg6:SetPoint ("bottomright", window, "bottomright", -10, 10)
@@ -456,7 +559,7 @@ function _detalhes:OpenWelcomeWindow ()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> page 6
--> page 7
local bg6 = window:CreateTexture (nil, "overlay")
bg6:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
@@ -493,7 +596,7 @@ function _detalhes:OpenWelcomeWindow ()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> page 7
--> page 8
local bg7 = window:CreateTexture (nil, "overlay")
bg7:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
@@ -537,7 +640,125 @@ function _detalhes:OpenWelcomeWindow ()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> page 8
--> page 9
local bg77 = window:CreateTexture (nil, "overlay")
bg77:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg77:SetPoint ("bottomright", window, "bottomright", -10, 10)
bg77:SetHeight (125*3)--125
bg77:SetWidth (89*3)--82
bg77:SetAlpha (.1)
bg77:SetTexCoord (1, 0, 0, 1)
local texto77 = window:CreateFontString (nil, "overlay", "GameFontNormal")
texto77:SetPoint ("topleft", window, "topleft", 20, -80)
texto77:SetText ("Using the Interface: Snap Instances")
local texto_snap = window:CreateFontString (nil, "overlay", "GameFontNormal")
texto_snap:SetPoint ("topleft", window, "topleft", 25, -101)
texto_snap:SetText ("You can |cFFFFFF00snap windows|r in vertical or horizontal. A window always snap with |cFFFFFF00previous instance number|r: like the image in the right, instance |cFFFFFF00#5|r snapped with |cFFFFFF00#4|r. When a snapped window is stretched, all other instances in the |cFFFFFF00cluster are also|r stretched.")
texto_snap:SetWidth (160)
texto_snap:SetHeight (110)
texto_snap:SetJustifyH ("left")
texto_snap:SetJustifyV ("top")
texto_snap:SetTextColor (1, 1, 1, 1)
local fonte, _, flags = texto_snap:GetFont()
texto_snap:SetFont (fonte, 11, flags)
local snap_image1 = window:CreateTexture (nil, "overlay")
snap_image1:SetTexture ([[Interface\Addons\Details\images\icons]])
snap_image1:SetPoint ("topright", window, "topright", -12, -95)
snap_image1:SetWidth (308)
snap_image1:SetHeight (121)
snap_image1:SetTexCoord (0, 0.6015625, 0.353515625, 0.58984375)
pages [#pages+1] = {bg77, texto77, snap_image1, texto_snap}
for _, widget in ipairs (pages[#pages]) do
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> page 10
local bg88 = window:CreateTexture (nil, "overlay")
bg88:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg88:SetPoint ("bottomright", window, "bottomright", -10, 10)
bg88:SetHeight (125*3)--125
bg88:SetWidth (89*3)--82
bg88:SetAlpha (.1)
bg88:SetTexCoord (1, 0, 0, 1)
local texto88 = window:CreateFontString (nil, "overlay", "GameFontNormal")
texto88:SetPoint ("topleft", window, "topleft", 20, -80)
texto88:SetText ("Using the Interface: Micro Display")
--|cFFFFFF00
local texto_micro_display = window:CreateFontString (nil, "overlay", "GameFontNormal")
texto_micro_display:SetPoint ("topleft", window, "topleft", 25, -101)
texto_micro_display:SetText ("All instances have three |cFFFFFF00mini widgets|r located at the bottom of window. |cFFFFFF00Right clicking|r pops up a menu and with |cFFFFFF00left click|r displays a options panel for that widget.")
texto_micro_display:SetWidth (160)
texto_micro_display:SetHeight (110)
texto_micro_display:SetJustifyH ("left")
texto_micro_display:SetJustifyV ("top")
texto_micro_display:SetTextColor (1, 1, 1, 1)
--local fonte, _, flags = texto_micro_display:GetFont()
--texto_micro_display:SetFont (fonte, 11, flags)
local micro_image1 = window:CreateTexture (nil, "overlay")
micro_image1:SetTexture ([[Interface\Addons\Details\images\icons]])
micro_image1:SetPoint ("topright", window, "topright", -12, -95)
micro_image1:SetWidth (303)
micro_image1:SetHeight (128)
micro_image1:SetTexCoord (0.408203125, 1, 0.09375, 0.341796875)
pages [#pages+1] = {bg88, texto88, micro_image1, texto_micro_display}
for _, widget in ipairs (pages[#pages]) do
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> page 11
local bg11 = window:CreateTexture (nil, "overlay")
bg11:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
bg11:SetPoint ("bottomright", window, "bottomright", -10, 10)
bg11:SetHeight (125*3)--125
bg11:SetWidth (89*3)--82
bg11:SetAlpha (.1)
bg11:SetTexCoord (1, 0, 0, 1)
local texto11 = window:CreateFontString (nil, "overlay", "GameFontNormal")
texto11:SetPoint ("topleft", window, "topleft", 20, -80)
texto11:SetText ("Using the Interface: Plugins")
--|cFFFFFF00
local texto_plugins = window:CreateFontString (nil, "overlay", "GameFontNormal")
texto_plugins:SetPoint ("topleft", window, "topleft", 25, -101)
texto_plugins:SetText ("|cFFFFFF00Threat, tank avoidance, and others|r are handled by |cFFFFFF00plugins|r. You can open a new instance, select '|cFFFFFF00Widgets|r' and choose what you want at |cFFFFFF00sword|r menu.\n\nTip: click over a bar on |cFFFFFF00Vanguard|r to show avoidance numbers.")
texto_plugins:SetWidth (220)
texto_plugins:SetHeight (110)
texto_plugins:SetJustifyH ("left")
texto_plugins:SetJustifyV ("top")
texto_plugins:SetTextColor (1, 1, 1, 1)
--local fonte, _, flags = texto_plugins:GetFont()
--texto_plugins:SetFont (fonte, 11, flags)
local plugins_image1 = window:CreateTexture (nil, "overlay")
plugins_image1:SetTexture ([[Interface\Addons\Details\images\icons2]])
plugins_image1:SetPoint ("topright", window, "topright", -12, -35)
plugins_image1:SetWidth (226)
plugins_image1:SetHeight (181)
plugins_image1:SetTexCoord (0.55859375, 1, 0.646484375, 1)
pages [#pages+1] = {bg11, texto11, plugins_image1, texto_plugins}
for _, widget in ipairs (pages[#pages]) do
widget:Hide()
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> page 12
local bg8 = window:CreateTexture (nil, "overlay")
bg8:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
@@ -583,6 +804,9 @@ function _detalhes:OpenWelcomeWindow ()
forward:Click()
forward:Click()
forward:Click()
forward:Click()
forward:Click()
forward:Click()
--]]
end
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+4
View File
@@ -14,6 +14,7 @@ if not Loc then return end
Loc ["STRING_RIGHT"] = "right"
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_INSTANCE_LIMIT"] = "max instance number has been reached, you can modify this limit over options panel."
@@ -55,6 +56,7 @@ if not Loc then return end
Loc ["STRING_SEGMENT_END"] = "End"
Loc ["STRING_SEGMENT_ENEMY"] = "Enemy"
Loc ["STRING_SEGMENT_TIME"] = "Time"
Loc ["STRING_SEGMENT_OVERALL"] = "Current Segments Overall"
Loc ["STRING_TOTAL"] = "Total"
Loc ["STRING_OVERALL"] = "Overall"
Loc ["STRING_CURRENT"] = "Current"
@@ -205,6 +207,7 @@ if not Loc then return end
Loc ["STRING_PLUGIN_PDPSNAME"] = "Raid Dps"
Loc ["STRING_PLUGIN_THREATNAME"] = "My Threat"
Loc ["STRING_PLUGIN_PATTRIBUTENAME"] = "Attribute"
Loc ["STRING_PLUGIN_CLEAN"] = "None"
Loc ["STRING_PLUGINOPTIONS_COMMA"] = "Comma"
Loc ["STRING_PLUGINOPTIONS_ABBREVIATE"] = "Abbreviate"
@@ -244,6 +247,7 @@ if not Loc then return end
--> report frame
Loc ["STRING_REPORTFRAME_PARTY"] = "Party"
--Loc ["STRING_REPORTFRAME_INSTANCE"] = "Instance"
Loc ["STRING_REPORTFRAME_RAID"] = "Raid"
Loc ["STRING_REPORTFRAME_GUILD"] = "Guild"
Loc ["STRING_REPORTFRAME_OFFICERS"] = "Officer Channel"
+3
View File
@@ -14,6 +14,7 @@ if not Loc then return end
Loc ["STRING_RIGHT"] = "direita"
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_INSTANCE_LIMIT"] = "o limite de instancias foi atingido, voce pode modificar este limite no painel de opcoes."
@@ -55,6 +56,7 @@ if not Loc then return end
Loc ["STRING_SEGMENT_END"] = "Fim"
Loc ["STRING_SEGMENT_ENEMY"] = "Contra"
Loc ["STRING_SEGMENT_TIME"] = "Tempo"
Loc ["STRING_SEGMENT_OVERALL"] = "Total dos Segmentos Atuais"
Loc ["STRING_TOTAL"] = "Total"
Loc ["STRING_OVERALL"] = "Dados Gerais"
Loc ["STRING_CURRENT"] = "Atual"
@@ -203,6 +205,7 @@ if not Loc then return end
Loc ["STRING_PLUGIN_PDPSNAME"] = "Dps da Raide"
Loc ["STRING_PLUGIN_THREATNAME"] = "Minha Ameaça"
Loc ["STRING_PLUGIN_PATTRIBUTENAME"] = "Atributo"
Loc ["STRING_PLUGIN_CLEAN"] = "Nenhum"
Loc ["STRING_PLUGINOPTIONS_COMMA"] = "Virgula"
Loc ["STRING_PLUGINOPTIONS_ABBREVIATE"] = "Abreviar"
+1 -1
View File
@@ -272,7 +272,7 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
end
end
print ("DPSMAX: " .. dps_max .. " > " .. g.max_damage)
--print ("DPSMAX: " .. dps_max .. " > " .. g.max_damage)
if (dps_max > g.max_damage) then
@@ -88,12 +88,17 @@ local siege_of_orgrimmar = {
spell_mechanics = {
[143295] = {0x1, 0x2000}, --> Sha Bolt
[143309] = {0x8, 0x40}, --> Swirl
[143413] = {0x8, 0x40}, --> Swirl
[143436] = {0x100}, --> Corrosive Blast
[143281] = {0x8}, --> Seeping Sha
[143574] = {0x200}, --> Swelling Corruption
[143498] = {0x1, 0x200, 0x2}, --> Erupting Sha
[143460] = {0x200}, --> Sha Pool
[143460] = {0x200}, --> Sha Pool
[143286] = {0x40}, --> Seeping Sha
[143297] = {0x200}, --> Sha Splash
[145377] = {0x1}, --> Erupting Water
[143574] = {0x200}, --> Swelling Corruption (H)
[143460] = {0x200} -->
},
phases = {
@@ -102,9 +107,13 @@ local siege_of_orgrimmar = {
spells = {
143295, --> Sha Bolt
143309, --> Swirl
143413, --> Swirl
143436, --> Corrosive Blast
143281, --> Seeping Sha
143574, --> Swelling Corruption
143297, --> Sha Splash
145377, --> Erupting Water
143574 --> Swelling Corruption (H)
},
adds = {
@@ -120,6 +129,9 @@ local siege_of_orgrimmar = {
143498, --> Erupting Sha
143460, --> Sha Pool
143286, --> Seeping Sha
143297, --> Sha Splash
145377, --> Erupting Wate
143460 --> Sha Pool (H)
},
adds = {
@@ -141,9 +153,11 @@ local siege_of_orgrimmar = {
[144397] = {0x8000, 0x1}, --> Vengeful Strikes (Rook Stonetoe)
[143023] = {0x8}, --> Corrupted Brew (Rook Stonetoe)
[143028] = {0x1}, --> Clash (Rook Stonetoe)
[143010] = {0x80}, --> Corruption Kick (Rook Stonetoe)
[143009] = {0x80}, --> Corruption Kick (Rook Stonetoe)
[144357] = {0x8, 0x1}, --> Defiled Ground (Embodied Misery)
[101000] = {0x10000}, --> Inferno Strike (Embodied Sorrow)
[143961] = {0x8, 0x1}, --> Defiled Ground (Embodied Misery)
[143962] = {0x10000}, --> Inferno Strike (Embodied Sorrow)
[144018] = {0x20, 0x1}, --> Corruption Shock (Embodied Gloom)
[143198] = {0x1}, --> Garrote (He Softfoot)
@@ -151,21 +165,28 @@ local siege_of_orgrimmar = {
[144367] = {0x8}, --> Noxious Poison (He Softfoot)
[143224] = {0x1, 0x800}, --> Instant Poison (He Softfoot)
[143808] = {0x1, 0x2}, --> Mark of Anguish (Embodied Anguish)
[144365] = {0x1, 0x2}, --> Mark of Anguish (Embodied Anguish)
[143424] = {0x2000}, --> Sha Sear (Sun Tenderheart)
[143434] = {0x1, 0x10}, --> Shadow Word: Bane (Sun Tenderheart)
[143544] = {0x1}, --> Calamity (Sun Tenderheart)
[143544] = {0x1}, --> Calamity (Sun Tenderheart) --ptr
[143493] = {0x1}, --> Calamity (Sun Tenderheart) --live
[143559] = {0x1, 0x40}, --> Dark Meditation
[144007] = {}, --Residual Burn
[145631] = {}, --Corruption Chain
[143602] = {}, --Meditation Spike
},
continuo = {
144397, --> Vengeful Strikes (Rook Stonetoe)
143023, --> Corrupted Brew (Rook Stonetoe)
143028, --> Clash (Rook Stonetoe)
143009, --> Corruption Kick (Rook Stonetoe)
144357, --> Defiled Ground (Embodied Misery)
101000, --> Inferno Strike (Embodied Sorrow)
143962, --> Inferno Strike (Embodied Sorrow)
144018, --> Corruption Shock (Embodied Gloom)
143198, --> Garrote (He Softfoot)
@@ -178,6 +199,15 @@ local siege_of_orgrimmar = {
143434, --> Shadow Word: Bane (Sun Tenderheart)
143544, --> Calamity (Sun Tenderheart)
143559, --> Dark Meditation
143010, --> Corruption Kick (Rook Stonetoe)
143493, --> Calamity (Sun Tenderheart) --live
144365, --> Mark of Anguish (Embodied Anguish)
143961, --> Defiled Ground (Embodied Misery)
144007, --Residual Burn
145631, --Corruption Chain
143602, --Meditation Spike
},
phases = {
@@ -199,7 +229,8 @@ local siege_of_orgrimmar = {
71474, --> Embodied Despair (Sun Tenderheart)
71482, --> Embodied Desperation (Sun Tenderheart)
71993, --> Despair Spawns (Sun Tenderheart)
71712, --> Despair Spawns (Sun Tenderheart)
71993, --> Desperation Spawn
}
}
}
@@ -212,6 +243,8 @@ local siege_of_orgrimmar = {
boss = "Norushen",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Norushen]],
combat_end = {1, 72276},
spell_mechanics = {
[146707] = {0x1}, --> Disheartening Laugh
[144514] = {0x10}, --> Lingering Corruption
@@ -223,12 +256,14 @@ local siege_of_orgrimmar = {
[145212] = {0x1}, --> Unleashed Anger
[146124] = {0x100}, --> Self Doubt (not a damage)
[145733] = {0x1}, --> Icy Fear
[145733] = {0x1}, --> Icy Fear -ptr
[145735] = {0x1}, --> Icy Fear -live
[145227] = {0x8, 0x40}, --> Blind Hatred
[147082] = {0x1, 0x2}, --> Burst of Anger
[145073] = {0x200, 0x8}, --> Residual Corruption
[144548] = {0x200}, --> Expel Corruption
[145134] = {0x200}, --> Expel Corruption -live
},
continuo = {
@@ -243,11 +278,13 @@ local siege_of_orgrimmar = {
145212, --> Unleashed Anger
146124, --> Self Doubt
145733, --> Icy Fear
145735, --> Icy Fear -live
145227, --> Blind Hatred
147082, --> Burst of Anger
145073, --> Residual Corruption
144548, --> Expel Corruption
145134, --> Expel Corruption
},
phases = {
@@ -274,16 +311,28 @@ local siege_of_orgrimmar = {
boss = "Sha of Pride",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Sha of Pride]],
combat_end = {1, 71734},
spell_mechanics = {
[144400] = {0x1}, --> Swelling Pride
[144774] = {0x40}, --> Reaching Attack
[144358] = {0x100}, --> Wounded Pride (not a damage)
[144351] = {0x10}, --> Mark of Arrogance
[144351] = {0x10, 0x200}, --> Mark of Arrogance
[144911] = {0x8}, --> Bursting Pride
[145320] = {0x200}, --> Projection
[146818] = {0x2000}, --> Aura of Pride
[144379] = {0x20}, --> Mocking Blast
[144832] = {0x1, 0x2}, --> Unleashed
[144836] = {0x1, 0x2}, --> Unleashed
[144788] = {0x200}, --> Self-Reflection
[144636] = {0x1, 0x200}, --> Corrupted Prison
[144684] = {0x1, 0x200}, --> Corrupted Prison
[144574] = {0x1, 0x200}, --> Corrupted Prison
[144683] = {0x1, 0x200}, --> Corrupted Prison
[144774] = {0x40}, --> Reaching Attack
[145215] = {}, --Banishment
[147198] = {}, --Unstable Corruption
},
continuo = {
@@ -296,6 +345,16 @@ local siege_of_orgrimmar = {
146818, --> Aura of Pride
144379, --> Mocking Blast
144832, --> Unleashed
144836, --> Unleashed
144788, --> Self-Reflection
144636, --> Corrupted Prison
144684, --> Corrupted Prison
144574, --> Corrupted Prison
144683, --> Corrupted Prison
144774, --> Reaching Attack
145215, --Banishment
147198, --Unstable Corruption
},
phases = {
@@ -314,6 +373,8 @@ local siege_of_orgrimmar = {
boss = "Galakras",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Galakras]],
combat_end = {1, 72249},
spell_mechanics = {
[146902] = {0x1, 0x100}, -- Poison-Tipped Blades (Korgra the Snake)
[147705] = {0x8}, -- Poison Cloud (Korgra the Snake)
@@ -328,7 +389,8 @@ local siege_of_orgrimmar = {
[147824] = {0x40}, -- Muzzle Spray (Master Cannoneer Dagryn)
[146899] = {0x200}, -- Fracture (Dragonmaw Bonecrushers)
[146897] = {0x1}, -- Shattering Roare (Dragonmaw Bonecrushers)
[146897] = {0x1}, -- Shattering Roar (Dragonmaw Bonecrushers)
[147204] = {0x1}, -- Shattering Roar (Dragonmaw Bonecrushers)
[146728] = {0x20}, -- Chain Heal (Dragonmaw Tidal Shamans)
[149188] = {0x40}, -- Tidal Wwave (Dragonmaw Tidal Shamans)
[149187] = {0x40}, -- Tidal Wave (Dragonmaw Tidal Shamans)
@@ -340,11 +402,13 @@ local siege_of_orgrimmar = {
[146747] = {0x1}, -- Dragonmaw Strike (Dragonmaw Grunts)
[147669] = {0x1}, -- Throw Axe (Dragonmaw Grunts)
[148352] = {0x200}, -- DrakeFire (Dragonmaw Proto-Drakes)
[148560] = {0x200}, -- DrakeFire (Dragonmaw Proto-Drakes)
-- missing spells from Dragonmaw Wind Reavers
[146776] = {0x40}, -- Flame Breath (Dragonmaw Proto-Drakes)
[148311] = {0x40}, -- Bombard (Kor'kron Demolishers)
[148310] = {0x40}, -- Bombard (Kor'kron Demolishers)
[147029] = {0x200}, -- Flames of Galakrond
[146992] = {0x200}, -- Flames of Galakrond
[147043] = {0x2}, -- Pulsing Flames
},
@@ -384,9 +448,10 @@ local siege_of_orgrimmar = {
146848, --Skull Cracker (High Enforcer Thranok)
146773, --Shoot (Master Cannoneer Dagryn)
147824, --Muzzle Spray (Master Cannoneer Dagryn)
148560, -- DrakeFire (Dragonmaw Proto-Drakes)
146899, --Fracture (Dragonmaw Bonecrushers)
146897, --Shattering Roare (Dragonmaw Bonecrushers)
146897, --Shattering Roar (Dragonmaw Bonecrushers)
147204, -- Shattering Roar (Dragonmaw Bonecrushers)
146728, --Chain Heal (Dragonmaw Tidal Shamans)
149188, --Tidal Wwave (Dragonmaw Tidal Shamans)
149187, --Tidal Wave (Dragonmaw Tidal Shamans)
@@ -411,6 +476,7 @@ local siege_of_orgrimmar = {
},
spells = {
147029, --Flames of Galakrond
146992, --Flames of Galakrond
147043, --Pulsing Flames
}
}
@@ -424,14 +490,19 @@ local siege_of_orgrimmar = {
spell_mechanics = {
[144464] = {0x100}, --> Flame Vents
[144467] = {0x100, 0x1}, --> Ignite Armor
[144791] = {0x1, 0x200, 0x40}, --> Engulfed Explosion
[144218] = {0x40}, --> Borer Drill
[144459] = {0x1}, --> Laser Burn
--[144439] = {}, -->Ricochet
[144483] = {0x1}, --> Seismic Activity
[144484] = {0x1}, --> Seismic Activity
[144485] = {0x1, 0x40}, --> Shock Pulse
[144154] = {0x2000}, --> Demolisher Cannons
[144316] = {0x2000}, --> Mortar Blast
[144918] = {0x40, 0x80}, --> Cutter Laser
[144498] = {0x8, 0x200} --> Explosive Tar
[144498] = {0x8, 0x200}, --> Explosive Tar
[144327] = {}, --> Ricochet
},
continuo = {
@@ -449,6 +520,10 @@ local siege_of_orgrimmar = {
144459, --> Laser Burn
--> Mortar Cannon
--144439 --> Ricochet
144467, --> Ignite Armor
144316, --> Mortar Blast
144791, --> Engulfed Explosion
144327, --> Ricochet
}
},
{ --> phase 2: Breaking the Defense: Siege Mode:
@@ -457,6 +532,7 @@ local siege_of_orgrimmar = {
},
spells = {
144483, --> Seismic Activity
144484, --> Seismic Activity
144485, --> Shock Pulse
144154, --> Demolisher Cannons
144918, --> Cutter Laser
@@ -483,10 +559,20 @@ local siege_of_orgrimmar = {
[144214] = {0x1}, --Froststorm Bolt
[144005] = {0x8}, --Toxic Storm 90%
[144017] = {0x8}, --Toxic Storm 90%
[144030] = {0x40}, -- Toxic Tornado
[143990] = {0x80, 0x40}, --Foul Geyser 80%
[143993] = {0x80, 0x40}, --Foul Geyser 80%
[143973] = {0x8}, --Falling Ash 70%
[143987] = {0x8}, --Falling Ash 70%
[144064] = {0x40} --Foulness
[144064] = {0x40}, --Foulness
[144066] = {0x40}, --Foulness
[144328] = {}, --> Iron Tomb
[144334] = {}, --> Iron Tomb
[144330] = {}, --> Iron Prison
[144331] = {}, --> Iron Prison
},
continuo = {
@@ -500,9 +586,18 @@ local siege_of_orgrimmar = {
144214, --Froststorm Bolt
144005, --Toxic Storm
144017, --Toxic Storm
144030, --Toxic Tornado
143990, --Foul Geyser
143993, --Foul Geyser
143973, --Falling Ash
144064 --Foulness
143987, --Falling Ash
144064, --Foulness
144066, --Foulness
144328, --> Iron Tomb
144334, --> Iron Tomb
144330, --> Iron Prison
144331, --> Iron Prison
},
phases = {
@@ -538,6 +633,7 @@ local siege_of_orgrimmar = {
[143872] = {0x80, 0x40}, --Ravager
[143420] = {0x80, 0x40}, --Ironstorm (Kor'kron Ironblades)
[143421] = {0x80, 0x40}, --Ironstorm (Kor'kron Ironblades)
[143481] = {0x200, 0x1000}, --Backstab (Kor'kron Assassins)
[143432] = {0x20, 0x1}, --Arcane Shock (Kor'kron Arcweavers)
[143431] = {0x20, 0x1}, --Magistrike (Kor'kron Arcweavers)
@@ -552,10 +648,11 @@ local siege_of_orgrimmar = {
143872, --Ravager
143420, --Ironstorm (Kor'kron Ironblades)
143421, --Ironstorm (Kor'kron Ironblades)
143481, --Backstab (Kor'kron Assassins)
143432, --Arcane Shock (Kor'kron Arcweavers)
143431, --Magistrike (Kor'kron Arcweavers)
},
phases = {
@@ -585,13 +682,17 @@ local siege_of_orgrimmar = {
spell_mechanics = {
[142861] = {0x200}, --Ancient Miasma
[142906] = {0x200}, --Ancient Miasma
[142990] = {0x100}, --Fatal Strike
[142851] = {0x2000}, --Seismic Slam
[142849] = {0x2000}, --Seismic Slam
[142826] = {0x40}, --Arcing Smash
[142815] = {0x40}, --Arcing Smash
[142816] = {0x40}, --Breath of Y'Shaarj
[142987] = {0x200, 0x1}, --Imploding Energy
[142986] = {0x200, 0x1}, --Imploding Energy
[142879] = {0x10000}, --Blood Rage
[142890] = {0x10000}, --Blood Rage
[142913] = {0x80}, --Displaced Energy
},
@@ -606,11 +707,15 @@ local siege_of_orgrimmar = {
},
spells = {
142861, --Ancient Miasma
142906, --Ancient Miasma
142990, --Fatal Strike
142851, --Seismic Slam
142849, --Seismic Slam
142826, --Arcing Smash
142815, --Arcing Smash
142816, --Breath of Y'Shaarj
142987 --Imploding Energy
142987, --Imploding Energy
142986 --Imploding Energy
}
},
{ --> phase 2: Blood Rage
@@ -619,6 +724,7 @@ local siege_of_orgrimmar = {
},
spells = {
142879, --Blood Rage
142890, --Blood Rage
142913 --Displaced Energy
}
},
@@ -637,22 +743,30 @@ local siege_of_orgrimmar = {
[144923] = {0x20}, --Earthen Shard (Animated Stone Mogu)
[142775] = {0x40}, --Nova (Sparks of Life)
[142765] = {0x40}, --Pulse (Sparks of Life)
[142759] = {0x40}, --Pulse (Sparks of Life)
[144853] = {0x1}, --Carnivorous Bite (Quilen Guardians)
--Stout Crates -> Mogu Crates
[145393] = {0x200}, --Matter Scramble (Modified Anima Golems)
--[145271] = {}, --Crimson Reconstitution (Modified Anima Golems)
[142942] = {0x200, 0x10}, --Torment (Mogu Shadow Ritualists)
[142983] = {0x200, 0x10}, --Torment (Mogu Shadow Ritualists)
[145240] = {0x20}, --Forbidden Magic (Mogu Shadow Ritualists)
--[145460] = {}, --Mogu Rune of Power (Mogu Shadow Ritualists)
--Massive Crates -> Mogu Crates
[145489] = {0x1}, --Return to Stone
[145514] = {0x1}, --Return to Stone
[148515] = {0x40}, --Shadow Volley (Jun-Wei)
[148516] = {0x40}, --Shadow Volley (Jun-Wei)
[148517] = {0x40}, --Molten Fist (Zu-Yin)
[148518] = {0x40}, --Molten Fist (Zu-Yin)
[148582] = {0x40}, --Jade Tempest (Xiang-Lin)
[148583] = {0x40}, --Jade Tempest (Xiang-Lin)
[148513] = {0x40}, --Fracture (Kun-Da)
[148514] = {0x40}, --Fracture (Kun-Da)
--Lightweight Crates -> Mantid Crates
[145718] = {0x8}, -- Gusting Bomb (Sri'thik Bombardiers)
[145716] = {0x8}, -- Gusting Bomb (Sri'thik Bombardiers)
[145706] = {0x1, 0x2000}, --Throw Explosives (Sri'thik Bombardiers)
[145748] = {0x8}, -- Encapsulated Pheromones (Sri'thik Bombardiers)
--[145692] = {}, -- Enrage (Kor'thik Warcallerss)
@@ -663,7 +777,7 @@ local siege_of_orgrimmar = {
--[145812] = {}, --Rage of the Empress (Set'thik Wind Wielders)
--Massive Crates -> Mantid Crates
[148760] = {0x1}, --Pheromone Cloud (Pheromone Cloud)
[145993] = {}, --Set to Blow (Ka'thik Demolisher)
[145993] = {0x200}, --Set to Blow (Ka'thik Demolisher)
[142997] = {0x200}, --Set to Blow (Ka'thik Demolisher)
[145987] = {0x200}, --Set to Blow (Ka'thik Demolisher)
[145996] = {0x200}, --Set to Blow (Ka'thik Demolisher)
@@ -674,10 +788,13 @@ local siege_of_orgrimmar = {
[148056] = {0x200}, --Set to Blow (Ka'thik Demolisher)
--Pandaren Crates
[146217] = {0x2000}, --(Ancient Brewmaster Spirits)
[146222] = {0x40}, --(Ancient Brewmaster Spirits)
[146217] = {0x2000}, -- Keg Toss (Ancient Brewmaster Spirits)
[146222] = {0x40}, --Breath of Fire (Ancient Brewmaster Spirits)
[146226] = {0x40}, --Breath of Fire (Ancient Brewmaster Spirits)
[146230] = {0x40}, --Breath of Fire (Ancient Brewmaster Spirits)
--[146081] = {}, --(Ancient Brewmaster Spirits)
[146180] = {0x40, 0x1}, --Gusting Crane Kick (Wise Mistweaver Spirits)
[146182] = {0x40, 0x1}, --Gusting Crane Kick (Wise Mistweaver Spirits)
--[146189] = {}, Eminence --(Wise Mistweaver Spirits)
--[146679] = {}, --(Wise Mistweaver Spirits)
[146257] = {0x8, 0x2000}, --(Nameless Windwalker Spirits)
@@ -727,22 +844,31 @@ local siege_of_orgrimmar = {
144923, --Earthen Shard (Animated Stone Mogu)
142775, --Nova (Sparks of Life)
142765, --Pulse (Sparks of Life)
142759, --Pulse (Sparks of Life)
144853, --Carnivorous Bite (Quilen Guardians)
--Stout Crates -> Mogu Crates
145393, --Matter Scramble (Modified Anima Golems)
145271, --Crimson Reconstitution (Modified Anima Golems)
142942, --Torment (Mogu Shadow Ritualists)
142983, --Torment (Mogu Shadow Ritualists)
146885, --Torment (Mogu Shadow Ritualists)
145240, --Forbidden Magic (Mogu Shadow Ritualists)
145460, --Mogu Rune of Power (Mogu Shadow Ritualists)
--Massive Crates -> Mogu Crates
145514, --Return to Stone
145489, --Return to Stone
148515, --Shadow Volley (Jun-Wei)
148516, --Shadow Volley (Jun-Wei)
148517, --Molten Fist (Zu-Yin)
148518, --Molten Fist (Zu-Yin)
148582, --Jade Tempest (Xiang-Lin)
148583, --Jade Tempest (Xiang-Lin)
148513, --Fracture (Kun-Da)
148514, --Fracture (Kun-Da)
--Lightweight Crates ->
145718, -- Gusting Bomb (Sri'thik Bombardiers)
145716, -- Gusting Bomb (Sri'thik Bombardiers)
145706, --Throw Explosives (Sri'thik Bombardiers)
145748, -- Encapsulated Pheromones (Sri'thik Bombardiers)
145692, -- Enrage (Kor'thik Warcallerss)
@@ -765,37 +891,22 @@ local siege_of_orgrimmar = {
--Pandaren Crates
146217, --(Ancient Brewmaster Spirits)
146222, --(Ancient Brewmaster Spirits)
146222, --Breath of Fire(Ancient Brewmaster Spirits)
146226, --Breath of Fire(Ancient Brewmaster Spirits)
146230, --Breath of Fire(Ancient Brewmaster Spirits)
146081, --(Ancient Brewmaster Spirits)
146180, --(Wise Mistweaver Spirits)
146189, --(Wise Mistweaver Spirits)
146679, --(Wise Mistweaver Spirits)
146257, --(Nameless Windwalker Spirits)
146142 --(Nameless Windwalker Spirits)
146257, --Path of Blossoms (Nameless Windwalker Spirits)
146142, --(Nameless Windwalker Spirits)
146182, --Gusting Crane Kick (Wise Mistweaver Spirits)
}
}
},
}, --> end of Spoils of Pandaria
--[[
[0x1] = "|cFF00FF00"..Loc ["STRING_HEAL"].."|r",
[0x2] = "|cFF710000"..Loc ["STRING_LOWDPS"].."|r",
[0x4] = "|cFF057100"..Loc ["STRING_LOWHEAL"].."|r",
[0x8] = "|cFFd3acff"..Loc ["STRING_VOIDZONE"].."|r",
[0x10] = "|cFFbce3ff"..Loc ["STRING_DISPELL"].."|r",
[0x20] = "|cFFffdc72"..Loc ["STRING_INTERRUPT"].."|r",
[0x40] = "|cFFd9b77c"..Loc ["STRING_POSITIONING"].."|r",
[0x80] = "|cFFd7ff36"..Loc ["STRING_RUNAWAY"].."|r",
[0x100] = "|cFF9a7540"..Loc ["STRING_TANKSWITCH"] .."|r",
[0x200] = "|cFFff7800"..Loc ["STRING_MECHANIC"].."|r",
[0x400] = "|cFFbebebe"..Loc ["STRING_CROWDCONTROL"].."|r",
[0x800] = "|cFF6e4d13"..Loc ["STRING_TANKCOOLDOWN"].."|r",
[0x1000] = "|cFFffff00"..Loc ["STRING_KILLADD"].."|r",
[0x2000] = "|cFFff9999"..Loc ["STRING_SPREADOUT"].."|r",
[0x4000] = "|cFFffff99"..Loc ["STRING_STOPCAST"].."|r",
[0x8000] = "|cFFffff99"..Loc ["STRING_FACING"].."|r",
[0x10000] = "|cFFffff99"..Loc ["STRING_STACK"].."|r",
--]]
------------> Thok the Bloodthirsty ------------------------------------------------------------------------------
[11] = {
boss = "Thok the Bloodthirsty",
@@ -868,10 +979,18 @@ local siege_of_orgrimmar = {
--[144213] = {}, --Automatic Repair Beam
[144210] = {0x40, 0x8}, --Death From Above
[145444] = {0x1}, --Overload
[144664] = {0x8, 0x40}, --Shockwave Missile (Missile Turrets)
[144663] = {0x8, 0x40}, --Shockwave Missile (Missile Turrets)
[144662] = {0x8, 0x40}, --Shockwave Missile (Missile Turrets)
[144661] = {0x8, 0x40}, --Shockwave Missile (Missile Turrets)
[144660] = {0x8, 0x40}, --Shockwave Missile (Missile Turrets)
[143641] = {0x8, 0x40}, --Shockwave Missile (Missile Turrets)
[143856] = {0x40, 0x8}, --Superheated (Laser Turrets)
[144466] = {0x1, 0x200}, --Magnetic Crush (Electromagnets)
[149146] = {0x80}, --Detonate! (Crawler Mines)
[143327] = {0x40}, --Serrated Slash
},
continuo = {
@@ -901,10 +1020,16 @@ local siege_of_orgrimmar = {
144213, --Automatic Repair Beam
144210, --Death From Above
145444, --Overload
144664, --Shockwave Missile (Missile Turrets)
143856, --Superheated (Laser Turrets)
144466, --Magnetic Crush (Electromagnets)
149146 --Detonate! (Crawler Mines)
149146, --Detonate! (Crawler Mines)
143327, --Serrated Slash
144664, --Shockwave Missile (Missile Turrets)
144663, --Shockwave Missile (Missile Turrets)
144662, --Shockwave Missile (Missile Turrets)
144661, --Shockwave Missile (Missile Turrets)
144660, --Shockwave Missile (Missile Turrets)
143641, --Shockwave Missile (Missile Turrets)
}
}
@@ -918,18 +1043,183 @@ local siege_of_orgrimmar = {
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Klaxxi Paragons]],
spell_mechanics = {
--Kil'ruk the Wind-Reaver
[142931] = {}, --Exposed Veins
[143939] = {}, --Gouge
[143941] = {}, --Mutilate
[142232] = {}, --Death from Above
[142270] = {}, --Reave
[142922] = {}, --Razor Sharp Blades
[142930] = {}, --Razor Sharp Blades
--Xaril the Poisoned Mind
[142929] = {}, --Tenderizing Strikes
[142315] = {}, --Caustic Blood
[142317] = {}, --Bloody Explosion
[142528] = {}, --Toxic Injection
[148656] = {}, --Vast Apothecarial Knowledge
[142877] = {}, --Volatile Poultice
[143735] = {}, --Caustic Amber
[142797] = {}, --Noxious Vapors
--Kaz'tik the Manipulator
[142667] = {}, --Thick Shell
[115268] = {}, --Mesmerize
[142649] = {}, --Devour
[142270] = {}, --Reave
[142651] = {}, --Molt
[144275] = {}, --Swipe
[142655] = {}, --Swipe
[143768] = {}, --Sonic Projection
--Korven the Prime
[142564] = {}, --Encase in Amber
[143974] = {}, --Shield Bash
[143979] = {}, --Vicious Assault
[143980] = {}, --Vicious Assault
[143981] = {}, --Vicious Assault
[143982] = {}, --Vicious Assault
[143984] = {}, --Vicious Assault
[143985] = {}, --Vicious Assault
[148649] = {}, --Master of Amber
--Iyyokuk the Lucid
[143666] = {}, --Diminish
[142514] = {}, --Calculate
[142416] = {}, --Insane Calculation: Fiery Edge
[142809] = {}, --Fiery Edgeficious Assault
[142735] = {}, --Reaction: Blue
[142736] = {}, --Reaction: Red
[141858] = {}, --Ingenious
--Ka'roz the Locust
[143701] = {}, --Whirling
[143702] = {}, --Whirling
[143733] = {}, --Hurl Amber
[148650] = {}, --Strong Legs
[142564] = {}, --Encase in Amber
--Skeer the Bloodseeker
[143274] = {}, --Hewn
[143275] = {}, --Hewn
[143280] = {}, --Bloodletting
[148655] = {}, --Bloodthirsty
--Rik'kal the Dissector
[143278] = {}, --Genetic Alteration
[143279] = {}, --Genetic Alteration
[143339] = {}, --Injection
[144274] = {}, --Claw
[142655] = {}, --Swipe
[144276] = {}, --Sting
[143373] = {}, --Gene Splice
[143337] = {}, --Mutate
--Hisek the Swarmkeeper
[144839] = {}, --Multi-Shot
[142948] = {}, --Aim
},
continuo = {
--Kil'ruk the Wind-Reaver
142931, --Exposed Veins
143939, --Gouge
143941, --Mutilate
142232, --Death from Above
142270, --Reave
142922, --Razor Sharp Blades
142930, --Razor Sharp Blades
--Xaril the Poisoned Mind
142929, --Tenderizing Strikes
142315, --Caustic Blood
142317, --Bloody Explosion
142528, --Toxic Injection
148656, --Vast Apothecarial Knowledge
142877, --Volatile Poultice
143735, --Caustic Amber
142797, --Noxious Vapors
--Kaz'tik the Manipulator
142667, --Thick Shell
115268, --Mesmerize
142649, --Devour
142270, --Reave
142651, --Molt
144275, --Swipe
142655, --Swipe
143768, --Sonic Projection
--Korven the Prime
142564, --Encase in Amber
143974, --Shield Bash
143979, --Vicious Assault
143980, --Vicious Assault
143981, --Vicious Assault
143982, --Vicious Assault
143984, --Vicious Assault
143985, --Vicious Assault
148649, --Master of Amber
--Iyyokuk the Lucid
143666, --Diminish
142514, --Calculate
142416, --Insane Calculation: Fiery Edge
142809, --Fiery Edgeficious Assault
142735, --Reaction: Blue
142736, --Reaction: Red
141858, --Ingenious
--Ka'roz the Locust
143701, --Whirling
143702, --Whirling
143733, --Hurl Amber
148650, --Strong Legs
142564, --Encase in Amber
--Skeer the Bloodseeker
143274, --Hewn
143275, --Hewn
143280, --Bloodletting
148655, --Bloodthirsty
--Rik'kal the Dissector
143278, --Genetic Alteration
143279, --Genetic Alteration
143339, --Injection
144274, --Claw
142655, --Swipe
144276, --Sting
143373, --Gene Splice
143337, --Mutate
--Hisek the Swarmkeeper
144839, --Multi-Shot
142948, --Aim
},
phases = {
{ --> phase 1:
adds = {
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
71578, --Amber Parasites
71542, --Bloods
71420, --Hungry Kunchongs
71425, --Mature Kunchongs
},
spells = {
+10 -5
View File
@@ -30,8 +30,10 @@ function _G._detalhes:Start()
self.in_combat = false
self.combat_id = self.combat_id or 0
self.instances_amount = self.instances_amount or 12
self.segments_amount = self.segments_amount or 10
self.segments_amount_to_save = self.segments_amount_to_save or 2
self.segments_amount = self.segments_amount or 25
self.segments_amount_to_save = self.segments_amount_to_save or 5
self.memory_threshold = self.memory_threshold or 3
self.memory_ram = self.memory_ram or 64
self.deadlog_limit = self.deadlog_limit or 12
self.minimum_combat_time = self.minimum_combat_time or 5
@@ -219,8 +221,11 @@ function _G._detalhes:Start()
--> start garbage collector
self.ultima_coleta = 0
self.intervalo_coleta = 720
self.intervalo_memoria = 180
self.garbagecollect = self:ScheduleRepeatingTimer ("IniciarColetaDeLixo", self.intervalo_coleta)
self.memorycleanup = self:ScheduleRepeatingTimer ("CheckMemoryPeriodically", self.intervalo_memoria)
self.next_memory_check = time()+self.intervalo_memoria
--> start parser
--> load parser capture options
@@ -271,7 +276,7 @@ function _G._detalhes:Start()
self:SendEvent ("DETAILS_INSTANCE_OPEN", nil, instancia)
end
end
--> all done, send started signal and we are ready
function self:AnnounceStartup()
self:SendEvent ("DETAILS_STARTED", "SEND_TO_ALL")
@@ -304,5 +309,5 @@ function _G._detalhes:Start()
if (self.is_first_run) then
_detalhes:OpenWelcomeWindow()
end
end