- some fixes for last_events_table, shadow object no more have last_events.
- implemented cache for group mode. - class constructor now create new object at once, avoiding table rehashs. - fixed dps issue with cloud capture. - added a pet cache for parser. - minor parser speed up on parser removing metatables index call. - implemented new pet sync were at the end of combat, details will ask for unknow owners. - few new wallpapers. - new API: _detalhes:InstanceAlert (msg, icon, time, clickfunc). -
This commit is contained in:
@@ -35,6 +35,7 @@ framework\framework.lua
|
||||
framework\colors.lua
|
||||
framework\label.lua
|
||||
framework\slider.lua
|
||||
framework\itscroll.xml
|
||||
framework\picture.lua
|
||||
framework\help.lua
|
||||
framework\cooltip.xml
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> global name declaration
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0")
|
||||
_detalhes.userversion = "v1.1.3"
|
||||
_detalhes.version = "Alpha 002"
|
||||
_detalhes.realversion = 2
|
||||
_detalhes.userversion = "v1.1.8"
|
||||
_detalhes.version = "Alpha 003"
|
||||
_detalhes.realversion = 3
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> initialization stuff
|
||||
@@ -49,6 +49,9 @@ do
|
||||
_detalhes.ReportOptions = {}
|
||||
--> armazena os buffs registrados - store buffs ids and functions
|
||||
_detalhes.Buffs = {} --> initialize buff table
|
||||
--> cache de grupo
|
||||
_detalhes.cache_damage_group = {}
|
||||
_detalhes.cache_healing_group = {}
|
||||
|
||||
--> Plugins
|
||||
--> raid -------------------------------------------------------------------
|
||||
|
||||
@@ -58,9 +58,6 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
|
||||
|
||||
_setmetatable (esta_tabela, combate)
|
||||
|
||||
--> debug
|
||||
esta_tabela.meu_tipo = "classe_combate"
|
||||
|
||||
--> try discover if is a pvp combat
|
||||
local who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags = ...
|
||||
if (who_serial) then --> aqui irá identificar o boss ou o oponente
|
||||
@@ -170,14 +167,16 @@ end
|
||||
function combate:TravarTempos()
|
||||
--é necessário travar o tempo em todos os atributos do combate.
|
||||
for index, container in _ipairs (self) do -- aqui ele lista os tipos de atributo listado na lista acima
|
||||
if (index ~= 3 and index ~= 4) then --> 3 é e_energy, não possui tempo // 4 é misc tbm não possui tempo
|
||||
if (index < 3) then --> 3 é e_energy, não possui tempo // 4 é misc tbm não possui tempo
|
||||
for _, jogador in _ipairs (container._ActorTable) do
|
||||
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
|
||||
jogador:TerminarTempo()
|
||||
jogador:Iniciar (false) --trava o dps do jogador
|
||||
jogador.last_events_table = {} --> elimina a tabela dos danos --não é mais usado desta forma
|
||||
--jogador.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
end
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+91
-69
@@ -61,55 +61,49 @@ local keyName
|
||||
|
||||
function atributo_damage:NovaTabela (serial, nome, link)
|
||||
|
||||
local _new_damageActor = {}
|
||||
--> constructor
|
||||
local _new_damageActor = {
|
||||
|
||||
--> dps do objeto inicia sempre desligado
|
||||
tipo = class_type, --> atributo 1 = dano
|
||||
|
||||
total = 0,
|
||||
total_without_pet = 0,
|
||||
custom = 0,
|
||||
|
||||
damage_taken = 0, --> total de dano que este jogador levou
|
||||
damage_from = {}, --> armazena os nomes que deram dano neste jogador
|
||||
|
||||
avoidance = {["DODGE"] = 0, ["PARRY"] = 0, ["HITS"] = 0}, --> avoidance
|
||||
|
||||
dps_started = false,
|
||||
last_event = 0,
|
||||
on_hold = false,
|
||||
delay = 0,
|
||||
last_value = nil, --> ultimo valor que este jogador teve, salvo quando a barra dele é atualizada
|
||||
last_dps = 0,
|
||||
|
||||
end_time = nil,
|
||||
start_time = 0,
|
||||
|
||||
pets = {}, --> armazena os nomes dos pets já com a tag do dono: pet name <owner nome>
|
||||
|
||||
friendlyfire_total = 0,
|
||||
friendlyfire = container_combatentes:NovoContainer (container_friendlyfire),
|
||||
|
||||
--container armazenará os seriais dos alvos que o player aplicou dano
|
||||
targets = container_combatentes:NovoContainer (container_damage_target),
|
||||
|
||||
--container armazenará os IDs das habilidades usadas por este jogador
|
||||
spell_tables = container_habilidades:NovoContainer (container_damage)
|
||||
}
|
||||
|
||||
_setmetatable (_new_damageActor, atributo_damage)
|
||||
|
||||
_new_damageActor.quem_sou = "classe_damage" --> DEBUG deleta-me
|
||||
|
||||
--> grava o tempo que a tabela foi criada para o garbage collector interno
|
||||
_new_damageActor.CriadaEm = time()
|
||||
|
||||
--> dps do objeto inicia sempre desligado
|
||||
_new_damageActor.dps_started = false
|
||||
|
||||
_new_damageActor.tipo = class_type --> atributo 1 = dano
|
||||
|
||||
_new_damageActor.total = 0
|
||||
_new_damageActor.custom = 0
|
||||
_new_damageActor.total_without_pet = 0
|
||||
|
||||
_new_damageActor.damage_taken = 0 --> total de dano que este jogador levou
|
||||
_new_damageActor.damage_from = {} --> armazena os nomes que deram dano neste jogador
|
||||
|
||||
_new_damageActor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
_new_damageActor.last_events_table.original = true
|
||||
|
||||
_new_damageActor.avoidance = {["DODGE"] = 0, ["PARRY"] = 0, ["HITS"] = 0} --> avoidance
|
||||
|
||||
_new_damageActor.last_event = 0
|
||||
_new_damageActor.on_hold = false
|
||||
_new_damageActor.delay = 0
|
||||
|
||||
_new_damageActor.last_value = nil --> ultimo valor que este jogador teve, salvo quando a barra dele é atualizada
|
||||
|
||||
_new_damageActor.end_time = nil
|
||||
_new_damageActor.start_time = 0
|
||||
|
||||
_new_damageActor.last_dps = 0
|
||||
|
||||
_new_damageActor.pets = {}
|
||||
|
||||
--_new_damageActor.friendlyfire = {} --> será criado no primeiro fogo amigo dado
|
||||
_new_damageActor.friendlyfire_total = 0
|
||||
_new_damageActor.friendlyfire = container_combatentes:NovoContainer (container_friendlyfire)
|
||||
|
||||
--container armazenará os seriais dos alvos que o player aplicou dano
|
||||
_new_damageActor.targets = container_combatentes:NovoContainer (container_damage_target)
|
||||
|
||||
--container armazenará os IDs das habilidades usadas por este jogador
|
||||
_new_damageActor.spell_tables = container_habilidades:NovoContainer (container_damage)
|
||||
|
||||
if (link) then
|
||||
if (link) then --> se não for a shadow
|
||||
_new_damageActor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
_new_damageActor.last_events_table.original = true
|
||||
|
||||
_new_damageActor.targets.shadow = link.targets
|
||||
_new_damageActor.spell_tables.shadow = link.spell_tables
|
||||
_new_damageActor.friendlyfire.shadow = link.friendlyfire
|
||||
@@ -162,14 +156,14 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--[[ exported]] function _detalhes:IsPlayer()
|
||||
if (self.flags) then
|
||||
if (_bit_band (self.flag, 0x00000001) ~= 0) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
--[[ exported]] function _detalhes:IsPlayer()
|
||||
if (self.flags) then
|
||||
if (_bit_band (self.flag, 0x00000001) ~= 0) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, exportar)
|
||||
|
||||
@@ -186,6 +180,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
--> top actor #1
|
||||
instancia.top = 0
|
||||
|
||||
local using_cache = false
|
||||
|
||||
local sub_atributo = instancia.sub_atributo --> o que esta sendo mostrado nesta instância
|
||||
local conteudo = showing._ActorTable --> pega a lista de jogadores -- get actors table from container
|
||||
local amount = #conteudo
|
||||
@@ -245,7 +241,29 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
--> organiza as tabelas
|
||||
|
||||
_table_sort (conteudo, _detalhes.SortKeyGroup, keyName)
|
||||
if (_detalhes.in_combat) then
|
||||
using_cache = true
|
||||
end
|
||||
|
||||
if (using_cache) then
|
||||
conteudo = _detalhes.cache_damage_group
|
||||
|
||||
_table_sort (conteudo, _detalhes.SortKeySimple)
|
||||
|
||||
if (conteudo[1][keyName] < 1) then
|
||||
amount = 0
|
||||
else
|
||||
instancia.top = conteudo[1][keyName]
|
||||
amount = #conteudo
|
||||
end
|
||||
|
||||
for i = 1, amount do
|
||||
total = total + conteudo[i][keyName]
|
||||
end
|
||||
else
|
||||
_table_sort (conteudo, _detalhes.SortKeyGroup)
|
||||
end
|
||||
--
|
||||
|
||||
--[[
|
||||
_table_sort (conteudo, function (a, b)
|
||||
@@ -261,25 +279,29 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end)
|
||||
--]]
|
||||
|
||||
for index, player in _ipairs (conteudo) do
|
||||
if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo
|
||||
if (player[keyName] < 1) then --> dano menor que 1, interromper o loop
|
||||
amount = index - 1
|
||||
if (not using_cache) then
|
||||
for index, player in _ipairs (conteudo) do
|
||||
if (_bit_band (player.flag, DFLAG_player_group) >= 0x101) then --> é um player e esta em grupo
|
||||
if (player[keyName] < 1) then --> dano menor que 1, interromper o loop
|
||||
amount = index - 1
|
||||
break
|
||||
elseif (index == 1) then --> esse IF aqui, precisa mesmo ser aqui? não daria pra pega-lo com uma chave [1] nad grupo == true?
|
||||
instancia.top = conteudo[1][keyName]
|
||||
end
|
||||
|
||||
total = total + player[keyName]
|
||||
else
|
||||
amount = index-1
|
||||
break
|
||||
elseif (index == 1) then --> esse IF aqui, precisa mesmo ser aqui? não daria pra pega-lo com uma chave [1] nad grupo == true?
|
||||
instancia.top = conteudo[1][keyName]
|
||||
end
|
||||
|
||||
total = total + player[keyName]
|
||||
else
|
||||
amount = index-1
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> refaz o mapa do container
|
||||
showing:remapear()
|
||||
if (not using_cache) then
|
||||
showing:remapear()
|
||||
end
|
||||
|
||||
if (exportar) then
|
||||
return total, keyName, instancia.top
|
||||
@@ -424,7 +446,7 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
local porcentagem = self [keyName] / total * 100
|
||||
local esta_porcentagem
|
||||
|
||||
if (_detalhes.time_type == 2 and self.grupo) then
|
||||
if ((_detalhes.time_type == 2 and self.grupo) or not _detalhes:CaptureGet ("damage")) then
|
||||
dps = damage_total / combat_time
|
||||
self.last_dps = dps
|
||||
else
|
||||
|
||||
@@ -30,73 +30,66 @@ local _recording_ability_with_buffs = false
|
||||
|
||||
--id, nome, type, miss, dano, cura, overkill, school, resisted, blocked, absorbed, critico, glacing, crushing
|
||||
function habilidade_dano:NovaTabela (id, link, token) --aqui eu não sei que parâmetros passar
|
||||
local esta_tabela = {}
|
||||
_setmetatable (esta_tabela, habilidade_dano)
|
||||
|
||||
esta_tabela.quem_sou = "classe_damage_habilidade"
|
||||
local _newDamageSpell = {
|
||||
|
||||
-- esta_tabela.jogador = serial
|
||||
total = 0, --total de dano aplicado por esta habilidade
|
||||
counter = 0, --conta quantas vezes a habilidade foi chamada
|
||||
id = id,
|
||||
school = 0,
|
||||
|
||||
--> normal
|
||||
n_min = 0,
|
||||
n_max = 0,
|
||||
n_amt = 0,
|
||||
n_dmg = 0,
|
||||
|
||||
--> criticos
|
||||
c_min = 0,
|
||||
c_max = 0,
|
||||
c_amt = 0,
|
||||
c_dmg = 0,
|
||||
|
||||
esta_tabela.total = 0 --total de dano aplicado por esta habilidade
|
||||
esta_tabela.counter = 0 --conta quantas vezes a habilidade foi chamada
|
||||
esta_tabela.id = id
|
||||
esta_tabela.school = 0
|
||||
|
||||
--> normal hits
|
||||
--esta_tabela.normal = {["min"] = 0, ["max"] = 0, ["amt"] = 0, ["dmg"] = 0}
|
||||
|
||||
esta_tabela.n_min = 0
|
||||
esta_tabela.n_max = 0
|
||||
esta_tabela.n_amt = 0
|
||||
esta_tabela.n_dmg = 0
|
||||
|
||||
--> hits criticos
|
||||
--esta_tabela.critico = {["min"] = 0, ["max"] = 0, ["amt"] = 0, ["dmg"] = 0}
|
||||
esta_tabela.c_min = 0
|
||||
esta_tabela.c_max = 0
|
||||
esta_tabela.c_amt = 0
|
||||
esta_tabela.c_dmg = 0
|
||||
--> glacing
|
||||
g_min = 0, --not sure but, glancing min and max shouldn't be necessary
|
||||
g_max = 0, --
|
||||
g_amt = 0,
|
||||
g_dmg = 0,
|
||||
|
||||
--> resisted
|
||||
r_min = 0, --not sure but, resisted min and max shouldn't be necessary
|
||||
r_max = 0, --
|
||||
r_amt = 0,
|
||||
r_dmg = 0,
|
||||
|
||||
--> blocked
|
||||
b_min = 0, --not sure but, block min and max shouldn't be necessary
|
||||
b_max = 0, --
|
||||
b_amt = 0,
|
||||
b_dmg = 0,
|
||||
|
||||
--> hit glacing
|
||||
--esta_tabela.glacing = {["min"] = 0, ["max"] = 0, ["amt"] = 0, ["dmg"] = 0}
|
||||
esta_tabela.g_min = 0
|
||||
esta_tabela.g_max = 0
|
||||
esta_tabela.g_amt = 0
|
||||
esta_tabela.g_dmg = 0
|
||||
|
||||
--informações e detalhes gerais desta habilidade
|
||||
--> obsorved
|
||||
a_min = 0, --not sure but, absorbed min and max shouldn't be necessary
|
||||
a_max = 0, --
|
||||
a_amt = 0,
|
||||
a_dmg = 0,
|
||||
|
||||
crushing = 0, --> this still exists?
|
||||
|
||||
targets = container_combatentes:NovoContainer (container_damage_target)
|
||||
}
|
||||
|
||||
--esta_tabela.resisted = {["min"] = 0, ["max"] = 0, ["amt"] = 0, ["dmg"] = 0}
|
||||
esta_tabela.r_min = 0
|
||||
esta_tabela.r_max = 0
|
||||
esta_tabela.r_amt = 0
|
||||
esta_tabela.r_dmg = 0
|
||||
|
||||
--esta_tabela.blocked = {["min"] = 0, ["max"] = 0, ["amt"] = 0, ["dmg"] = 0}
|
||||
esta_tabela.b_min = 0
|
||||
esta_tabela.b_max = 0
|
||||
esta_tabela.b_amt = 0
|
||||
esta_tabela.b_dmg = 0
|
||||
|
||||
--esta_tabela.absorbed = {["min"] = 0, ["max"] = 0, ["amt"] = 0, ["dmg"] = 0}
|
||||
esta_tabela.a_min = 0
|
||||
esta_tabela.a_max = 0
|
||||
esta_tabela.a_amt = 0
|
||||
esta_tabela.a_dmg = 0
|
||||
|
||||
esta_tabela.crushing = 0 -- ??
|
||||
|
||||
esta_tabela.targets = container_combatentes:NovoContainer (container_damage_target)
|
||||
_setmetatable (_newDamageSpell, habilidade_dano)
|
||||
|
||||
if (link) then
|
||||
esta_tabela.targets.shadow = link.targets
|
||||
_newDamageSpell.targets.shadow = link.targets
|
||||
end
|
||||
|
||||
if (token == "SPELL_PERIODIC_DAMAGE") then
|
||||
_detalhes:SpellIsDot (id)
|
||||
end
|
||||
|
||||
return esta_tabela
|
||||
return _newDamageSpell
|
||||
end
|
||||
|
||||
|
||||
|
||||
+41
-42
@@ -61,56 +61,55 @@ local div_lugar = _detalhes.divisores.colocacao
|
||||
local info = _detalhes.janela_info
|
||||
local keyName
|
||||
|
||||
|
||||
function atributo_energy:NovaTabela (serial, nome, link)
|
||||
local esta_tabela = {}
|
||||
esta_tabela.quem_sou = "classe_energy" --> DEBUG deleta-me
|
||||
|
||||
--print ("CRIANDO NOVO OBJETO")
|
||||
|
||||
_setmetatable (esta_tabela, atributo_energy)
|
||||
|
||||
--> grava o tempo que a tabela foi criada para o garbage collector interno
|
||||
esta_tabela.CriadaEm = time()
|
||||
esta_tabela.last_event = 0
|
||||
esta_tabela.tipo = class_type --> atributo 3 = e_energy
|
||||
|
||||
esta_tabela.mana = 0
|
||||
esta_tabela.e_rage = 0
|
||||
esta_tabela.e_energy = 0
|
||||
esta_tabela.runepower = 0
|
||||
esta_tabela.focus = 0
|
||||
esta_tabela.holypower = 0
|
||||
|
||||
esta_tabela.mana_r = 0
|
||||
esta_tabela.e_rage_r = 0
|
||||
esta_tabela.e_energy_r = 0
|
||||
esta_tabela.runepower_r = 0
|
||||
esta_tabela.focus_r = 0
|
||||
esta_tabela.holypower_r = 0
|
||||
--> constructor
|
||||
local _new_energyActor = {
|
||||
|
||||
esta_tabela.mana_from = {}
|
||||
esta_tabela.e_rage_from = {}
|
||||
esta_tabela.e_energy_from = {}
|
||||
esta_tabela.runepower_from = {}
|
||||
esta_tabela.focus_from = {}
|
||||
esta_tabela.holypower_from = {}
|
||||
|
||||
esta_tabela.last_value = nil --> ultimo valor que este jogador teve, salvo quando a barra dele é atualizada
|
||||
last_event = 0,
|
||||
tipo = class_type, --> atributo 3 = e_energy
|
||||
|
||||
mana = 0,
|
||||
e_rage = 0,
|
||||
e_energy = 0,
|
||||
runepower = 0,
|
||||
focus = 0,
|
||||
holypower = 0,
|
||||
|
||||
esta_tabela.pets = {}
|
||||
|
||||
--container armazenará os seriais dos alvos que o player aplicou dano
|
||||
esta_tabela.targets = container_combatentes:NovoContainer (container_energy_target)
|
||||
|
||||
--container armazenará os IDs das habilidades usadas por este jogador
|
||||
esta_tabela.spell_tables = container_habilidades:NovoContainer (container_energy)
|
||||
mana_r = 0,
|
||||
e_rage_r = 0,
|
||||
e_energy_r = 0,
|
||||
runepower_r = 0,
|
||||
focus_r = 0,
|
||||
holypower_r = 0,
|
||||
|
||||
mana_from = {},
|
||||
e_rage_from = {},
|
||||
e_energy_from = {},
|
||||
runepower_from = {},
|
||||
focus_from = {},
|
||||
holypower_from = {},
|
||||
|
||||
last_value = nil, --> ultimo valor que este jogador teve, salvo quando a barra dele é atualizada
|
||||
|
||||
pets = {},
|
||||
|
||||
--container armazenará os seriais dos alvos que o player aplicou dano
|
||||
targets = container_combatentes:NovoContainer (container_energy_target),
|
||||
|
||||
--container armazenará os IDs das habilidades usadas por este jogador
|
||||
spell_tables = container_habilidades:NovoContainer (container_energy),
|
||||
}
|
||||
|
||||
_setmetatable (_new_energyActor, atributo_energy)
|
||||
|
||||
if (link) then
|
||||
esta_tabela.targets.shadow = link.targets
|
||||
esta_tabela.spell_tables.shadow = link.spell_tables
|
||||
_new_energyActor.targets.shadow = link.targets
|
||||
_new_energyActor.spell_tables.shadow = link.spell_tables
|
||||
end
|
||||
|
||||
return esta_tabela
|
||||
return _new_energyActor
|
||||
end
|
||||
|
||||
function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, exportar)
|
||||
|
||||
@@ -15,27 +15,28 @@ local _UnitAura = UnitAura
|
||||
|
||||
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
|
||||
|
||||
--id, nome, type, miss, dano, cura, overkill, school, resisted, blocked, absorbed, critico, glacing, crushing
|
||||
function habilidade_energy:NovaTabela (id, link, token) --aqui eu não sei que parâmetros passar
|
||||
local esta_tabela = {}
|
||||
_setmetatable (esta_tabela, habilidade_energy)
|
||||
function habilidade_energy:NovaTabela (id, link, token)
|
||||
|
||||
esta_tabela.quem_sou = "classe_energy_habilidade"
|
||||
esta_tabela.id = id
|
||||
esta_tabela.counter = 0
|
||||
local _newEnergySpell = {
|
||||
|
||||
id = id,
|
||||
counter = 0,
|
||||
|
||||
mana = 0,
|
||||
e_rage = 0,
|
||||
e_energy = 0,
|
||||
runepower = 0,
|
||||
|
||||
targets = container_combatentes:NovoContainer (container_energy_target)
|
||||
}
|
||||
|
||||
esta_tabela.mana = 0
|
||||
esta_tabela.e_rage = 0
|
||||
esta_tabela.e_energy = 0
|
||||
esta_tabela.runepower = 0
|
||||
|
||||
esta_tabela.targets = container_combatentes:NovoContainer (container_energy_target)
|
||||
_setmetatable (_newEnergySpell, habilidade_energy)
|
||||
|
||||
if (link) then
|
||||
esta_tabela.targets.shadow = link.targets
|
||||
_newEnergySpell.targets.shadow = link.targets
|
||||
end
|
||||
|
||||
return esta_tabela
|
||||
return _newEnergySpell
|
||||
end
|
||||
|
||||
function habilidade_energy:Add (serial, nome, flag, amount, who_nome, powertype)
|
||||
|
||||
+69
-56
@@ -59,60 +59,54 @@ local info = _detalhes.janela_info
|
||||
local keyName
|
||||
|
||||
function atributo_heal:NovaTabela (serial, nome, link)
|
||||
local esta_tabela = {}
|
||||
esta_tabela.quem_sou = "classe_heal" --> DEBUG deleta-me
|
||||
|
||||
_setmetatable (esta_tabela, atributo_heal)
|
||||
|
||||
--> grava o tempo que a tabela foi criada para o garbage collector interno
|
||||
esta_tabela.CriadaEm = time()
|
||||
|
||||
--> dps do objeto inicia sempre desligado
|
||||
esta_tabela.iniciar_hps = false --> sera necessario isso na cura?
|
||||
|
||||
esta_tabela.tipo = class_type --> atributo 2 = cura
|
||||
|
||||
esta_tabela.total = 0
|
||||
esta_tabela.totalover = 0
|
||||
esta_tabela.custom = 0
|
||||
|
||||
esta_tabela.total_without_pet = 0 --> pet de DK cura
|
||||
esta_tabela.totalover_without_pet = 0 --> pet de DK cura
|
||||
|
||||
esta_tabela.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
esta_tabela.last_events_table.original = true
|
||||
|
||||
esta_tabela.healing_taken = 0 --> total de cura que este jogador recebeu
|
||||
esta_tabela.healing_from = {} --> armazena os nomes que deram cura neste jogador
|
||||
|
||||
esta_tabela.last_event = 0 --> mantem igual ao dano
|
||||
esta_tabela.on_hold = false --> mantem igual ao dano
|
||||
esta_tabela.delay = 0 --> mantem igual ao dano
|
||||
|
||||
esta_tabela.last_value = nil --> ultimo valor que este jogador teve, salvo quando a barra dele é atualizada
|
||||
|
||||
esta_tabela.end_time = nil
|
||||
esta_tabela.start_time = 0
|
||||
|
||||
esta_tabela.last_hps = 0 --> cura por segundo
|
||||
esta_tabela.last_value = 0
|
||||
|
||||
esta_tabela.pets = {} --cura não tem pet, okey? tem pet sim, as larvas de DK
|
||||
|
||||
esta_tabela.heal_enemy = {} --> quando o jogador cura um inimigo
|
||||
--> constructor
|
||||
local _new_healActor = {
|
||||
|
||||
--container armazenará os IDs das habilidades usadas por este jogador
|
||||
esta_tabela.spell_tables = container_habilidades:NovoContainer (container_heal)
|
||||
|
||||
--container armazenará os seriais dos alvos que o player aplicou dano
|
||||
esta_tabela.targets = container_combatentes:NovoContainer (container_heal_target)
|
||||
tipo = class_type, --> atributo 2 = cura
|
||||
|
||||
total = 0,
|
||||
totalover = 0,
|
||||
custom = 0,
|
||||
|
||||
total_without_pet = 0,
|
||||
totalover_without_pet = 0,
|
||||
|
||||
healing_taken = 0, --> total de cura que este jogador recebeu
|
||||
healing_from = {}, --> armazena os nomes que deram cura neste jogador
|
||||
|
||||
if (link) then
|
||||
esta_tabela.targets.shadow = link.targets
|
||||
esta_tabela.spell_tables.shadow = link.spell_tables
|
||||
iniciar_hps = false, --> dps_started
|
||||
last_event = 0,
|
||||
on_hold = false,
|
||||
delay = 0,
|
||||
last_value = nil, --> ultimo valor que este jogador teve, salvo quando a barra dele é atualizada
|
||||
last_hps = 0, --> cura por segundo
|
||||
|
||||
end_time = nil,
|
||||
start_time = 0,
|
||||
|
||||
pets = {}, --> nome já formatado: pet nome <owner nome>
|
||||
|
||||
heal_enemy = {}, --> quando o jogador cura um inimigo
|
||||
|
||||
--container armazenará os IDs das habilidades usadas por este jogador
|
||||
spell_tables = container_habilidades:NovoContainer (container_heal),
|
||||
|
||||
--container armazenará os seriais dos alvos que o player aplicou dano
|
||||
targets = container_combatentes:NovoContainer (container_heal_target)
|
||||
}
|
||||
|
||||
_setmetatable (_new_healActor, atributo_heal)
|
||||
|
||||
if (link) then --> se não for a shadow
|
||||
_new_healActor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
_new_healActor.last_events_table.original = true
|
||||
|
||||
_new_healActor.targets.shadow = link.targets
|
||||
_new_healActor.spell_tables.shadow = link.spell_tables
|
||||
end
|
||||
|
||||
return esta_tabela
|
||||
return _new_healActor
|
||||
end
|
||||
|
||||
|
||||
@@ -131,6 +125,8 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
--> top actor #1
|
||||
instancia.top = 0
|
||||
|
||||
local using_cache = false
|
||||
|
||||
local sub_atributo = instancia.sub_atributo --> o que esta sendo mostrado nesta instância
|
||||
local conteudo = showing._ActorTable
|
||||
local amount = #conteudo
|
||||
@@ -199,16 +195,33 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
|
||||
elseif (instancia.modo == modo_GROUP) then --> mostrando GROUP
|
||||
|
||||
--> organiza as tabelas
|
||||
|
||||
if (_detalhes.in_combat) then
|
||||
using_cache = true
|
||||
end
|
||||
|
||||
if (using_cache) then
|
||||
conteudo = _detalhes.cache_healing_group
|
||||
|
||||
--print ("AQUI")
|
||||
--print ("::"..keyName)
|
||||
_table_sort (conteudo, _detalhes.SortKeySimple)
|
||||
|
||||
--_detalhes:DelayMsg ("==================")
|
||||
--_detalhes:DelayMsg (keyName)
|
||||
if (conteudo[1][keyName] < 1) then
|
||||
amount = 0
|
||||
else
|
||||
instancia.top = conteudo[1][keyName]
|
||||
amount = #conteudo
|
||||
end
|
||||
|
||||
for i = 1, amount do
|
||||
total = total + conteudo[i][keyName]
|
||||
end
|
||||
else
|
||||
--_table_sort (conteudo, _detalhes.SortKeyGroup)
|
||||
_detalhes.SortGroup (conteudo, keyName)
|
||||
end
|
||||
|
||||
--_table_sort (conteudo, _detalhes.SortKeyGroup)
|
||||
_detalhes.SortGroup (conteudo, keyName)
|
||||
|
||||
|
||||
--[[_table_sort (conteudo, function (a, b)
|
||||
if (a.grupo and b.grupo) then
|
||||
@@ -328,7 +341,7 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
local porcentagem = self [keyName] / total * 100
|
||||
local esta_porcentagem
|
||||
|
||||
if (_detalhes.time_type == 2 and self.grupo) then
|
||||
if ((_detalhes.time_type == 2 and self.grupo) or (not _detalhes:CaptureGet ("heal") and not _detalhes:CaptureGet ("aura"))) then
|
||||
hps = healing_total / combat_time
|
||||
self.last_hps = hps
|
||||
else
|
||||
|
||||
@@ -21,41 +21,37 @@ local _setmetatable = setmetatable
|
||||
|
||||
function habilidade_cura:NovaTabela (id, link) --aqui eu não sei que parâmetros passar
|
||||
|
||||
local esta_tabela = {}
|
||||
_setmetatable (esta_tabela, habilidade_cura)
|
||||
local _newHealSpell = {
|
||||
|
||||
total = 0,
|
||||
counter = 0,
|
||||
id = id,
|
||||
|
||||
esta_tabela.CriadaEm = time()
|
||||
esta_tabela.quem_sou = "classe_heal_habilidade"
|
||||
|
||||
-- esta_tabela.jogador = serial
|
||||
--> normal hits
|
||||
n_min = 0,
|
||||
n_max = 0,
|
||||
n_amt = 0,
|
||||
n_curado = 0,
|
||||
|
||||
--> critical hits
|
||||
c_min = 0,
|
||||
c_max = 0,
|
||||
c_amt = 0,
|
||||
c_curado = 0,
|
||||
|
||||
esta_tabela.total = 0 --total de dano aplicado por esta habilidade
|
||||
esta_tabela.counter = 0 --conta quantas vezes a habilidade foi chamada
|
||||
esta_tabela.id = id
|
||||
|
||||
--> normal hits
|
||||
absorbed = 0,
|
||||
overheal = 0,
|
||||
|
||||
targets = container_combatentes:NovoContainer (container_heal_target)
|
||||
}
|
||||
|
||||
esta_tabela.n_min = 0
|
||||
esta_tabela.n_max = 0
|
||||
esta_tabela.n_amt = 0
|
||||
esta_tabela.n_curado = 0
|
||||
_setmetatable (_newHealSpell, habilidade_cura)
|
||||
|
||||
--> critical hits
|
||||
|
||||
esta_tabela.c_min = 0
|
||||
esta_tabela.c_max = 0
|
||||
esta_tabela.c_amt = 0
|
||||
esta_tabela.c_curado = 0
|
||||
|
||||
esta_tabela.absorbed = 0
|
||||
esta_tabela.overheal = 0
|
||||
|
||||
esta_tabela.targets = container_combatentes:NovoContainer (container_heal_target)
|
||||
if (link) then
|
||||
esta_tabela.targets.shadow = link.targets
|
||||
_newHealSpell.targets.shadow = link.targets
|
||||
end
|
||||
|
||||
return esta_tabela
|
||||
return _newHealSpell
|
||||
end
|
||||
|
||||
function habilidade_cura:Add (serial, nome, flag, amount, who_nome, absorbed, critical, overhealing, is_shield)
|
||||
|
||||
@@ -1118,6 +1118,27 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
|
||||
--print ("DEBUG: contra", instancia.showing.contra)
|
||||
end
|
||||
|
||||
if (_detalhes.cloud_process) then
|
||||
local atributo = instancia.atributo
|
||||
local time_left = (_detalhes.last_data_requested+7) - _detalhes._tempo
|
||||
|
||||
if (atributo == 1 and _detalhes.in_combat and not _detalhes:CaptureGet ("damage") and _detalhes.host_by) then
|
||||
|
||||
elseif (atributo == 2 and _detalhes.in_combat and (not _detalhes:CaptureGet ("heal") or _detalhes:CaptureGet ("aura")) and _detalhes.host_by) then
|
||||
|
||||
elseif (atributo == 3 and _detalhes.in_combat and not _detalhes:CaptureGet ("energy") and _detalhes.host_by) then
|
||||
|
||||
elseif (atributo == 4 and _detalhes.in_combat and not _detalhes:CaptureGet ("miscdata") and _detalhes.host_by) then
|
||||
|
||||
else
|
||||
time_left = nil
|
||||
end
|
||||
|
||||
if (time_left) then
|
||||
instancia:InstanceAlert (Loc ["STRING_PLEASE_WAIT"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, time_left)
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGESEGMENT", nil, instancia, segmento)
|
||||
|
||||
end
|
||||
|
||||
@@ -59,42 +59,15 @@ local info = _detalhes.janela_info
|
||||
local keyName
|
||||
|
||||
function atributo_misc:NovaTabela (serial, nome, link)
|
||||
local esta_tabela = {}
|
||||
esta_tabela.quem_sou = "classe_misc" --> DEBUG deleta-me
|
||||
|
||||
--print ("CRIANDO NOVO OBJETO")
|
||||
|
||||
_setmetatable (esta_tabela, atributo_misc)
|
||||
|
||||
--> grava o tempo que a tabela foi criada para o garbage collector interno
|
||||
esta_tabela.CriadaEm = time()
|
||||
esta_tabela.last_event = 0
|
||||
esta_tabela.tipo = class_type --> atributo 4 = misc
|
||||
|
||||
--esta_tabela.interrupt = 0 --> armazena quantos interrupt a pessoa deu
|
||||
local _new_miscActor = {
|
||||
last_event = 0,
|
||||
tipo = class_type, --> atributo 4 = misc
|
||||
pets = {} --> pets? okey pets
|
||||
}
|
||||
_setmetatable (_new_miscActor, atributo_misc)
|
||||
|
||||
--[[
|
||||
esta_tabela.cc_break = 0 --> armazena quantas quebras de CC
|
||||
esta_tabela.ress = 0 --> armazena quantos pessoas ele reviveu
|
||||
esta_tabela.dispelled = 0 --> armazena quantos dispells esta pessoa fez
|
||||
esta_tabela.dispell = 0 --> armazena quantos dispell esta pessoa recebeu
|
||||
esta_tabela.last_events_tables = 0 --> armazena quantas vezes essa oessia morreu
|
||||
--]]
|
||||
|
||||
esta_tabela.pets = {} --> pets? okey pets
|
||||
|
||||
--container armazenará os seriais dos alvos que o player aplicou dano
|
||||
--esta_tabela.targets = container_combatentes:NovoContainer (container_energy_target)
|
||||
|
||||
--container armazenará os IDs das habilidades usadas por este jogador
|
||||
--esta_tabela.spell_tables = container_habilidades:NovoContainer (container_energy)
|
||||
|
||||
if (link) then
|
||||
--esta_tabela.targets.shadow = link.targets
|
||||
--esta_tabela.spell_tables.shadow = link.spell_tables
|
||||
end
|
||||
|
||||
return esta_tabela
|
||||
return _new_miscActor
|
||||
end
|
||||
|
||||
function _detalhes:ToolTipDead (instancia, morte, esta_barra)
|
||||
|
||||
@@ -15,41 +15,29 @@ local _UnitAura = UnitAura
|
||||
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
|
||||
|
||||
function habilidade_misc:NovaTabela (id, link, token) --aqui eu não sei que parâmetros passar
|
||||
local esta_tabela = {}
|
||||
_setmetatable (esta_tabela, habilidade_misc)
|
||||
|
||||
esta_tabela.quem_sou = "classe_others_habilidade"
|
||||
|
||||
esta_tabela.id = id
|
||||
|
||||
--print ("token: " .. token)
|
||||
local _newMiscSpell = {
|
||||
|
||||
id = id,
|
||||
counter = 0,
|
||||
targets = container_combatentes:NovoContainer (container_misc_target)
|
||||
}
|
||||
|
||||
if (token == "SPELL_INTERRUPT") then
|
||||
--print ("token de interrupt")
|
||||
esta_tabela.interrompeu_oque = {}
|
||||
end
|
||||
|
||||
if (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
|
||||
--print ("token de interrupt")
|
||||
esta_tabela.dispell_oque = {}
|
||||
end
|
||||
|
||||
if (token == "SPELL_AURA_BROKEN" or token == "SPELL_AURA_BROKEN_SPELL") then
|
||||
--print ("token de interrupt")
|
||||
esta_tabela.cc_break_oque = {}
|
||||
_newMiscSpell.interrompeu_oque = {}
|
||||
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
|
||||
_newMiscSpell.dispell_oque = {}
|
||||
elseif (token == "SPELL_AURA_BROKEN" or token == "SPELL_AURA_BROKEN_SPELL") then
|
||||
_newMiscSpell.cc_break_oque = {}
|
||||
end
|
||||
|
||||
-- isso aqui não pode ser assim... ou pode?
|
||||
esta_tabela.counter = 0
|
||||
--esta_tabela.res = 0
|
||||
|
||||
esta_tabela.targets = container_combatentes:NovoContainer (container_misc_target)
|
||||
_setmetatable (_newMiscSpell, habilidade_misc)
|
||||
|
||||
if (link) then
|
||||
esta_tabela.targets.shadow = link.targets
|
||||
_newMiscSpell.targets.shadow = link.targets
|
||||
end
|
||||
|
||||
return esta_tabela
|
||||
return _newMiscSpell
|
||||
end
|
||||
|
||||
function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spellName)
|
||||
|
||||
@@ -14,12 +14,9 @@ local _setmetatable = setmetatable
|
||||
--esta tabela irá ser usada por todas os tipos? tipo dano, cura, interrupts?
|
||||
|
||||
function alvo_da_habilidade:NovaTabela (link)
|
||||
local esta_tabela = {}
|
||||
_setmetatable (esta_tabela, alvo_da_habilidade)
|
||||
|
||||
esta_tabela.quem_sou = "classe_alvo_da_habilidade"
|
||||
|
||||
esta_tabela.total = 0 --total que a habilidade fez.
|
||||
local esta_tabela = {total = 0}
|
||||
_setmetatable (esta_tabela, alvo_da_habilidade)
|
||||
|
||||
return esta_tabela
|
||||
end
|
||||
|
||||
@@ -46,26 +46,21 @@ local REACTION_HOSTILE = COMBATLOG_OBJECT_REACTION_HOSTILE or 0x00000040
|
||||
|
||||
function container_combatentes:NovoContainer (tipo_do_container, combatTable, combatId)
|
||||
|
||||
local esta_tabela = {}
|
||||
_setmetatable (esta_tabela, container_combatentes)
|
||||
local _newContainer = {
|
||||
|
||||
esta_tabela.funcao_de_criacao = container_combatentes:FuncaoDeCriacao (tipo_do_container)
|
||||
if (not esta_tabela.funcao_de_criacao) then
|
||||
print ("Debug: Container criado mas sem funcao de criacao. TIPO: ")
|
||||
print (tipo_do_container)
|
||||
print (debugstack(2))
|
||||
return
|
||||
end
|
||||
funcao_de_criacao = container_combatentes:FuncaoDeCriacao (tipo_do_container),
|
||||
|
||||
tipo = tipo_do_container,
|
||||
|
||||
combatId = combatId,
|
||||
|
||||
_ActorTable = {},
|
||||
_NameIndexTable = {}
|
||||
}
|
||||
|
||||
esta_tabela.tipo = tipo_do_container
|
||||
|
||||
esta_tabela.combatId = combatId
|
||||
|
||||
esta_tabela._ActorTable = {}
|
||||
esta_tabela._NameIndexTable = {}
|
||||
esta_tabela.meu_tipo = "container_combatentes"
|
||||
|
||||
return esta_tabela
|
||||
_setmetatable (_newContainer, container_combatentes)
|
||||
|
||||
return _newContainer
|
||||
end
|
||||
|
||||
local function get_class_ (novo_objeto, nome, flag)
|
||||
@@ -108,32 +103,6 @@ function container_combatentes:Dupe (who)
|
||||
return novo_objeto
|
||||
end
|
||||
|
||||
function container_combatentes:CriarShadow (who)
|
||||
--> o self é o container no combate_overall -- who é o objeto na tabela do historico [1 2 3]
|
||||
local mapa = self._NameIndexTable
|
||||
local conteudo = self._ActorTable
|
||||
|
||||
local novo_objeto = self.funcao_de_criacao (_, who.serial, who.nome)
|
||||
novo_objeto.nome = who.nome
|
||||
|
||||
novo_objeto.flag = who.flag
|
||||
novo_objeto.classe = who.classe
|
||||
|
||||
for _, pet in _ipairs (who.pets) do
|
||||
novo_objeto.pets [#novo_objeto.pets+1] = pet
|
||||
end
|
||||
|
||||
if (who.enemy) then
|
||||
novo_objeto.enemy = true
|
||||
end
|
||||
|
||||
self._ActorTable [#self._ActorTable+1] = novo_objeto
|
||||
self._NameIndexTable[who.nome] = #self._ActorTable
|
||||
|
||||
return novo_objeto
|
||||
|
||||
end
|
||||
|
||||
function container_combatentes:GetAmount (actorName, key)
|
||||
key = key or "total"
|
||||
local index = self._NameIndexTable [actorName]
|
||||
@@ -227,6 +196,7 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
|
||||
if (shadow_objeto) then
|
||||
shadow_objeto.grupo = true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
elseif (dono_do_pet) then --> é um pet
|
||||
@@ -285,8 +255,11 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
novo_objeto:CriaLink (shadow_objeto) --> criando o link
|
||||
shadow_objeto.flag = details_flag
|
||||
if (novo_objeto.grupo) then
|
||||
_detalhes.cache_damage_group [#_detalhes.cache_damage_group+1] = novo_objeto
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
|
||||
novo_objeto.enemy = true
|
||||
@@ -311,6 +284,9 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
novo_objeto:CriaLink (shadow_objeto) --> criando o link
|
||||
shadow_objeto.flag = details_flag
|
||||
if (novo_objeto.grupo) then
|
||||
_detalhes.cache_healing_group [#_detalhes.cache_healing_group+1] = novo_objeto
|
||||
end
|
||||
end
|
||||
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
|
||||
|
||||
@@ -25,18 +25,16 @@ local habilidade_misc = _detalhes.habilidade_misc
|
||||
local container_habilidades = _detalhes.container_habilidades
|
||||
|
||||
function container_habilidades:NovoContainer (tipo_do_container)
|
||||
local esta_tabela = {}
|
||||
_setmetatable (esta_tabela, container_habilidades)
|
||||
|
||||
local _newContainer = {
|
||||
funcao_de_criacao = container_habilidades:FuncaoDeCriacao (tipo_do_container),
|
||||
tipo = tipo_do_container,
|
||||
_ActorTable = {}
|
||||
}
|
||||
|
||||
esta_tabela.funcao_de_criacao = container_habilidades:FuncaoDeCriacao (tipo_do_container)
|
||||
if (not esta_tabela.funcao_de_criacao) then
|
||||
print ("DEBUG: Sem funcao de criacao para a habilidade... TIPO: ")
|
||||
print (tipo_do_container)
|
||||
end
|
||||
_setmetatable (_newContainer, container_habilidades)
|
||||
|
||||
esta_tabela.tipo = tipo_do_container
|
||||
esta_tabela._ActorTable = {}
|
||||
return esta_tabela
|
||||
return _newContainer
|
||||
end
|
||||
|
||||
function container_habilidades:Dupe (who)
|
||||
|
||||
@@ -14,11 +14,8 @@ local container_pets = _detalhes.container_pets
|
||||
local timeMachine = _detalhes.timeMachine
|
||||
|
||||
function historico:NovoHistorico()
|
||||
local esta_tabela = {}
|
||||
local esta_tabela = {tabelas = {}}
|
||||
_setmetatable (esta_tabela, historico)
|
||||
|
||||
esta_tabela.tabelas = {} --guarda as tabelas dos combates
|
||||
|
||||
return esta_tabela
|
||||
end
|
||||
|
||||
@@ -37,8 +34,26 @@ function historico:adicionar (tabela)
|
||||
_detalhes:InstanciaCallFunction (_detalhes.CheckFreeze, tamanho+1, ultima_tabela)
|
||||
end
|
||||
|
||||
--> reordena as tabelas
|
||||
--> adiciona no index #1
|
||||
_table_insert (self.tabelas, 1, tabela)
|
||||
|
||||
if (self.tabelas[2]) then
|
||||
|
||||
--> fazer limpeza na tabela
|
||||
|
||||
for index, container in ipairs (self.tabelas[2]) do
|
||||
if (index < 3) then
|
||||
for _, jogador in ipairs (container._ActorTable) do
|
||||
|
||||
--> limpeza
|
||||
jogador.last_events_table = nil
|
||||
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> chama a função que irá atualizar as instâncias com segmentos no histórico
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos_AfterCombat, self)
|
||||
|
||||
@@ -136,9 +136,9 @@ function container_pets:Adicionar (pet_serial, pet_nome, pet_flags, dono_serial,
|
||||
--print ("dono nome:",d[1], "dono serial:", d[2], "dono flags:", d[3], "tempo:", d[4])
|
||||
--end
|
||||
|
||||
if (self.pets [dono_serial]) then
|
||||
--if (self.pets [dono_serial]) then
|
||||
--print ("debug: a owner is a pet, Owner: ", dono_nome, " Pet: ", pet_nome)
|
||||
end
|
||||
--end
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -194,6 +194,8 @@
|
||||
|
||||
_detalhes.container_pets:BuscarPets()
|
||||
|
||||
table.wipe (_detalhes.cache_damage_group)
|
||||
table.wipe (_detalhes.cache_healing_group)
|
||||
_detalhes:UpdateParserGears()
|
||||
|
||||
_detalhes.host_of = nil
|
||||
@@ -355,6 +357,8 @@
|
||||
|
||||
_detalhes.in_combat = false --sinaliza ao addon que não há combate no momento
|
||||
|
||||
table.wipe (_detalhes.cache_damage_group)
|
||||
table.wipe (_detalhes.cache_healing_group)
|
||||
_detalhes:UpdateParserGears()
|
||||
|
||||
_detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, _detalhes.tabela_vigente)
|
||||
@@ -425,6 +429,16 @@
|
||||
end
|
||||
|
||||
function _detalhes:EqualizeActorsSchedule()
|
||||
--> check for pets without owner
|
||||
for _, actor in _ipairs (_detalhes.tabela_vigente[1]._ActorTable) do
|
||||
--> have flag and the flag tell us he is a pet
|
||||
if (actor.flag_original and bit.band (actor.flag_original, OBJECT_TYPE_PETS) ~= 0) then
|
||||
--> do not have owner and he isn't on owner container
|
||||
if (not actor.owner and not _detalhes.container_pets.pets [actor.serial]) then
|
||||
_detalhes:SendPetOwnerRequest (actor.serial, actor.nome)
|
||||
end
|
||||
end
|
||||
end
|
||||
_detalhes:ScheduleTimer ("EqualizeActors", 2)
|
||||
end
|
||||
|
||||
@@ -561,9 +575,12 @@
|
||||
|
||||
if (not tabela_do_combate[self.atributo].need_refresh and not forcar) then
|
||||
return --> não precisa de refresh
|
||||
else
|
||||
tabela_do_combate[self.atributo].need_refresh = false
|
||||
end
|
||||
|
||||
if (self.atributo == 1) then --> damage
|
||||
|
||||
return atributo_damage:RefreshWindow (self, tabela_do_combate, forcar)
|
||||
elseif (self.atributo == 2) then --> heal
|
||||
return atributo_heal:RefreshWindow (self, tabela_do_combate, forcar)
|
||||
@@ -593,6 +610,7 @@
|
||||
if (esta_instancia.ativa) then
|
||||
if (esta_instancia.modo == modo_GROUP or esta_instancia.modo == modo_ALL) then
|
||||
local atributo = esta_instancia:AtualizarALL (forcar)
|
||||
|
||||
if (atributo) then
|
||||
refresh_poll [#refresh_poll+1] = atributo
|
||||
end
|
||||
|
||||
@@ -171,7 +171,6 @@
|
||||
|
||||
shadow = overall_dano._ActorTable [overall_dano._NameIndexTable[nome]]
|
||||
if (not shadow) then
|
||||
--shadow = overall_dano:CriarShadow (esta_classe)
|
||||
shadow = overall_dano:PegarCombatente (esta_classe.serial, esta_classe.nome, esta_classe.flag_original, true)
|
||||
shadow.classe = esta_classe.classe
|
||||
shadow.start_time = _tempo
|
||||
@@ -190,7 +189,6 @@
|
||||
elseif (class_type == class_type_cura) then
|
||||
shadow = overall_cura._ActorTable [overall_cura._NameIndexTable[nome]]
|
||||
if (not shadow) then
|
||||
--shadow = overall_cura:CriarShadow (esta_classe)
|
||||
shadow = overall_cura:PegarCombatente (esta_classe.serial, esta_classe.nome, esta_classe.flag_original, true)
|
||||
shadow.classe = esta_classe.classe
|
||||
shadow.start_time = _tempo
|
||||
@@ -202,7 +200,6 @@
|
||||
elseif (class_type == class_type_e_energy) then
|
||||
shadow = overall_energy._ActorTable [overall_energy._NameIndexTable[nome]]
|
||||
if (not shadow) then
|
||||
--shadow = overall_energy:CriarShadow (esta_classe)
|
||||
shadow = overall_energy:PegarCombatente (esta_classe.serial, esta_classe.nome, esta_classe.flag_original, true)
|
||||
shadow.classe = esta_classe.classe
|
||||
end
|
||||
@@ -216,7 +213,6 @@
|
||||
shadow = overall_misc._ActorTable [overall_misc._NameIndexTable[nome]]
|
||||
|
||||
if (not shadow) then
|
||||
--shadow = overall_misc:CriarShadow (esta_classe)
|
||||
shadow = overall_misc:PegarCombatente (esta_classe.serial, esta_classe.nome, esta_classe.flag_original, true)
|
||||
shadow.classe = esta_classe.classe
|
||||
end
|
||||
|
||||
+54
-3
@@ -36,7 +36,7 @@
|
||||
|
||||
function _detalhes:RaidComm (_, data, _, source)
|
||||
|
||||
local type, player, realm, dversion, arg6 = select (2, _detalhes:Deserialize (data))
|
||||
local type, player, realm, dversion, arg6, arg7 = select (2, _detalhes:Deserialize (data))
|
||||
|
||||
if (_detalhes.debug) then
|
||||
print ("comm received", type)
|
||||
@@ -46,6 +46,46 @@
|
||||
if (player ~= _detalhes.playername and not _detalhes.details_users [player]) then
|
||||
_detalhes.details_users [player] = {player, realm, dversion}
|
||||
end
|
||||
|
||||
elseif (type == "petowner") then
|
||||
local serial = player
|
||||
local nome = realm
|
||||
local owner_table = dversion
|
||||
|
||||
if (not _detalhes.container_pets.pets [serial]) then
|
||||
_detalhes.container_pets.pets [serial] = owner_table
|
||||
local petActor = _detalhes.tabela_vigente[1]:PegarCombatente (_, nome)
|
||||
if (petActor) then
|
||||
local ownerActor = _detalhes.tabela_vigente[1]:PegarCombatente (owner_table[2], owner_table[1], owner_table[3], true)
|
||||
ownerActor.total = ownerActor.total + petActor.total
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("Received owner for pet ",nome, "assigned to", owner_table[1])
|
||||
end
|
||||
|
||||
local combat = _detalhes:GetCombat ("current")
|
||||
combat[1].need_refresh = true
|
||||
end
|
||||
end
|
||||
|
||||
elseif (type == "needpetowner") then
|
||||
|
||||
if (dversion ~= _detalhes.realversion) then
|
||||
return
|
||||
end
|
||||
|
||||
local petserial = arg6
|
||||
local petnome = arg7
|
||||
local owner_table = _detalhes.container_pets.pets [petserial]
|
||||
|
||||
if (owner_table) then
|
||||
if (realm ~= GetRealmName()) then
|
||||
player = player .."-"..realm
|
||||
end
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("Received pet owner request of pet, sending owner")
|
||||
end
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("petowner", petserial, petnome, owner_table), "WHISPER", player)
|
||||
end
|
||||
|
||||
elseif (type == "clouddatareceived") then
|
||||
|
||||
@@ -118,7 +158,7 @@
|
||||
--> delayed response
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local atributo, subatributo = player, realm
|
||||
|
||||
local data
|
||||
@@ -170,6 +210,7 @@
|
||||
end
|
||||
|
||||
_detalhes.cloud_process = _detalhes:ScheduleRepeatingTimer ("RequestData", 7)
|
||||
_detalhes.last_data_requested = _detalhes._tempo
|
||||
|
||||
elseif (type == "needcloud") then
|
||||
|
||||
@@ -213,6 +254,13 @@
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("highfive", UnitName ("player"), GetRealmName(), _detalhes.realversion), "RAID")
|
||||
end
|
||||
|
||||
function _detalhes:SendPetOwnerRequest (petserial, petnome)
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("Sent request for a pet",petserial, petnome)
|
||||
end
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("needpetowner", UnitName ("player"), GetRealmName(), _detalhes.realversion, petserial, petnome), "RAID")
|
||||
end
|
||||
|
||||
function _detalhes:SendCloudRequest()
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("needcloud", UnitName ("player"), GetRealmName(), _detalhes.realversion), "RAID")
|
||||
end
|
||||
@@ -223,12 +271,15 @@
|
||||
end
|
||||
_detalhes.host_of = player
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("Details: CloudRequest()")
|
||||
_detalhes:Msg ("Sent request for a cloud parser")
|
||||
end
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("foundcloud", UnitName ("player"), GetRealmName(), _detalhes.realversion), "WHISPER", player)
|
||||
end
|
||||
|
||||
function _detalhes:RequestData()
|
||||
|
||||
_detalhes.last_data_requested = _detalhes._tempo
|
||||
|
||||
for index = 1, #_detalhes.tabela_instancias do
|
||||
local instancia = _detalhes.tabela_instancias [index]
|
||||
if (instancia.ativa) then
|
||||
|
||||
+80
-15
@@ -37,6 +37,10 @@
|
||||
local container_combatentes = _detalhes.container_combatentes --details local
|
||||
local container_habilidades = _detalhes.container_habilidades --details local
|
||||
|
||||
local spell_damage_func = _detalhes.habilidade_dano.Add --details local
|
||||
local spell_heal_func = _detalhes.habilidade_cura.Add --details local
|
||||
local spell_energy_func = _detalhes.habilidade_e_energy.Add --details local
|
||||
|
||||
--> current combat and overall pointers
|
||||
local _current_combat = _detalhes.tabela_vigente or {} --> placeholder table
|
||||
local _overall_combat = _detalhes.tabela_overall or {} --> placeholder table
|
||||
@@ -59,6 +63,8 @@
|
||||
--> cache
|
||||
--> damage
|
||||
local damage_cache = {}
|
||||
local damage_cache_pets = {}
|
||||
local damage_cache_petsOwners = {}
|
||||
--> heaing
|
||||
local healing_cache = {}
|
||||
--> energy
|
||||
@@ -147,29 +153,39 @@
|
||||
--> get actors
|
||||
|
||||
--> damager
|
||||
local este_jogador, meu_dono = damage_cache [who_name]
|
||||
local este_jogador, meu_dono = damage_cache [who_name] or damage_cache_pets [who_serial], damage_cache_petsOwners [who_serial]
|
||||
|
||||
if (not este_jogador) then --> pode ser um desconhecido ou um pet
|
||||
|
||||
este_jogador, meu_dono, who_name = _current_damage_container:PegarCombatente (who_serial, who_name, who_flags, true)
|
||||
|
||||
if (not meu_dono) then --> se não for um pet, adicionar no cache
|
||||
--> fazer: precisa ser com cache
|
||||
local search = _detalhes.tabela_pets.pets [who_serial]
|
||||
if (not search) then --> make sure isn't a pet
|
||||
if (meu_dono) then --> é um pet
|
||||
damage_cache_pets [who_serial] = este_jogador
|
||||
damage_cache_petsOwners [who_serial] = meu_dono
|
||||
else
|
||||
if (who_flags) then --> ter certeza que não é um pet
|
||||
damage_cache [who_name] = este_jogador
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--> his target
|
||||
local jogador_alvo, alvo_dono = damage_cache [alvo_name]
|
||||
local jogador_alvo, alvo_dono = damage_cache [alvo_name] or damage_cache_pets [alvo_serial], damage_cache_petsOwners [alvo_serial]
|
||||
|
||||
if (not jogador_alvo) then
|
||||
|
||||
jogador_alvo, alvo_dono, alvo_name = _current_damage_container:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true)
|
||||
--> fazer: precisa ser com cache
|
||||
if (not alvo_dono and not _detalhes.tabela_pets.pets [alvo_serial]) then
|
||||
damage_cache [alvo_name] = jogador_alvo
|
||||
|
||||
if (meu_dono) then
|
||||
damage_cache_pets [alvo_serial] = jogador_alvo
|
||||
damage_cache_petsOwners [alvo_serial] = alvo_dono
|
||||
else
|
||||
if (alvo_flags) then --> ter certeza que não é um pet
|
||||
damage_cache [alvo_name] = jogador_alvo
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--> damager shadow
|
||||
@@ -193,6 +209,7 @@
|
||||
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
|
||||
@@ -224,6 +241,7 @@
|
||||
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
|
||||
|
||||
@@ -364,7 +382,8 @@
|
||||
spell = este_jogador.spell_tables:PegaHabilidade (spellid, true, token)
|
||||
end
|
||||
|
||||
return spell:Add (alvo_serial, alvo_name, alvo_flags, amount, who_name, resisted, blocked, absorbed, critical, glacing, token)
|
||||
--return spell:Add (alvo_serial, alvo_name, alvo_flags, amount, who_name, resisted, blocked, absorbed, critical, glacing, token)
|
||||
return spell_damage_func (spell, alvo_serial, alvo_name, alvo_flags, amount, who_name, resisted, blocked, absorbed, critical, glacing, token)
|
||||
end
|
||||
|
||||
function parser:swingmissed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, missType, isOffHand, amountMissed)
|
||||
@@ -486,7 +505,7 @@
|
||||
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)
|
||||
if (not meu_dono) then --> se não for um pet, adicionar no cache
|
||||
if (not meu_dono and who_flags) then --> se não for um pet, adicionar no cache
|
||||
healing_cache [who_name] = este_jogador
|
||||
end
|
||||
end
|
||||
@@ -494,7 +513,7 @@
|
||||
local jogador_alvo, alvo_dono = healing_cache [alvo_name]
|
||||
if (not jogador_alvo) then
|
||||
jogador_alvo, alvo_dono, alvo_name = _current_heal_container:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true)
|
||||
if (not alvo_dono) then
|
||||
if (not alvo_dono and alvo_flags) then
|
||||
healing_cache [alvo_name] = jogador_alvo
|
||||
end
|
||||
end
|
||||
@@ -536,6 +555,41 @@
|
||||
|
||||
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]
|
||||
@@ -629,9 +683,11 @@
|
||||
end
|
||||
|
||||
if (is_shield) then
|
||||
return spell:Add (alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, 0, nil, overhealing, true)
|
||||
--return spell:Add (alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, 0, nil, overhealing, true)
|
||||
return spell_heal_func (spell, alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, 0, nil, overhealing, true)
|
||||
else
|
||||
return spell:Add (alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, absorbed, critical, overhealing)
|
||||
--return spell:Add (alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, absorbed, critical, overhealing)
|
||||
return spell_heal_func (spell, alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, absorbed, critical, overhealing)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1037,7 +1093,8 @@
|
||||
spell = este_jogador.spell_tables:PegaHabilidade (spellid, true, token)
|
||||
end
|
||||
|
||||
return spell:Add (alvo_serial, alvo_name, alvo_flags, amount, who_name, powertype)
|
||||
--return spell:Add (alvo_serial, alvo_name, alvo_flags, amount, who_name, powertype)
|
||||
return spell_energy_func (spell, alvo_serial, alvo_name, alvo_flags, amount, who_name, powertype)
|
||||
end
|
||||
|
||||
|
||||
@@ -1845,6 +1902,9 @@
|
||||
|
||||
return
|
||||
|
||||
elseif (evento == "UNIT_PET") then
|
||||
_detalhes.container_pets:BuscarPets()
|
||||
|
||||
elseif (evento == "PLAYER_REGEN_DISABLED") then -- Entrou em Combate
|
||||
--> inicia um timer para pegar qual é a luta:
|
||||
|
||||
@@ -1974,8 +2034,13 @@
|
||||
|
||||
--> clear cache
|
||||
damage_cache = {}
|
||||
damage_cache_pets = {}
|
||||
damage_cache_petsOwners = {}
|
||||
|
||||
healing_cache = {}
|
||||
|
||||
energy_cache = {}
|
||||
|
||||
misc_cache = {}
|
||||
|
||||
end
|
||||
|
||||
@@ -139,7 +139,7 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
--> function
|
||||
local smember_function = function (_object, _value)
|
||||
return _rawset (_object, "func", _value)
|
||||
return _rawset (_object, "func", _value)
|
||||
end
|
||||
--> text color
|
||||
local smember_textcolor = function (_object, _value)
|
||||
|
||||
@@ -410,6 +410,8 @@ function DetailsDropDownOnMouseDown (button)
|
||||
if (not object.opened) then --> click to open
|
||||
|
||||
local menu = object:func()
|
||||
object.builtMenu = menu
|
||||
|
||||
local frame_witdh = object.realsizeW
|
||||
|
||||
if (menu [1]) then
|
||||
@@ -698,6 +700,8 @@ function gump:NewDropDown (parent, container, name, member, w, h, func, default)
|
||||
|
||||
DropDownObject.dropdown = CreateFrame ("Button", name, parent, "DetailsDropDownTemplate")
|
||||
DropDownObject.widget = DropDownObject.dropdown
|
||||
|
||||
DropDownObject.__it = {nil, nil}
|
||||
--_G [name] = DropDownObject
|
||||
|
||||
if (not APIDropDownFunctions) then
|
||||
@@ -747,6 +751,8 @@ function gump:NewDropDown (parent, container, name, member, w, h, func, default)
|
||||
scroll.slider:Show()
|
||||
end
|
||||
|
||||
--button_down_scripts (DropDownObject, scroll.slider, scroll.baixo)
|
||||
|
||||
DropDownObject:HideScroll()
|
||||
DropDownObject.label:SetSize (DropDownObject.dropdown:GetWidth()-40, 10)
|
||||
|
||||
|
||||
+70
-11
@@ -20,7 +20,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
_detalhes:CriarInstancia()
|
||||
|
||||
elseif (command ==Loc ["STRING_SLASH_SHOW_DESC"]) then
|
||||
elseif (command == Loc ["STRING_SLASH_SHOW"]) then
|
||||
|
||||
if (_detalhes.opened_windows == 0) then
|
||||
_detalhes:CriarInstancia()
|
||||
@@ -65,20 +65,79 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
_G.DetailsCopy.MyObject.text:HighlightText()
|
||||
_G.DetailsCopy.MyObject.text:SetFocus()
|
||||
|
||||
elseif (msg == "slider") then
|
||||
|
||||
local f = CreateFrame ("frame", "TESTEDESCROLL", UIParent)
|
||||
f:SetPoint ("center", UIParent, "center", 200, -2)
|
||||
f:SetWidth (300)
|
||||
f:SetHeight (150)
|
||||
f:SetBackdrop ({bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
f:SetBackdropColor (0, 0, 0, 1)
|
||||
f:EnableMouseWheel (true)
|
||||
|
||||
local rows = {}
|
||||
for i = 1, 7 do
|
||||
local row = CreateFrame ("frame", nil, UIParent)
|
||||
row:SetPoint ("topleft", f, "topleft", 10, -(i-1)*21)
|
||||
row:SetWidth (200)
|
||||
row:SetHeight (20)
|
||||
row:SetBackdrop ({bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
local t = row:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
t:SetPoint ("left", row, "left")
|
||||
row.text = t
|
||||
rows [#rows+1] = row
|
||||
end
|
||||
|
||||
local data = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}
|
||||
|
||||
|
||||
|
||||
elseif (msg == "bcollor") then
|
||||
|
||||
--local instancia = _detalhes.tabela_instancias [1]
|
||||
_detalhes.ResetButton.Middle:SetVertexColor (1, 1, 0, 1)
|
||||
|
||||
--print (_detalhes.ResetButton:GetHighlightTexture())
|
||||
|
||||
local t = _detalhes.ResetButton:GetHighlightTexture()
|
||||
t:SetVertexColor (0, 1, 0, 1)
|
||||
--print (t:GetObjectType())
|
||||
--_detalhes.ResetButton:SetHighlightTexture (t)
|
||||
_detalhes.ResetButton:SetNormalTexture (t)
|
||||
|
||||
print ("backdrop", _detalhes.ResetButton:GetBackdrop())
|
||||
|
||||
_detalhes.ResetButton:SetBackdropColor (0, 0, 1, 1)
|
||||
|
||||
--vardump (_detalhes.ResetButton)
|
||||
|
||||
elseif (msg == "alert") then
|
||||
|
||||
local instancia = _detalhes.tabela_instancias [1]
|
||||
--instancia:InstanceAlert ("Teste do alerta da instancia", [[Interface\Buttons\UI-GroupLoot-Pass-Down]], 5, clickfunc)
|
||||
--instancia:InstanceAlert ("Teste do alerta da instancia", [[Interface\Buttons\UI-GroupLoot-Pass-Down]], 5, clickfunc)
|
||||
local f = function() print ("teste") end
|
||||
instancia:InstanceAlert (Loc ["STRING_PLEASE_WAIT"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, 5, {f, "param1", "param2"})
|
||||
|
||||
|
||||
elseif (msg == "comm") then
|
||||
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("foundcloud", UnitName ("player"), GetRealmName(), _detalhes.realversion), "WHISPER", "Marleyieu-Azralon")
|
||||
SendAddonMessage ("details_comm", "text", "WHISPER", "Marleyieu-Azralon")
|
||||
SendChatMessage ("Hello Bob!", "WHISPER", "Common", "Marleyieu-Azralon")
|
||||
if (IsInRaid()) then
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
local nname, server = UnitName ("raid"..i)
|
||||
print (nname, server)
|
||||
--nname = nname.."-"..server
|
||||
end
|
||||
end
|
||||
|
||||
elseif (msg == "visao") then
|
||||
--_detalhes:VisiblePlayers()
|
||||
--local a, b = GetUnitName ("player")
|
||||
--print (a,GetRealmName())
|
||||
--print (time())
|
||||
--print (math.floor (time()/10))
|
||||
|
||||
elseif (msg == "teste") then
|
||||
|
||||
assert (false, "teste")
|
||||
local teste = nil
|
||||
local tabela = {um = 1, dois = 2}
|
||||
|
||||
local a = tabela [teste]
|
||||
print (a)
|
||||
|
||||
elseif (msg == "yesno") then
|
||||
--_detalhes:Show()
|
||||
|
||||
@@ -406,6 +406,43 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
{value = [[Interface\ARCHEOLOGY\ArchRare-ZinRokhDestroyer]], label = "ZinRokh Destroyer", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-ZinRokhDestroyer]], texcoord = nil},
|
||||
},
|
||||
|
||||
["CREDITS"] = {
|
||||
{value = [[Interface\Glues\CREDITS\Arakkoa2]], label = "Arakkoa", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Arakkoa2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Arcane_Golem2]], label = "Arcane Golem", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Arcane_Golem2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Badlands3]], label = "Badlands", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Badlands3]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\BD6]], label = "Draenei", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\BD6]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Draenei_Character1]], label = "Draenei 2", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei_Character1]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Draenei_Character2]], label = "Draenei 3", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei_Character2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Draenei_Crest2]], label = "Draenei Crest", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei_Crest2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Draenei_Female2]], label = "Draenei 4", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei_Female2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Draenei2]], label = "Draenei 5", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Blood_Elf_One1]], label = "Kael'thas", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Blood_Elf_One1]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\BD2]], label = "Blood Elf", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\BD2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\BloodElf_Priestess_Master2]], label = "Blood elf 2", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\BloodElf_Priestess_Master2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Female_BloodElf2]], label = "Blood Elf 3", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Female_BloodElf2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\CinSnow01TGA3]], label = "Cin Snow", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\CinSnow01TGA3]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\DalaranDomeTGA3]], label = "Dalaran", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\DalaranDomeTGA3]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Darnasis5]], label = "Darnasus", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Darnasis5]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Draenei_CityInt5]], label = "Exodar", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei_CityInt5]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Shattrath6]], label = "Shattrath", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Shattrath6]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Demon_Chamber2]], label = "Demon Chamber", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Demon_Chamber2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Demon_Chamber6]], label = "Demon Chamber 2", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Demon_Chamber6]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Dwarfhunter1]], label = "Dwarf Hunter", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Dwarfhunter1]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Fellwood5]], label = "Fellwood", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Fellwood5]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\HordeBanner1]], label = "Horde Banner", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\HordeBanner1]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Illidan_Concept1]], label = "Illidan", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Illidan_Concept1]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Illidan1]], label = "Illidan 2", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Illidan1]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Naaru_CrashSite2]], label = "Naaru Crash", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Naaru_CrashSite2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\NightElves1]], label = "Night Elves", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\NightElves1]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Ocean2]], label = "Mountain", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Ocean2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Tempest_Keep2]], label = "Tempest Keep", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Tempest_Keep2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Tempest_Keep6]], label = "Tempest Keep 2", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Tempest_Keep6]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Terrokkar6]], label = "Terrokkar", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Terrokkar6]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\ThousandNeedles2]], label = "Thousand Needles", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\ThousandNeedles2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\Troll2]], label = "Troll", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Troll2]], texcoord = nil},
|
||||
{value = [[Interface\Glues\CREDITS\LESSERELEMENTAL_FIRE_03B1]], label = "Fire Elemental", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\LESSERELEMENTAL_FIRE_03B1]], texcoord = nil},
|
||||
},
|
||||
|
||||
["DEATHKNIGHT"] = {
|
||||
{value = [[Interface\TALENTFRAME\bg-deathknight-blood]], label = "Blood", onclick = onSelectSecTexture, icon = [[Interface\ICONS\Spell_Deathknight_BloodPresence]], texcoord = nil},
|
||||
{value = [[Interface\TALENTFRAME\bg-deathknight-frost]], label = "Frost", onclick = onSelectSecTexture, icon = [[Interface\ICONS\Spell_Deathknight_FrostPresence]], texcoord = nil},
|
||||
@@ -500,6 +537,7 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
|
||||
local backgroundTable = {
|
||||
{value = "ARCHEOLOGY", label = "Archeology", onclick = onSelectMainTexture, icon = [[Interface\ARCHEOLOGY\Arch-Icon-Marker]]},
|
||||
{value = "CREDITS", label = "Burning Crusade", onclick = onSelectMainTexture, icon = [[Interface\ICONS\TEMP]]},
|
||||
{value = "DEATHKNIGHT", label = "Death Knight", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DEATHKNIGHT"]},
|
||||
{value = "DRESSUP", label = "Class Background", onclick = onSelectMainTexture, icon = [[Interface\ICONS\INV_Chest_Cloth_17]]},
|
||||
{value = "DRUID", label = "Druid", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DRUID"]},
|
||||
|
||||
+124
-3
@@ -1528,6 +1528,117 @@ local function iterate_scroll_scripts (BackGroundDisplay, BackGroundFrame, BaseF
|
||||
end)
|
||||
end
|
||||
|
||||
function _detalhes:InstanceAlertTime (instance)
|
||||
instance.alert:Hide()
|
||||
instance.alert.rotate:Stop()
|
||||
instance.alert_time = nil
|
||||
end
|
||||
|
||||
function _detalhes:InstanceAlert (msg, icon, time, clickfunc)
|
||||
|
||||
if (msg) then
|
||||
self.alert.text:SetText (msg)
|
||||
else
|
||||
self.alert.text:SetText ("")
|
||||
end
|
||||
|
||||
if (icon) then
|
||||
if (type (icon) == "table") then
|
||||
local texture, w, h, animate, l, r, t, b = unpack (icon)
|
||||
|
||||
self.alert.icon:SetTexture (texture)
|
||||
self.alert.icon:SetWidth (w or 14)
|
||||
self.alert.icon:SetHeight (h or 14)
|
||||
if (l and r and t and b) then
|
||||
self.alert.icon:SetTexCoord (l, r, t, b)
|
||||
end
|
||||
if (animate) then
|
||||
self.alert.rotate:Play()
|
||||
end
|
||||
else
|
||||
self.alert.icon:SetWidth (14)
|
||||
self.alert.icon:SetHeight (14)
|
||||
self.alert.icon:SetTexture (icon)
|
||||
self.alert.icon:SetTexCoord (0, 1, 0, 1)
|
||||
end
|
||||
else
|
||||
self.alert.icon:SetTexture (nil)
|
||||
end
|
||||
|
||||
if (clickfunc) then
|
||||
self.alert.button:SetClickFunction (unpack (clickfunc))
|
||||
else
|
||||
self.alert.button.clickfunction = nil
|
||||
end
|
||||
|
||||
if (time) then
|
||||
self.alert_time = time
|
||||
_detalhes:ScheduleTimer ("InstanceAlertTime", time, self)
|
||||
end
|
||||
|
||||
self.alert:Show()
|
||||
end
|
||||
|
||||
function CreateAlertFrame (BaseFrame, instancia)
|
||||
|
||||
local alert_bg = CreateFrame ("frame", nil, BaseFrame)
|
||||
alert_bg:SetPoint ("bottom", BaseFrame, "bottom")
|
||||
alert_bg:SetPoint ("left", BaseFrame, "left", 3, 0)
|
||||
alert_bg:SetPoint ("right", BaseFrame, "right", -3, 0)
|
||||
alert_bg:SetHeight (12)
|
||||
alert_bg:SetBackdrop ({bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
alert_bg:SetBackdropColor (.1, .1, .1, 1)
|
||||
alert_bg:SetFrameStrata ("HIGH")
|
||||
alert_bg:SetFrameLevel (BaseFrame:GetFrameLevel() + 6)
|
||||
alert_bg:Hide()
|
||||
|
||||
local toptexture = alert_bg:CreateTexture (nil, "background")
|
||||
toptexture:SetTexture ([[Interface\Challenges\challenges-main]])
|
||||
--toptexture:SetTexCoord (0.1921484375, 0.523671875, 0.234375, 0.160859375)
|
||||
toptexture:SetTexCoord (0.231171875, 0.4846484375, 0.0703125, 0.072265625)
|
||||
toptexture:SetPoint ("left", alert_bg, "left")
|
||||
toptexture:SetPoint ("right", alert_bg, "right")
|
||||
toptexture:SetPoint ("bottom", alert_bg, "top", 0, 0)
|
||||
toptexture:SetHeight (1)
|
||||
|
||||
local text = alert_bg:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
text:SetPoint ("right", alert_bg, "right", -14, 0)
|
||||
_detalhes:SetFontSize (text, 10)
|
||||
text:SetTextColor (1, 1, 1, 1)
|
||||
|
||||
local rotate_frame = CreateFrame ("frame", nil, alert_bg)
|
||||
rotate_frame:SetWidth (12)
|
||||
rotate_frame:SetPoint ("right", alert_bg, "right")
|
||||
rotate_frame:SetHeight (alert_bg:GetWidth())
|
||||
|
||||
local icon = rotate_frame:CreateTexture (nil, "overlay")
|
||||
icon:SetPoint ("center", rotate_frame, "center")
|
||||
icon:SetWidth (14)
|
||||
icon:SetHeight (14)
|
||||
|
||||
local button = gump:NewButton (alert_bg, nil, "DetailsInstance"..instancia.meu_id.."AlertButton", nil, 1, 1)
|
||||
button:SetAllPoints()
|
||||
button:SetHook ("OnMouseUp", function() alert_bg:Hide() end)
|
||||
|
||||
local RotateAnimGroup = rotate_frame:CreateAnimationGroup()
|
||||
local rotate = RotateAnimGroup:CreateAnimation ("Rotation")
|
||||
rotate:SetDegrees (360)
|
||||
rotate:SetDuration (6)
|
||||
RotateAnimGroup:SetLooping ("repeat")
|
||||
|
||||
alert_bg:Hide()
|
||||
|
||||
alert_bg.text = text
|
||||
alert_bg.icon = icon
|
||||
alert_bg.button = button
|
||||
alert_bg.rotate = RotateAnimGroup
|
||||
|
||||
instancia.alert = alert_bg
|
||||
|
||||
return alert_bg
|
||||
end
|
||||
|
||||
--> inicio
|
||||
function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
|
||||
@@ -1703,7 +1814,9 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
|
||||
BaseFrame.wallpaper = BaseFrame:CreateTexture (nil, "border")
|
||||
BaseFrame.wallpaper:Hide()
|
||||
|
||||
|
||||
BaseFrame.alert = CreateAlertFrame (BaseFrame, instancia)
|
||||
|
||||
--cria os 2 resizers
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -2159,6 +2272,8 @@ function _detalhes:InstanceColor (red, green, blue, alpha)
|
||||
self.baseframe.cabecalho.ball_r:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.ball:SetVertexColor (red, green, blue)
|
||||
self.baseframe.cabecalho.ball:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.emenda:SetVertexColor (red, green, blue)
|
||||
self.baseframe.cabecalho.emenda:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.top_bg:SetVertexColor (red, green, blue)
|
||||
self.baseframe.cabecalho.top_bg:SetAlpha (alpha)
|
||||
|
||||
@@ -2390,7 +2505,13 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
BaseFrame.cabecalho.ball:SetPoint ("BOTTOMLEFT", BaseFrame, "TOPLEFT", -37, 0)
|
||||
BaseFrame.cabecalho.ball:SetWidth (64)
|
||||
BaseFrame.cabecalho.ball:SetHeight (64)
|
||||
BaseFrame.cabecalho.ball:SetTexture ("Interface\\AddOns\\Details\\images\\ball_left")
|
||||
BaseFrame.cabecalho.ball:SetTexture ([[Interface\AddOns\Details\images\ball_left]])
|
||||
|
||||
BaseFrame.cabecalho.emenda = BaseFrame:CreateTexture (nil, "OVERLAY")
|
||||
BaseFrame.cabecalho.emenda:SetPoint ("bottomright", BaseFrame.cabecalho.ball, "bottomright", 0, 0)
|
||||
BaseFrame.cabecalho.emenda:SetWidth (8)
|
||||
BaseFrame.cabecalho.emenda:SetHeight (32)
|
||||
BaseFrame.cabecalho.emenda:SetTexture ([[Interface\AddOns\Details\images\emenda_left]])
|
||||
|
||||
BaseFrame.cabecalho.atributo_icon:Hide()
|
||||
BaseFrame.cabecalho.ball:Hide()
|
||||
@@ -2404,7 +2525,7 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
|
||||
--> barra centro
|
||||
BaseFrame.cabecalho.top_bg = BaseFrame:CreateTexture (nil, "BACKGROUND")
|
||||
BaseFrame.cabecalho.top_bg:SetPoint ("LEFT", BaseFrame.cabecalho.ball, "RIGHT", 0, -16)
|
||||
BaseFrame.cabecalho.top_bg:SetPoint ("LEFT", BaseFrame.cabecalho.ball, "RIGHT", -4, -16)
|
||||
BaseFrame.cabecalho.top_bg:SetPoint ("RIGHT", BaseFrame.cabecalho.ball_r, "LEFT")
|
||||
BaseFrame.cabecalho.top_bg:SetTexture ("Interface\\AddOns\\Details\\images\\bar_top_center")
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -15,6 +15,8 @@ if not Loc then return end
|
||||
Loc ["STRING_TOOOLD"] = "could not be installed because your Details! version is too old."
|
||||
Loc ["STRING_TOOOLD2"] = "your Details! version isn't the same."
|
||||
|
||||
Loc ["STRING_PLEASE_WAIT"] = "Please wait"
|
||||
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"] = "Right click to close."
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_MEDIUM"] = "Use right click to close this window."
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_LARGE"] = "Click with right mouse button to close this window."
|
||||
|
||||
@@ -14,6 +14,8 @@ 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_PLEASE_WAIT"] = "Por favor espere"
|
||||
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"] = "Botao direito para fechar."
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_MEDIUM"] = "Use o botao direito para fechar esta janela."
|
||||
|
||||
Reference in New Issue
Block a user