- Added debuff uptime at misc attribute.

- Added API: instance:InstanceMsg (text, _, textcolor, icontexture, iconcoords).
- Added API: container:ActorCallFunction (func, args) run func for all actors.
- Added member .diff on combat.is_boss table, represent the dificult of raid.
- Disabled captures on Attribute menu now have darkness effect.
- Fixed some tainted which were triggered when dragging a windows.

- Started of major code cleanup.
This commit is contained in:
Tercio
2013-11-05 18:47:19 -02:00
parent f002a7546f
commit 627ab9b91c
20 changed files with 1507 additions and 903 deletions
+3 -3
View File
@@ -8,9 +8,9 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
_detalhes.userversion = "v1.5.3"
_detalhes.version = "Alpha 009"
_detalhes.realversion = 9
_detalhes.userversion = "v1.6.0"
_detalhes.version = "Alpha 010"
_detalhes.realversion = 10
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialization stuff
+81 -73
View File
@@ -135,7 +135,8 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
dead = 0, --> armazena quantas vezes essa pessia morreu
cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou
buff_uptime = 0 --> armazena quantos cooldowns a raid usou
buff_uptime = 0, --> armazena quantos cooldowns a raid usou
debuff_uptime = 0 --> armazena quantos cooldowns a raid usou
}
}
@@ -155,7 +156,8 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
dead = 0, --> armazena quantas vezes essa oessia morreu
cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou
buff_uptime = 0
buff_uptime = 0,
debuff_uptime = 0
}
}
@@ -266,94 +268,31 @@ function _detalhes.clear:c_combate (tabela_combate)
tabela_combate.shadow = nil
end
combate.__add = function (combate1, combate2)
--> add dano
for index, actor_T2 in _ipairs (combate2[1]._ActorTable) do
local actor_T1 = combate1[1]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 + actor_T2
end
--> add heal
for index, actor_T2 in _ipairs (combate2[2]._ActorTable) do
local actor_T1 = combate1[2]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 + actor_T2
end
--> add energy
for index, actor_T2 in _ipairs (combate2[3]._ActorTable) do
local actor_T1 = combate1[3]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 + actor_T2
end
--> add misc
for index, actor_T2 in _ipairs (combate2[4]._ActorTable) do
local actor_T1 = combate1[4]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 + actor_T2
end
--> aumenta o total
combate1.totals[1] = combate1.totals[1] - combate2.totals[1]
combate1.totals[2] = combate1.totals[2] - combate2.totals[2]
combate1.totals[3].mana = combate1.totals[3].mana - combate2.totals[3].mana
combate1.totals[3].e_rage = combate1.totals[3].e_rage - combate2.totals[3].e_rage
combate1.totals[3].e_energy = combate1.totals[3].e_energy - combate2.totals[3].e_energy
combate1.totals[3].runepower = combate1.totals[3].runepower - combate2.totals[3].runepower
combate1.totals[4].cc_break = combate1.totals[4].cc_break - combate2.totals[4].cc_break
combate1.totals[4].ress = combate1.totals[4].ress - combate2.totals[4].ress
combate1.totals[4].interrupt = combate1.totals[4].interrupt - combate2.totals[4].interrupt
combate1.totals[4].dispell = combate1.totals[4].dispell - combate2.totals[4].dispell
combate1.totals[4].dead = combate1.totals[4].dead - combate2.totals[4].dead
combate1.totals[4].cooldowns_defensive = combate1.totals[4].cooldowns_defensive - combate2.totals[4].cooldowns_defensive
combate1.totals_grupo[1] = combate1.totals_grupo[1] - combate2.totals_grupo[1]
combate1.totals_grupo[2] = combate1.totals_grupo[2] - combate2.totals_grupo[2]
combate1.totals_grupo[3].mana = combate1.totals_grupo[3].mana - combate2.totals_grupo[3].mana
combate1.totals_grupo[3].e_rage = combate1.totals_grupo[3].e_rage - combate2.totals_grupo[3].e_rage
combate1.totals_grupo[3].e_energy = combate1.totals_grupo[3].e_energy - combate2.totals_grupo[3].e_energy
combate1.totals_grupo[3].runepower = combate1.totals_grupo[3].runepower - combate2.totals_grupo[3].runepower
combate1.totals_grupo[4].cc_break = combate1.totals_grupo[4].cc_break - combate2.totals_grupo[4].cc_break
combate1.totals_grupo[4].ress = combate1.totals_grupo[4].ress - combate2.totals_grupo[4].ress
combate1.totals_grupo[4].interrupt = combate1.totals_grupo[4].interrupt - combate2.totals_grupo[4].interrupt
combate1.totals_grupo[4].dispell = combate1.totals_grupo[4].dispell - combate2.totals_grupo[4].dispell
combate1.totals_grupo[4].dead = combate1.totals_grupo[4].dead - combate2.totals_grupo[4].dead
combate1.totals_grupo[4].cooldowns_defensive = combate1.totals_grupo[4].cooldowns_defensive - combate2.totals_grupo[4].cooldowns_defensive
--> aumenta o tempo
combate1.start_time = combate1.start_time - (combate2.end_time - combate2.start_time)
--> frags
for fragName, fragAmount in pairs (combate2.frags) do
if (fragAmount) then
if (combate1.frags [fragName]) then
combate1.frags [fragName] = combate1.frags [fragName] + fragAmount
else
combate1.frags [fragName] = fragAmount
end
end
end
combate1.frags_need_refresh = true
return combate1
end
combate.__sub = function (overall, combate)
--> foreach no dano
for index, classe_damage in _ipairs (combate[1]._ActorTable) do
--> subtrai no damage
for index, classe_damage in _ipairs (combate [1]._ActorTable) do
local nome = classe_damage.nome
local no_overall = overall[1]._ActorTable [overall[1]._NameIndexTable [nome]]
--> ator do damage
no_overall = no_overall - classe_damage
--> alvos
local alvos = classe_damage.targets
for index, alvo in _ipairs (alvos._ActorTable) do
local alvo_overall = no_overall.targets._ActorTable [no_overall.targets._NameIndexTable [alvo.nome]]
alvo_overall = alvo_overall - alvo
end
--> habilidades
local habilidades = classe_damage.spell_tables
for _spellid, habilidade in _pairs (habilidades._ActorTable) do
local habilidade_overall = no_overall.spell_tables._ActorTable [_spellid]
habilidade_overall = habilidade_overall - habilidade
--> alvos das habilidades
local alvos = habilidade.targets
for index, alvo in _ipairs (alvos._ActorTable) do
local alvo_overall = habilidade_overall.targets._ActorTable [habilidade_overall.targets._NameIndexTable [alvo.nome]]
@@ -566,6 +505,75 @@ combate.__sub = function (overall, combate)
return overall
end
combate.__add = function (combate1, combate2)
--> add dano
for index, actor_T2 in _ipairs (combate2[1]._ActorTable) do
local actor_T1 = combate1[1]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 + actor_T2
end
--> add heal
for index, actor_T2 in _ipairs (combate2[2]._ActorTable) do
local actor_T1 = combate1[2]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 + actor_T2
end
--> add energy
for index, actor_T2 in _ipairs (combate2[3]._ActorTable) do
local actor_T1 = combate1[3]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 + actor_T2
end
--> add misc
for index, actor_T2 in _ipairs (combate2[4]._ActorTable) do
local actor_T1 = combate1[4]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 + actor_T2
end
--> aumenta o total
combate1.totals[1] = combate1.totals[1] - combate2.totals[1]
combate1.totals[2] = combate1.totals[2] - combate2.totals[2]
combate1.totals[3].mana = combate1.totals[3].mana - combate2.totals[3].mana
combate1.totals[3].e_rage = combate1.totals[3].e_rage - combate2.totals[3].e_rage
combate1.totals[3].e_energy = combate1.totals[3].e_energy - combate2.totals[3].e_energy
combate1.totals[3].runepower = combate1.totals[3].runepower - combate2.totals[3].runepower
combate1.totals[4].cc_break = combate1.totals[4].cc_break - combate2.totals[4].cc_break
combate1.totals[4].ress = combate1.totals[4].ress - combate2.totals[4].ress
combate1.totals[4].interrupt = combate1.totals[4].interrupt - combate2.totals[4].interrupt
combate1.totals[4].dispell = combate1.totals[4].dispell - combate2.totals[4].dispell
combate1.totals[4].dead = combate1.totals[4].dead - combate2.totals[4].dead
combate1.totals[4].cooldowns_defensive = combate1.totals[4].cooldowns_defensive - combate2.totals[4].cooldowns_defensive
combate1.totals_grupo[1] = combate1.totals_grupo[1] - combate2.totals_grupo[1]
combate1.totals_grupo[2] = combate1.totals_grupo[2] - combate2.totals_grupo[2]
combate1.totals_grupo[3].mana = combate1.totals_grupo[3].mana - combate2.totals_grupo[3].mana
combate1.totals_grupo[3].e_rage = combate1.totals_grupo[3].e_rage - combate2.totals_grupo[3].e_rage
combate1.totals_grupo[3].e_energy = combate1.totals_grupo[3].e_energy - combate2.totals_grupo[3].e_energy
combate1.totals_grupo[3].runepower = combate1.totals_grupo[3].runepower - combate2.totals_grupo[3].runepower
combate1.totals_grupo[4].cc_break = combate1.totals_grupo[4].cc_break - combate2.totals_grupo[4].cc_break
combate1.totals_grupo[4].ress = combate1.totals_grupo[4].ress - combate2.totals_grupo[4].ress
combate1.totals_grupo[4].interrupt = combate1.totals_grupo[4].interrupt - combate2.totals_grupo[4].interrupt
combate1.totals_grupo[4].dispell = combate1.totals_grupo[4].dispell - combate2.totals_grupo[4].dispell
combate1.totals_grupo[4].dead = combate1.totals_grupo[4].dead - combate2.totals_grupo[4].dead
combate1.totals_grupo[4].cooldowns_defensive = combate1.totals_grupo[4].cooldowns_defensive - combate2.totals_grupo[4].cooldowns_defensive
--> aumenta o tempo
combate1.start_time = combate1.start_time - (combate2.end_time - combate2.start_time)
--> frags
for fragName, fragAmount in pairs (combate2.frags) do
if (fragAmount) then
if (combate1.frags [fragName]) then
combate1.frags [fragName] = combate1.frags [fragName] + fragAmount
else
combate1.frags [fragName] = fragAmount
end
end
end
combate1.frags_need_refresh = true
return combate1
end
function _detalhes:UpdateCombat()
_tempo = _detalhes._tempo
end
+66
View File
@@ -2205,6 +2205,72 @@ function atributo_damage:Iniciar (iniciar)
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core functions
--> diminui o total das tabelas do combate
function atributo_damage:subtract_total (combat_table)
combat_table.totals [class_type] = combat_table.totals [class_type] - self.total
if (self.grupo) then
combat_table.totals_grupo [class_type] = combat_table.totals_grupo [class_type] - self.total
end
end
--> restaura a tabela de last event
function atributo_damage:r_last_events_table (actor)
if (not actor) then
actor = self
end
actor.last_events_table = _detalhes:CreateActorLastEventTable()
end
--> restaura e liga o ator com a sua shadow durante a inicialização
function atributo_damage:r_connect_shadow (actor)
if (not actor) then
actor = self
end
local overall_dano = _detalhes.tabela_overall [1]
local shadow = overall_dano._ActorTable [overall_dano._NameIndexTable [actor.nome]]
--> constroi a shadow se não tiver uma
if (not shadow) then
shadow = overall_dano:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
shadow.classe = actor.classe
shadow.start_time = time()
shadow.end_time = time()
end
--> reconstruir o container do friendly fire shadow
for index, friendlyfire in _ipairs (actor.friendlyfire._ActorTable) do
local ff_shadow = shadow.friendlyfire:PegarCombatente (friendlyfire.serial, friendlyfire.nome, friendlyfire.flag_original, true)
friendlyfire.shadow = ff_shadow
--nao reconstroi as habilidades aqui
end
--> aplica a meta e indexes
_detalhes.refresh:r_atributo_damage (actor, shadow)
--> soma os valores
shadow = shadow + actor
--> reconstroi o container de alvos
for index, alvo in _ipairs (actor.targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
--> reconstroi o container de habilidades
for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do
_detalhes.refresh:r_habilidade_dano (habilidade, shadow.spell_tables)
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade.targets.shadow)
end
end
return shadow
end
function atributo_damage:FF_funcao_de_criacao (_, _, link)
local tabela = _setmetatable ({}, _detalhes) --> mudei de _detalhes para atributo_damage
tabela.total = 0
+56
View File
@@ -858,6 +858,62 @@ function atributo_energy:Iniciar (iniciar)
return false --retorna se o dps esta aberto ou fechado para este jogador
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core functions
--> subtract total from a combat table
function atributo_energy:subtract_total (combat_table)
combat_table.totals [class_type].mana = combat_table.totals [class_type].mana - self.mana
combat_table.totals [class_type].e_rage = combat_table.totals [class_type].e_rage - self.e_rage
combat_table.totals [class_type].e_energy = combat_table.totals [class_type].e_energy - self.e_energy
combat_table.totals [class_type].runepower = combat_table.totals [class_type].runepower - self.runepower
if (self.grupo) then
combat_table.totals_grupo [class_type].mana = combat_table.totals_grupo [class_type].mana - self.mana
combat_table.totals_grupo [class_type].e_rage = combat_table.totals_grupo [class_type].e_rage - self.e_rage
combat_table.totals_grupo [class_type].e_energy = combat_table.totals_grupo [class_type].e_energy - self.e_energy
combat_table.totals_grupo [class_type].runepower = combat_table.totals_grupo [class_type].runepower - self.runepower
end
end
--> restaura e liga o ator com a sua shadow durante a inicialização
function atributo_energy:r_connect_shadow (actor)
if (not actor) then
actor = self
end
local overall_energy = _detalhes.tabela_overall [3]
local shadow = overall_energy._ActorTable [overall_energy._NameIndexTable [actor.nome]]
--> constroi a shadow se não tiver uma
if (not shadow) then
shadow = overall_energy:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
shadow.classe = actor.classe
end
--> aplica a meta e indexes
_detalhes.refresh:r_atributo_energy (actor, shadow)
--> soma os valores
shadow = shadow + actor
--> reconstroi o container de alvos
for index, alvo in _ipairs (actor.targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
--> reconstroi o container de habilidades
for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do
_detalhes.refresh:r_habilidade_e_energy (habilidade, shadow.spell_tables)
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade.targets.shadow)
end
end
return shadow
end
function atributo_energy:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
+59
View File
@@ -1577,6 +1577,65 @@ function atributo_heal:Iniciar (iniciar)
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core functions
--> subtract total from a combat table
function atributo_heal:subtract_total (combat_table)
combat_table.totals [class_type] = combat_table.totals [class_type] - self.total
if (self.grupo) then
combat_table.totals_grupo [class_type] = combat_table.totals_grupo [class_type] - self.total
end
end
--> restaura a tabela de last event
function atributo_heal:r_last_events_table (actor)
if (not actor) then
actor = self
end
actor.last_events_table = _detalhes:CreateActorLastEventTable()
end
--> restaura e liga o ator com a sua shadow durante a inicialização
function atributo_heal:r_connect_shadow (actor)
if (not actor) then
actor = self
end
local overall_cura = _detalhes.tabela_overall [2]
local shadow = overall_cura._ActorTable [overall_cura._NameIndexTable [actor.nome]]
--> constroi a shadow se não tiver uma
if (not shadow) then
shadow = overall_cura:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
shadow.classe = actor.classe
shadow.start_time = time()
shadow.end_time = time()
end
--> aplica a meta e indexes
_detalhes.refresh:r_atributo_heal (actor, shadow)
--> soma os valores
shadow = shadow + actor
--> reconstroi o container de alvos
for index, alvo in _ipairs (actor.targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (alvo, shadow.targets)
end
--> reconstroi o container de habilidades
for spellid, habilidade in _pairs (actor.spell_tables._ActorTable) do
_detalhes.refresh:r_habilidade_cura (habilidade, shadow.spell_tables)
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (alvo, habilidade.targets.shadow)
end
end
return shadow
end
function atributo_heal:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
+29 -7
View File
@@ -1080,8 +1080,10 @@ function _detalhes:Freeze (instancia)
gump:Fade (instancia, "in", nil, "barras")
end
instancia.freeze_icon:Show()
instancia.freeze_texto:Show()
instancia:InstanceMsg (Loc ["STRING_FREEZE"], [[Interface\CHARACTERFRAME\Disconnect-Icon]], "silver")
--instancia.freeze_icon:Show()
--instancia.freeze_texto:Show()
local width = instancia:GetSize()
instancia.freeze_texto:SetWidth (width-64)
@@ -1095,8 +1097,10 @@ function _detalhes:UnFreeze (instancia)
instancia = self
end
instancia.freeze_icon:Hide()
instancia.freeze_texto:Hide()
self:InstanceMsg (false)
--instancia.freeze_icon:Hide()
--instancia.freeze_texto:Hide()
instancia.freezed = false
if (not _detalhes.initializing) then
@@ -1366,11 +1370,15 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
if (sub_atributo ~= meu_sub_atributo or _detalhes.initializing or iniciando_instancia or atributo_changed) then
--instancia.sub_atributo_last [meu_atributo] = sub_atributo
instancia.sub_atributo_last [meu_atributo] = meu_sub_atributo
--print ("atributo last changed:",meu_atributo, "->", meu_sub_atributo)
instancia.sub_atributo = sub_atributo
--print (instancia.sub_atributo_last [meu_atributo])
--print (instancia.sub_atributo)
if (instancia.atributo == 5) then --> custom
instancia:ChangeIcon()
end
@@ -1446,15 +1454,29 @@ function _detalhes:MontaAtributosOption (instancia, func)
local CoolTip = _G.GameCooltip
local p = 0.125 --> 32/256
local gindex = 1
for i = 1, atributos[0] do --> [0] armazena quantos atributos existem
CoolTip:AddMenu (1, func, nil, i, nil, atributos.lista[i], nil, true)
CoolTip:AddIcon ("Interface\\AddOns\\Details\\images\\atributos_icones", 1, 1, 20, 20, p*(i-1), p*(i), 0, 1)
local options = sub_atributos [i].lista
for o = 1, atributos [i] do
CoolTip:AddMenu (2, func, nil, i, o, options[o], nil, true)
CoolTip:AddIcon (icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1)
if (_detalhes:CaptureIsEnabled ( _detalhes.atributos_capture [gindex] )) then
CoolTip:AddMenu (2, func, nil, i, o, options[o], nil, true)
CoolTip:AddIcon (icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1)
else
CoolTip:AddLine (options[o], nil, 2, .5, .5, .5, 1)
CoolTip:AddMenu (2, func, nil, i, o)
CoolTip:AddIcon (icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1, {.3, .3, .3, 1})
end
gindex = gindex + 1
end
CoolTip:SetLastSelected (2, i, instancia.sub_atributo_last [i])
end
--> custom
@@ -1466,7 +1488,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
CoolTip:AddMenu (2, func, nil, 5, index, custom.name, custom.icon, true)
end
if (not instancia.sub_atributo_last [5]) then
if (#_detalhes.custom == 0) then
CoolTip:SetLastSelected (2, 5, 1)
else
CoolTip:SetLastSelected (2, 5, instancia.sub_atributo_last [5]+1)
+412
View File
@@ -310,6 +310,27 @@ function atributo_misc:ReportSingleBuffUptimeLine (misc_actor, instancia)
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
function atributo_misc:ReportSingleDebuffUptimeLine (misc_actor, instancia)
local barra = misc_actor.minha_barra
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEBUFFUPTIME"] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me
reportar [#reportar+1] = "> " .. Loc ["STRING_SPELLS"] .. ":"
for i = 1, GameCooltip:GetNumLines() do
local texto_left, texto_right = GameCooltip:GetText (i)
if (texto_left and texto_right) then
texto_left = texto_left:gsub (("|T(.*)|t "), "")
reportar [#reportar+1] = " "..texto_left.." "..texto_right..""
elseif (i ~= 1) then
reportar [#reportar+1] = "> " .. Loc ["STRING_TARGETS"] .. ":"
end
end
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
function atributo_misc:DeadAtualizarBarra (morte, qual_barra, colocacao, instancia)
morte ["dead"] = true --> marca que esta tabela é uma tabela de mortes, usado no controla na hora de montar o tooltip
@@ -383,6 +404,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
keyName = "cooldowns_defensive"
elseif (sub_atributo == 7) then --> BUFF UPTIME
keyName = "buff_uptime"
elseif (sub_atributo == 8) then --> DEBUFF UPTIME
keyName = "debuff_uptime"
end
else
keyName = exportar.key
@@ -410,6 +433,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
keyName = "cooldowns_defensive"
elseif (sub_atributo == 7) then --> BUFF UPTIME
keyName = "buff_uptime"
elseif (sub_atributo == 8) then --> DEBUFF UPTIME
keyName = "debuff_uptime"
end
end
@@ -789,6 +814,8 @@ function atributo_misc:ToolTip (instancia, numero, barra)
return self:ToolTipDefensiveCooldowns (instancia, numero, barra)
elseif (instancia.sub_atributo == 7) then --> buff uptime
return self:ToolTipBuffUptime (instancia, numero, barra)
elseif (instancia.sub_atributo == 8) then --> debuff uptime
return self:ToolTipDebuffUptime (instancia, numero, barra)
end
end
--> tooltip locals
@@ -948,6 +975,111 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
return true
end
local UnitReaction = UnitReaction
function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
if (in_or_out == "DEBUFF_UPTIME_OUT") then
local combat = _detalhes.tabela_vigente
local misc_container = combat [4]._ActorTable
for _, actor in _ipairs (misc_container) do
if (actor.debuff_uptime) then
for spellid, spell in _pairs (actor.debuff_uptime_spell_tables._ActorTable) do
if (spell.actived and spell.actived_at) then
spell.uptime = spell.uptime + _detalhes._tempo - spell.actived_at
actor.debuff_uptime = actor.debuff_uptime + _detalhes._tempo - spell.actived_at --> token = actor misc object
spell.actived = false
spell.actived_at = nil
end
end
end
end
return
end
if (_IsInRaid()) then
local checked = {}
for raidIndex = 1, _GetNumGroupMembers() do
local his_target = _UnitGUID ("raid"..raidIndex.."target")
if (his_target and not checked [his_target] and UnitReaction ("raid"..raidIndex.."target", "player") <= 4) then
checked [his_target] = true
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("raid"..raidIndex.."target", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
_detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("raid"..raidIndex.."target"), 0x842, spellid, name, in_or_out)
end
end
end
end
elseif (_IsInGroup()) then
local checked = {}
for raidIndex = 1, _GetNumGroupMembers()-1 do
local his_target = _UnitGUID ("party"..raidIndex.."target")
if (his_target and not checked [his_target] and UnitReaction ("party"..raidIndex.."target", "player") <= 4) then
checked [his_target] = true
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
_detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("party"..raidIndex.."target"), 0x842, spellid, name, in_or_out)
end
end
end
end
local his_target = _UnitGUID ("playertarget")
if (his_target and not checked [his_target] and UnitReaction ("playertarget", "player") <= 4) then
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
_detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("playertarget"), 0x842, spellid, name, in_or_out)
end
end
end
else
local his_target = _UnitGUID ("playertarget")
if (his_target and UnitReaction ("playertarget", "player") <= 4) then
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
_detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("playertarget"), 0x842, spellid, name, in_or_out)
end
end
end
end
end
function _detalhes:CatchRaidBuffUptime (in_or_out)
if (_IsInRaid()) then
@@ -1027,6 +1159,63 @@ local Sort2Reverse = function (a, b)
return a[2] < b[2]
end
function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
end
local meu_total = self ["debuff_uptime"]
local minha_tabela = self.debuff_uptime_spell_tables._ActorTable
--> habilidade usada para interromper
local debuffs_usados = {}
local _combat_time = instancia.showing:GetCombatTime()
for _spellid, _tabela in _pairs (minha_tabela) do
debuffs_usados [#debuffs_usados+1] = {_spellid, _tabela.uptime}
end
--_table_sort (debuffs_usados, Sort2Reverse)
_table_sort (debuffs_usados, _detalhes.Sort2)
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_Safeguard]], 1, 1, 14, 14, 0.9375, 0.078125, 0.078125, 0.953125)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#debuffs_usados > 0) then
for i = 1, _math_min (30, #debuffs_usados) do
local esta_habilidade = debuffs_usados[i]
if (esta_habilidade[2] > 0) then
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
local minutos, segundos = _math_floor (esta_habilidade[2]/60), _math_floor (esta_habilidade[2]%60)
if (esta_habilidade[2] >= _combat_time) then
GameCooltip:AddLine (nome_magia..": ", minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
GameCooltip:AddStatusBar (100, nil, 1, 0, 1, .3, false)
elseif (minutos > 0) then
GameCooltip:AddLine (nome_magia..": ", minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
else
GameCooltip:AddLine (nome_magia..": ", segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) --0.03125, 0.96875, 0.03125, 0.96875
end
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
end
return true
end
function atributo_misc:ToolTipBuffUptime (instancia, numero, barra)
local owner = self.owner
@@ -1601,6 +1790,163 @@ function atributo_misc:Iniciar (iniciar)
return false --retorna se o dps esta aberto ou fechado para este jogador
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core functions
local sub_list = {"cc_break", "ress", "interrupt", "cooldowns_defensive", "dispell", "dead"}
--> subtract total from a combat table
function atributo_misc:subtract_total (combat_table)
for _, sub_attribute in _ipairs (sub_list) do
if (self [sub_attribute]) then
combat_table.totals [class_type][sub_attribute] = combat_table.totals [class_type][sub_attribute] - self [sub_attribute]
if (self.grupo) then
combat_table.totals_grupo [class_type][sub_attribute] = combat_table.totals_grupo [class_type][sub_attribute] - self [sub_attribute]
end
end
end
end
--> restaura e liga o ator com a sua shadow durante a inicialização
function atributo_misc:r_connect_shadow (actor)
if (not actor) then
actor = self
end
local overall_misc = _detalhes.tabela_overall [4]
local shadow = overall_misc._ActorTable [overall_misc._NameIndexTable [actor.nome]]
if (not actor.nome) then
actor.nome = "unknown"
end
--> constroi a shadow se não tiver uma
if (not shadow) then
shadow = overall_misc:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
shadow.classe = actor.classe
end
--> cooldowns
if (actor.cooldowns_defensive) then
if (not shadow.cooldowns_defensive_targets) then
shadow.cooldowns_defensive = 0
shadow.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target)
shadow.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
end
--> buff uptime
if (actor.buff_uptime) then
if (not shadow.buff_uptime_spell_targets) then
shadow.buff_uptime = 0
shadow.buff_uptime_spell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.buff_uptime_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
end
end
--> debuff uptime
if (actor.debuff_uptime) then
if (not shadow.debuff_uptime_spell_targets) then
shadow.debuff_uptime = 0
shadow.debuff_uptime_spell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
end
end
--> interrupt
if (actor.interrupt) then
if (not shadow.interrupt_targets) then
shadow.interrupt = 0
shadow.interrupt_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.interrupt_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
shadow.interrompeu_oque = {}
end
end
--> ress
if (actor.ress) then
if (not shadow.ress_targets) then
shadow.ress = 0
shadow.ress_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.ress_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
end
end
--> dispell
if (actor.dispell) then
if (not shadow.dispell_targets) then
shadow.dispell = 0
shadow.dispell_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.dispell_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
shadow.dispell_oque = {}
end
end
--> cc break
if (actor.cc_break) then
if (not shadow.cc_break) then
shadow.cc_break = 0
shadow.cc_break_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.cc_break_spell_tables = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --> cria o container das habilidades usadas para interromper
shadow.cc_break_oque = {}
end
end
--> aplica a meta e indexes
_detalhes.refresh:r_atributo_misc (actor, shadow)
--> soma os valores
shadow = shadow + actor
if (actor.interrupt) then
for _, este_alvo in _ipairs (actor.interrupt_targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.interrupt_targets)
end
end
if (actor.buff_uptime) then
for _, este_alvo in _ipairs (actor.buff_uptime_targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.buff_uptime_targets)
end
end
if (actor.debuff_uptime) then
for _, este_alvo in _ipairs (actor.debuff_uptime_targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.debuff_uptime_targets)
end
end
if (actor.cooldowns_defensive) then
for _, este_alvo in _ipairs (actor.cooldowns_defensive_targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.cooldowns_defensive_targets)
end
end
if (actor.ress) then
for _, este_alvo in _ipairs (actor.ress_targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.ress_targets)
end
end
if (actor.dispell) then
for _, este_alvo in _ipairs (actor.dispell_targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.dispell_targets)
end
end
if (actor.cc_break) then
for _, este_alvo in _ipairs (actor.cc_break_targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, shadow.cc_break_targets)
end
end
--> reconstroi o container de alvos
local t = {"cc_break", "ress", "interrupt", "cooldowns_defensive", "dispell", "buff_uptime", "debuff_uptime"}
for index, sub_attribute in _ipairs (t) do
if (actor [sub_attribute]) then
for spellid, habilidade in _pairs (actor [sub_attribute .. "_spell_tables"]._ActorTable) do
_detalhes.refresh:r_habilidade_misc (habilidade, shadow [sub_attribute .. "_spell_tables"])
for _, este_alvo in _ipairs (habilidade.targets._ActorTable) do
_detalhes.refresh:r_alvo_da_habilidade (este_alvo, habilidade.targets.shadow)
end
end
end
end
return shadow
end
function atributo_misc:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
@@ -1632,6 +1978,12 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
_detalhes.refresh:r_container_habilidades (este_jogador.buff_uptime_spell_tables, shadow.buff_uptime_spell_tables)
end
--> refresh buff uptime
if (este_jogador.debuff_uptime_targets) then
_detalhes.refresh:r_container_combatentes (este_jogador.debuff_uptime_targets, shadow.debuff_uptime_targets)
_detalhes.refresh:r_container_habilidades (este_jogador.debuff_uptime_spell_tables, shadow.debuff_uptime_spell_tables)
end
--> refresh cooldowns defensive
if (este_jogador.cooldowns_defensive_targets) then
_detalhes.refresh:r_container_combatentes (este_jogador.cooldowns_defensive_targets, shadow.cooldowns_defensive_targets)
@@ -1675,6 +2027,12 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
_detalhes.refresh:r_container_habilidades (este_jogador.buff_uptime_spell_tables, -1)
end
--> refresh debuff uptime
if (este_jogador.debuff_uptime_targets) then
_detalhes.refresh:r_container_combatentes (este_jogador.debuff_uptime_targets, -1)
_detalhes.refresh:r_container_habilidades (este_jogador.debuff_uptime_spell_tables, -1)
end
--> refresh ressers
if (este_jogador.ress_targets) then
_detalhes.refresh:r_container_combatentes (este_jogador.ress_targets, -1)
@@ -1718,6 +2076,11 @@ function _detalhes.clear:c_atributo_misc (este_jogador)
_detalhes.clear:c_container_habilidades (este_jogador.buff_uptime_spell_tables)
end
if (este_jogador.debuff_uptime_targets) then
_detalhes.clear:c_container_combatentes (este_jogador.debuff_uptime_targets)
_detalhes.clear:c_container_habilidades (este_jogador.debuff_uptime_spell_tables)
end
if (este_jogador.ress_targets) then
_detalhes.clear:c_container_combatentes (este_jogador.ress_targets)
_detalhes.clear:c_container_habilidades (este_jogador.ress_spell_tables)
@@ -1840,6 +2203,51 @@ atributo_misc.__add = function (shadow, tabela2)
end
if (tabela2.debuff_uptime) then
if (not shadow.debuff_uptime) then
shadow.debuff_uptime = 0
shadow.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas
end
shadow.debuff_uptime = shadow.debuff_uptime + tabela2.debuff_uptime
if ( not (shadow.shadow and tabela2.shadow) ) then
--_detalhes.tabela_overall.totals[4]["cooldowns_defensive"] = _detalhes.tabela_overall.totals[4]["cooldowns_defensive"] + tabela2.cooldowns_defensive
--if (tabela2.grupo) then
-- _detalhes.tabela_overall.totals_grupo[4]["cooldowns_defensive"] = _detalhes.tabela_overall.totals_grupo[4]["cooldowns_defensive"] + tabela2.cooldowns_defensive
--end
end
for index, alvo in _ipairs (tabela2.debuff_uptime_targets._ActorTable) do
local alvo_shadow = shadow.debuff_uptime_targets:PegarCombatente (alvo.serial, alvo.nome, alvo.flag_original, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
end
for spellid, habilidade in _pairs (tabela2.debuff_uptime_spell_tables._ActorTable) do
local habilidade_shadow = shadow.debuff_uptime_spell_tables:PegaHabilidade (spellid, true, nil, true)
for index, alvo in _ipairs (habilidade.targets._ActorTable) do
local alvo_shadow = habilidade_shadow.targets:PegarCombatente (alvo.serial, alvo.nome, alvo.flag_original, true)
alvo_shadow.total = alvo_shadow.total + alvo.total
end
for key, value in _pairs (habilidade) do
if (_type (value) == "number") then
if (key ~= "id") then
if (not habilidade_shadow [key]) then
habilidade_shadow [key] = 0
end
habilidade_shadow [key] = habilidade_shadow [key] + value
end
end
end
end
end
if (tabela2.cooldowns_defensive) then
if (not shadow.cooldowns_defensive) then
@@ -2066,6 +2474,10 @@ atributo_misc.__sub = function (tabela1, tabela2)
tabela1.buff_uptime = tabela1.buff_uptime - tabela2.buff_uptime
end
if (tabela1.debuff_uptime and tabela2.debuff_uptime) then
tabela1.debuff_uptime = tabela1.debuff_uptime - tabela2.debuff_uptime
end
if (tabela1.cooldowns_defensive and tabela2.cooldowns_defensive) then
tabela1.cooldowns_defensive = tabela1.cooldowns_defensive - tabela2.cooldowns_defensive
end
+38 -8
View File
@@ -23,9 +23,10 @@ function habilidade_misc:NovaTabela (id, link, token) --aqui eu n
targets = container_combatentes:NovoContainer (container_misc_target)
}
if (token == "BUFF_UPTIME") then
if (token == "BUFF_UPTIME" or token == "DEBUFF_UPTIME") then
_newMiscSpell.uptime = 0
_newMiscSpell.actived = false
_newMiscSpell.activedamt = 0
elseif (token == "SPELL_INTERRUPT") then
_newMiscSpell.interrompeu_oque = {}
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
@@ -46,7 +47,7 @@ end
function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spellName)
--alvo:AddQuantidade (1)
if (spellID == "BUFF") then
if (spellID == "BUFF_OR_DEBUFF") then
if (spellName == "COOLDOWN") then
self.counter = self.counter + 1
@@ -59,11 +60,11 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
end
alvo.total = alvo.total + 1
elseif (spellName == "BUFF_UPTIME_IN") then
elseif (spellName == "BUFF_UPTIME_IN" or spellName == "DEBUFF_UPTIME_IN") then
self.actived = true
self.activedamt = self.activedamt + 1
self.actived_at = _detalhes._tempo
--print ("in",self.uptime)
elseif (spellName == "BUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
@@ -76,7 +77,18 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
--print ("refresh",self.uptime)
elseif (spellName == "DEBUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
end
self.actived_at = _detalhes._tempo
self.actived = true
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
elseif (spellName == "BUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
@@ -90,7 +102,25 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
--print ("out",self.uptime)
elseif (spellName == "DEBUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
end
self.activedamt = self.activedamt - 1
if (self.activedamt == 0) then
self.actived = false
self.actived_at = nil
else
self.actived_at = _detalhes._tempo
end
if (self.shadow) then
return self.shadow:Add (serial, nome, flag, who_nome, token.shadow, spellID, spellName)
end
end
elseif (token == "SPELL_INTERRUPT") then
@@ -207,7 +237,7 @@ habilidade_misc.__sub = function (tabela1, tabela2)
--interrupts & cooldowns
tabela1.counter = tabela1.counter - tabela2.counter
--buff uptime
--buff uptime ou debuff uptime
if (tabela1.uptime and tabela2.uptime) then
tabela1.uptime = tabela1.uptime - tabela2.uptime
end
+8
View File
@@ -66,6 +66,7 @@ function container_combatentes:NovoContainer (tipo_do_container, combatTable, co
end
local function get_class_ (novo_objeto, nome, flag)
local _, engClass = _UnitClass (nome)
if (engClass) then
@@ -461,6 +462,13 @@ function container_combatentes:FuncaoDeCriacao (tipo)
end
end
--> chama a função para ser executada em todos os atores
function container_combatentes:ActorCallFunction (funcao, ...)
for index, actor in _ipairs (self._ActorTable) do
funcao (nil, actor, ...)
end
end
function container_combatentes:remapear()
local mapa = self._NameIndexTable
local conteudo = self._ActorTable
+9 -4
View File
@@ -90,7 +90,7 @@
if (serial) then
local ZoneName, _, _, _, _, _, _, ZoneMapID = _GetInstanceInfo()
local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
local BossIds = _detalhes:GetBossIds (ZoneMapID)
if (BossIds) then
@@ -148,7 +148,8 @@
name = _detalhes:GetBossName (ZoneMapID, BossIndex),
zone = ZoneName,
mapid = ZoneMapID,
encounter = _detalhes:GetBossName (ZoneMapID, BossIndex)
encounter = _detalhes:GetBossName (ZoneMapID, BossIndex),
diff = DifficultyID
}
_detalhes:SendEvent ("COMBAT_BOSS_FOUND", nil, _detalhes.tabela_vigente.is_boss.index, _detalhes.tabela_vigente.is_boss.name)
return _detalhes.tabela_vigente.is_boss
@@ -163,7 +164,7 @@
--try to get the encounter name after the encounter (can be called during the combat as well)
function _detalhes:FindBoss()
local ZoneName, _, _, _, _, _, _, ZoneMapID = _GetInstanceInfo()
local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo()
local BossIds = _detalhes:GetBossIds (ZoneMapID)
if (BossIds) then
@@ -184,7 +185,9 @@
name =_detalhes:GetBossName (ZoneMapID, BossIndex),
zone = ZoneName,
mapid = ZoneMapID,
encounter = _detalhes:GetBossName (ZoneMapID, BossIndex)}
encounter = _detalhes:GetBossName (ZoneMapID, BossIndex),
diff = DifficultyID
}
end
end
end
@@ -277,6 +280,7 @@
end
_detalhes:CatchRaidBuffUptime ("BUFF_UPTIME_IN")
_detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_IN")
_detalhes:UptadeRaidMembersCache()
_detalhes:HaveOneCurrentInstance()
@@ -291,6 +295,7 @@
end
_detalhes:CatchRaidBuffUptime ("BUFF_UPTIME_OUT")
_detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_OUT")
--> 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
+414 -675
View File
File diff suppressed because it is too large Load Diff
+156 -65
View File
@@ -728,6 +728,15 @@
if (_in_combat) then
------------------------------------------------------------------------------------------------
--> buff uptime
if (_recording_buffs_and_debuffs) then
if (raid_members_cache [who_serial]) then
--> call record debuffs uptime
--[[not tail call, need to fix this]] parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_IN")
end
end
if (_recording_ability_with_buffs) then
if (who_name == _detalhes.playername) then
@@ -855,52 +864,64 @@
--> recording debuffs applied by player
elseif (tipo == "DEBUFF") then
if (_recording_ability_with_buffs and _in_combat) then
if (who_name == _detalhes.playername) then
--> record debuff uptime
local SoloDebuffUptime = _current_combat.SoloDebuffUptime
if (SoloDebuffUptime) then
local ThisDebuff = SoloDebuffUptime [spellid]
if (ThisDebuff and ThisDebuff.Active) then
ThisDebuff.refreshAmt = ThisDebuff.refreshAmt + 1
ThisDebuff.duration = ThisDebuff.duration + (_tempo - ThisDebuff.start)
ThisDebuff.start = _tempo
--> send event for plugins
_detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER")
end
if (_in_combat) then
------------------------------------------------------------------------------------------------
--> buff uptime
if (_recording_buffs_and_debuffs) then
if (raid_members_cache [who_serial]) then
--> call record debuffs uptime
--[[not tail call, need to fix this]] parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_REFRESH")
end
end
if (_recording_ability_with_buffs) then
if (who_name == _detalhes.playername) then
--> record debuff spell and attack power
local SoloDebuffPower = _current_combat.SoloDebuffPower
if (SoloDebuffPower) then
local ThisDebuff = SoloDebuffPower [spellid]
if (ThisDebuff) then
local ThisDebuffOnTarget = ThisDebuff [alvo_serial]
if (ThisDebuffOnTarget) then
local base, posBuff, negBuff = UnitAttackPower ("player")
local AttackPower = base+posBuff+negBuff
local base, posBuff, negBuff = UnitRangedAttackPower ("player")
local RangedAttackPower = base+posBuff+negBuff
local SpellPower = GetSpellBonusDamage (3)
local BuffsOn = {}
for BuffName, BuffTable in _pairs (_detalhes.Buffs.BuffsTable) do
if (BuffTable.active) then
BuffsOn [#BuffsOn+1] = BuffName
end
end
ThisDebuff [alvo_serial].power = math.max (AttackPower, RangedAttackPower, SpellPower)
ThisDebuff [alvo_serial].buffs = BuffsOn
--> record debuff uptime
local SoloDebuffUptime = _current_combat.SoloDebuffUptime
if (SoloDebuffUptime) then
local ThisDebuff = SoloDebuffUptime [spellid]
if (ThisDebuff and ThisDebuff.Active) then
ThisDebuff.refreshAmt = ThisDebuff.refreshAmt + 1
ThisDebuff.duration = ThisDebuff.duration + (_tempo - ThisDebuff.start)
ThisDebuff.start = _tempo
--> send event for plugins
_detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER")
end
end
--> record debuff spell and attack power
local SoloDebuffPower = _current_combat.SoloDebuffPower
if (SoloDebuffPower) then
local ThisDebuff = SoloDebuffPower [spellid]
if (ThisDebuff) then
local ThisDebuffOnTarget = ThisDebuff [alvo_serial]
if (ThisDebuffOnTarget) then
local base, posBuff, negBuff = UnitAttackPower ("player")
local AttackPower = base+posBuff+negBuff
local base, posBuff, negBuff = UnitRangedAttackPower ("player")
local RangedAttackPower = base+posBuff+negBuff
local SpellPower = GetSpellBonusDamage (3)
local BuffsOn = {}
for BuffName, BuffTable in _pairs (_detalhes.Buffs.BuffsTable) do
if (BuffTable.active) then
BuffsOn [#BuffsOn+1] = BuffName
end
end
ThisDebuff [alvo_serial].power = math.max (AttackPower, RangedAttackPower, SpellPower)
ThisDebuff [alvo_serial].buffs = BuffsOn
--> send event for plugins
_detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER")
end
end
end
end
end
end
end
@@ -960,35 +981,48 @@
------------------------------------------------------------------------------------------------
--> recording debuffs applied by player
elseif (tipo == "DEBUFF") then
if (_recording_ability_with_buffs and _in_combat) then
if (who_name == _detalhes.playername) then
--> record debuff uptime
local SoloDebuffUptime = _current_combat.SoloDebuffUptime
local sendevent = false
if (SoloDebuffUptime) then
local ThisDebuff = SoloDebuffUptime [spellid]
if (ThisDebuff and ThisDebuff.Active) then
ThisDebuff.duration = ThisDebuff.duration + (_tempo - ThisDebuff.start)
ThisDebuff.droppedAmt = ThisDebuff.droppedAmt + 1
ThisDebuff.start = nil
ThisDebuff.Active = false
sendevent = true
end
if (_in_combat) then
------------------------------------------------------------------------------------------------
--> buff uptime
if (_recording_buffs_and_debuffs) then
if (raid_members_cache [who_serial]) then
--> call record debuffs uptime
--[[not tail call, need to fix this]] parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_OUT")
end
end
if (_recording_ability_with_buffs) then
if (who_name == _detalhes.playername) then
--> record debuff spell and attack power
local SoloDebuffPower = _current_combat.SoloDebuffPower
if (SoloDebuffPower) then
local ThisDebuff = SoloDebuffPower [spellid]
if (ThisDebuff) then
ThisDebuff [alvo_serial] = nil
sendevent = true
--> record debuff uptime
local SoloDebuffUptime = _current_combat.SoloDebuffUptime
local sendevent = false
if (SoloDebuffUptime) then
local ThisDebuff = SoloDebuffUptime [spellid]
if (ThisDebuff and ThisDebuff.Active) then
ThisDebuff.duration = ThisDebuff.duration + (_tempo - ThisDebuff.start)
ThisDebuff.droppedAmt = ThisDebuff.droppedAmt + 1
ThisDebuff.start = nil
ThisDebuff.Active = false
sendevent = true
end
end
--> record debuff spell and attack power
local SoloDebuffPower = _current_combat.SoloDebuffPower
if (SoloDebuffPower) then
local ThisDebuff = SoloDebuffPower [spellid]
if (ThisDebuff) then
ThisDebuff [alvo_serial] = nil
sendevent = true
end
end
if (sendevent) then
_detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER")
end
end
if (sendevent) then
_detalhes:SendEvent ("BUFF_UPDATE_DEBUFFPOWER")
end
end
end
@@ -999,6 +1033,55 @@
--> MISC search key: ~buffuptime ~buffsuptime |
-----------------------------------------------------------------------------------------------------------------------------------------
function parser:add_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, in_out)
------------------------------------------------------------------------------------------------
--> early checks and fixes
_current_misc_container.need_refresh = true
_overall_misc_container.need_refresh = true
------------------------------------------------------------------------------------------------
--> get actors
local este_jogador = misc_cache [who_name]
if (not este_jogador) then --> pode ser um desconhecido ou um pet
este_jogador = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
misc_cache [who_name] = este_jogador
end
local shadow = este_jogador.shadow
------------------------------------------------------------------------------------------------
--> build containers on the fly
if (not este_jogador.debuff_uptime) then
este_jogador.debuff_uptime = 0
este_jogador.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
este_jogador.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
if (not shadow.debuff_uptime_targets) then
shadow.debuff_uptime = 0
shadow.debuff_uptime_spell_tables = container_habilidades:NovoContainer (container_misc)
shadow.debuff_uptime_targets = container_combatentes:NovoContainer (container_damage_target)
end
este_jogador.debuff_uptime_targets.shadow = shadow.debuff_uptime_targets
este_jogador.debuff_uptime_spell_tables.shadow = shadow.debuff_uptime_spell_tables
end
------------------------------------------------------------------------------------------------
--> add amount
--> update last event
este_jogador.last_event = _tempo
--> actor spells table
local spell = este_jogador.debuff_uptime_spell_tables._ActorTable [spellid]
if (not spell) then
spell = este_jogador.debuff_uptime_spell_tables:PegaHabilidade (spellid, true, "DEBUFF_UPTIME")
end
return spell:Add (alvo_serial, alvo_name, alvo_flags, who_name, este_jogador, "BUFF_OR_DEBUFF", in_out)
end
function parser:add_buff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, in_out)
------------------------------------------------------------------------------------------------
@@ -1045,7 +1128,7 @@
if (not spell) then
spell = este_jogador.buff_uptime_spell_tables:PegaHabilidade (spellid, true, "BUFF_UPTIME")
end
return spell:Add (alvo_serial, alvo_name, alvo_flags, who_name, este_jogador, "BUFF", in_out)
return spell:Add (alvo_serial, alvo_name, alvo_flags, who_name, este_jogador, "BUFF_OR_DEBUFF", in_out)
end
@@ -1397,6 +1480,7 @@
------------------------------------------------------------------------------------------------
--> record cooldowns cast which can't track with buff applyed.
--> foi um jogador que castou
if (raid_members_cache [who_serial]) then
--> check if is a cooldown :D
if (defensive_cooldown_spell_list_no_buff [spellid]) then
@@ -2053,6 +2137,13 @@
return true
end
function _detalhes:CaptureIsEnabled (capture)
if (_detalhes.capture_real [capture]) then
return true
end
return false
end
function _detalhes:CaptureRefresh()
for _, _thisType in _ipairs (_detalhes.capture_types) do
if (_detalhes.capture_current [_thisType]) then
+1
View File
@@ -439,6 +439,7 @@
FlashAnimation:SetLooping ("REPEAT")
self:Show()
FlashAnimation:Play()
end
+9
View File
@@ -103,6 +103,15 @@ function gump:ParseColors (_arg1, _arg2, _arg3, _arg4)
end
end
if (not _arg1) then
_arg1 = 1
end
if (not _arg2) then
_arg2 = 1
end
if (not _arg3) then
_arg3 = 1
end
if (not _arg4) then
_arg4 = 1
end
+34 -3
View File
@@ -10,6 +10,35 @@ do
DETAILS_ATTRIBUTE_ENERGY = 3
DETAILS_ATTRIBUTE_MISC = 4
_detalhes.atributos_capture = {
"damage", --damage done
"damage", --dps
"damage", --damage taken
"damage", --friendly fire
"miscdata", --frags
"heal", --healing done
"heal", --hps
"heal", --overhealing
"heal", --healing taken
"heal", --enemy healed
"heal", --damage prevented
"energy", --mana restored
"energy", --rage gained
"energy", --energy generated
"energy", --runic power generated
"miscdata", --cc breaks
"miscdata", --ress
"miscdata", --interrupts
"miscdata", --dispells
"miscdata", --deaths
"miscdata", --cooldowns
"aura", --buff uptime
"aura", --debuff uptime
}
--> Main Attributes
_detalhes.atributos = {
@@ -30,7 +59,7 @@ do
--[[ MISC ]]
misc = 4, --> identifier
[4] = 7, --> sub attributes
[4] = 8, --> sub attributes
--[[ CUSTOM ]]
custom = 5,
@@ -139,6 +168,7 @@ do
Loc ["STRING_ATTRIBUTE_MISC_DEAD"],
Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"],
Loc ["STRING_ATTRIBUTE_MISC_BUFF_UPTIME"],
Loc ["STRING_ATTRIBUTE_MISC_DEBUFF_UPTIME"],
},
icones = {
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0, .125, 0, 1}},
@@ -147,9 +177,10 @@ do
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.375, .5, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.5, .625, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {.625, 0.75, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0.75, 0.875, 0, 1}}
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0.75, 0.875, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_misc", {0.875, 1, 0, 1}}
},
internal = {"cc_break", "ress", "interrupt", "dispell", "dead", "cooldowns_defensive", "buff_uptime"}
internal = {"cc_break", "ress", "interrupt", "dispell", "dead", "cooldowns_defensive", "buff_uptime", "debuff_uptime"}
}
}
+124 -61
View File
@@ -319,9 +319,48 @@ local function VPT (instancia, esta_instancia)
return nil
end
local tempo_movendo, precisa_ativar, instancia_alvo, tempo_fades, nao_anexados
local movement_onupdate = function (self, elapsed)
if (tempo_movendo and tempo_movendo < 0) then
if (precisa_ativar) then --> se a instância estiver fechada
gump:Fade (instancia_alvo.baseframe, "ALPHA", 0.2)
gump:Fade (instancia_alvo.baseframe.cabecalho.ball, "ALPHA", 0.2)
gump:Fade (instancia_alvo.baseframe.cabecalho.atributo_icon, "ALPHA", 0.2)
instancia_alvo:SaveMainWindowPosition()
instancia_alvo:RestoreMainWindowPosition()
precisa_ativar = false
elseif (tempo_fades) then
for lado, livre in _ipairs (nao_anexados) do
if (livre) then
if (lado == 1) then
instancia_alvo.h_esquerda:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0)
elseif (lado == 2) then
instancia_alvo.h_baixo:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0)
elseif (lado == 3) then
instancia_alvo.h_direita:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0)
elseif (lado == 4) then
instancia_alvo.h_cima:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0)
end
end
end
tempo_movendo = 1
else
BaseFrame:SetScript ("OnUpdate", nil)
tempo_movendo = 1
end
else
tempo_movendo = tempo_movendo - elapsed
end
end
local function move_janela (BaseFrame, iniciando, instancia)
local instancia_alvo = _detalhes.tabela_instancias [instancia.meu_id-1]
instancia_alvo = _detalhes.tabela_instancias [instancia.meu_id-1]
if (iniciando) then
@@ -343,8 +382,9 @@ local function move_janela (BaseFrame, iniciando, instancia)
if (instancia_alvo) then
local tempo_fades = 1.0
local nao_anexados = {true, true, true, true}
tempo_fades = 1.0
nao_anexados = {true, true, true, true}
tempo_movendo = 1
for lado, snap_to in _pairs (instancia_alvo.snap) do
if (snap_to) then
@@ -369,11 +409,9 @@ local function move_janela (BaseFrame, iniciando, instancia)
nao_anexados [lado] = false
end
end
local tempo_movendo = 1
local need_start = not instancia_alvo.iniciada
local need_activation = not instancia_alvo.ativa
precisa_ativar = not instancia_alvo.ativa
if (need_start) then --> se a instância não tiver sido aberta ainda
@@ -390,47 +428,7 @@ local function move_janela (BaseFrame, iniciando, instancia)
need_start = false
end
BaseFrame:SetScript ("OnUpdate", function (self, elapsed)
if (tempo_movendo and tempo_movendo < 0) then
if (need_activation) then --> se a instância estiver fechada
gump:Fade (instancia_alvo.baseframe, "ALPHA", 0.2)
gump:Fade (instancia_alvo.baseframe.cabecalho.ball, "ALPHA", 0.2)
gump:Fade (instancia_alvo.baseframe.cabecalho.atributo_icon, "ALPHA", 0.2)
instancia_alvo:SaveMainWindowPosition()
instancia_alvo:RestoreMainWindowPosition()
need_activation = false
elseif (tempo_fades) then
for lado, livre in _ipairs (nao_anexados) do
if (livre) then
if (lado == 1) then
instancia_alvo.h_esquerda:Show()
UIFrameFlash (instancia_alvo.h_esquerda, tempo_fades, tempo_fades, 2.0, false, 0, 0)
elseif (lado == 2) then
instancia_alvo.h_baixo:Show()
UIFrameFlash (instancia_alvo.h_baixo, tempo_fades, tempo_fades, 2.0, false, 0, 0)
elseif (lado == 3) then
instancia_alvo.h_direita:Show()
UIFrameFlash (instancia_alvo.h_direita, tempo_fades, tempo_fades, 2.0, false, 0, 0)
elseif (lado == 4) then
instancia_alvo.h_cima:Show()
UIFrameFlash (instancia_alvo.h_cima, tempo_fades, tempo_fades, 2.0, false, 0, 0)
end
end
end
tempo_movendo = 1
else
BaseFrame:SetScript ("OnUpdate", nil)
tempo_movendo = 1
end
else
tempo_movendo = tempo_movendo - elapsed
end
end)
BaseFrame:SetScript ("OnUpdate", movement_onupdate)
end
else
@@ -1664,6 +1662,45 @@ function CreateAlertFrame (BaseFrame, instancia)
return alert_bg
end
function _detalhes:InstanceMsg (text, icon, textcolor, icontexture, iconcoords, iconcolor)
if (not text) then
self.freeze_icon:Hide()
return self.freeze_texto:Hide()
end
self.freeze_texto:SetText (text)
self.freeze_icon:SetTexture (icon)
self.freeze_icon:Show()
self.freeze_texto:Show()
if (textcolor) then
local r, g, b, a = gump:ParseColors (textcolor)
self.freeze_texto:SetTextColor (r, g, b, a)
else
self.freeze_texto:SetTextColor (1, 1, 1, 1)
end
if (icontexture) then
self.freeze_icon:SetTexture (icontexture)
else
self.freeze_icon:SetTexture ([[Interface\CHARACTERFRAME\Disconnect-Icon]])
end
if (iconcoords and type (iconcoords) == "table") then
self.freeze_icon:SetTexCoord (_unpack (iconcoords))
else
self.freeze_icon:SetTexCoord (0, 1, 0, 1)
end
if (iconcolor) then
local r, g, b, a = gump:ParseColors (iconcolor)
self.freeze_icon:SetVertexColor (r, g, b, a)
else
self.freeze_icon:SetVertexColor (1, 1, 1, 1)
end
end
--> inicio
function gump:CriaJanelaPrincipal (ID, instancia, criando)
@@ -1811,9 +1848,8 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
-- congelamento da instância
-------------------------------------------------------------------------------------------------------------------------------------------------
instancia.freeze_icon = BackGroundDisplay:CreateTexture (nil, "OVERLAY")
instancia.freeze_icon:SetTexture ("Interface\\CHARACTERFRAME\\Disconnect-Icon")
instancia.freeze_icon:SetWidth (64)
instancia.freeze_icon:SetHeight (64)
instancia.freeze_icon:SetPoint ("center", BackGroundDisplay, "center")
@@ -1824,7 +1860,6 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
instancia.freeze_texto:SetHeight (64)
instancia.freeze_texto:SetPoint ("left", instancia.freeze_icon, "right", -18, 0)
instancia.freeze_texto:SetTextColor (1, 1, 1)
instancia.freeze_texto:SetText (Loc ["STRING_FREEZE"])
instancia.freeze_texto:Hide()
instancia._version = BaseFrame:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
@@ -1970,34 +2005,62 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
bota_separar_script (instancia.botao_separar, instancia)
--------------------------------- BORDAS HIGHLIGHT
instancia.h_cima = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY")
local fcima = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar)
fcima:SetPoint ("topleft", BaseFrame.cabecalho.top_bg, "bottomleft", -10, 37)
fcima:SetPoint ("topright", BaseFrame.cabecalho.ball_r, "bottomright", -33, 37)
gump:CreateFlashAnimation (fcima)
fcima:Hide()
instancia.h_cima = fcima:CreateTexture (nil, "OVERLAY")
instancia.h_cima:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_updown")
instancia.h_cima:SetTexCoord (0, 1, 0.5, 1)
instancia.h_cima:SetPoint ("topleft", BaseFrame.cabecalho.top_bg, "bottomleft", -10, 37)
instancia.h_cima:SetPoint ("topright", BaseFrame.cabecalho.ball_r, "bottomright", -33, 37)
instancia.h_cima:Hide()
--instancia.h_cima:Hide()
instancia.h_cima = fcima
--
local fbaixo = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar)
fbaixo:SetPoint ("topleft", BaseFrame.rodape.esquerdo, "bottomleft", 16, 17)
fbaixo:SetPoint ("topright", BaseFrame.rodape.direita, "bottomright", -16, 17)
gump:CreateFlashAnimation (fbaixo)
fbaixo:Hide()
instancia.h_baixo = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY")
instancia.h_baixo = fbaixo:CreateTexture (nil, "OVERLAY")
instancia.h_baixo:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_updown")
instancia.h_baixo:SetTexCoord (0, 1, 0, 0.5)
instancia.h_baixo:SetPoint ("topleft", BaseFrame.rodape.esquerdo, "bottomleft", 16, 17)
instancia.h_baixo:SetPoint ("topright", BaseFrame.rodape.direita, "bottomright", -16, 17)
instancia.h_baixo:Hide()
instancia.h_esquerda = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY")
--instancia.h_baixo:Hide()
instancia.h_baixo = fbaixo
--
local fesquerda = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar)
fesquerda:SetPoint ("topleft", BaseFrame.barra_esquerda, "topleft", -8, 0)
fesquerda:SetPoint ("bottomleft", BaseFrame.barra_esquerda, "bottomleft", -8, 0)
gump:CreateFlashAnimation (fesquerda)
fesquerda:Hide()
instancia.h_esquerda = fesquerda:CreateTexture (nil, "OVERLAY")
instancia.h_esquerda:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_leftright")
instancia.h_esquerda:SetTexCoord (0.5, 1, 0, 1)
instancia.h_esquerda:SetPoint ("topleft", BaseFrame.barra_esquerda, "topleft", -8, 0)
instancia.h_esquerda:SetPoint ("bottomleft", BaseFrame.barra_esquerda, "bottomleft", -8, 0)
instancia.h_esquerda:Hide()
--instancia.h_esquerda:Hide()
instancia.h_esquerda = fesquerda
--
local fdireita = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar)
fdireita:SetPoint ("topleft", BaseFrame.barra_direita, "topleft", 8, 18)
fdireita:SetPoint ("bottomleft", BaseFrame.barra_direita, "bottomleft", 8, 0)
gump:CreateFlashAnimation (fdireita)
fdireita:Hide()
instancia.h_direita = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY")
instancia.h_direita = fdireita:CreateTexture (nil, "OVERLAY")
instancia.h_direita:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_leftright")
instancia.h_direita:SetTexCoord (0, 0.5, 1, 0)
instancia.h_direita:SetPoint ("topleft", BaseFrame.barra_direita, "topleft", 8, 18)
instancia.h_direita:SetPoint ("bottomleft", BaseFrame.barra_direita, "bottomleft", 8, 0)
instancia.h_direita:Hide()
--instancia.h_direita:Hide()
instancia.h_direita = fdireita
--instancia.botao_separar:Hide()
if (criando) then
Binary file not shown.
+3 -1
View File
@@ -4,7 +4,7 @@ if not Loc then return end
--------------------------------------------------------------------------------------------------------------------------------------------
-- \n\n|cFFFFFF00-|r
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Fixed a issue with report data during combat lockdown.\n\n|cFFFFFF00-|r Improved pet owner recognition and added a ignore list if couldn't find his owner.\n\n|cFFFFFF00-|r Added an option to display only frags on enemy players.\n\n|cFFFFFF00-|r Added class colors for frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Fixed a issue were turning off buff uptime was disabling healing done too.\n\n|cFFFFFF00-|r Avoidance statistics will not be recorded for pets, ungrouped players and monsters.\n\n|cFFFFFF00-|r Fixed a issue were sometimes buff uptime was taking too long to save data on logout.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Fixed a issue with report data were sometimes wasn't working.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime was been implemented over Miscellaneous attribute.\n\n|cFFFFFF00-|r Death Logs now also display cooldowns and last cooldown used.\n\n|cFFFFFF00-|r Added this window showing the latest changes.\n\n|cFFFFFF00-|r Fixed the issue were sometimes the instance stops to update when clicking on the attribute name over sword menu.\n\n|cFFFFFF00-|r Disabling Healing now shutdown the absorbs too, disabling auras doesn't interrupt absorbs any more.\n\n|cFFFFFF00-|r Friendly Fire now only track players which is inside a group.\n\n|cFFFFFF00-|r Fixed a issue were pet damage on target isn't added to owner target.\n\n|cFFFFFF00-|r Fixed a bug were refreshing a cooldown isn't counting.\n\n|cFFFFFF00-|r Added absorbs for shammy and monk 2P tier 16.\n\n|cFFFFFF00-|r Added slash command 'worldboss' and 'updates'.\n\n"
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.6.0|r\n\n|cFFFFFF00-|r Added debuff uptime at misc attribute.\n\n|cFFFFFF00-|r Disabled attributes now have a darkness effect over sword menu.\n\n|cFFFFFF00-|r Fixed a issue were sometimes you need to /reload before change a talent.\n\n|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Fixed a issue with report data during combat lockdown.\n\n|cFFFFFF00-|r Improved pet owner recognition and added a ignore list if couldn't find his owner.\n\n|cFFFFFF00-|r Added an option to display only frags on enemy players.\n\n|cFFFFFF00-|r Added class colors for frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Fixed a issue were turning off buff uptime was disabling healing done too.\n\n|cFFFFFF00-|r Avoidance statistics will not be recorded for pets, ungrouped players and monsters.\n\n|cFFFFFF00-|r Fixed a issue were sometimes buff uptime was taking too long to save data on logout.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Fixed a issue with report data were sometimes wasn't working.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime was been implemented over Miscellaneous attribute.\n\n|cFFFFFF00-|r Death Logs now also display cooldowns and last cooldown used.\n\n|cFFFFFF00-|r Added this window showing the latest changes.\n\n|cFFFFFF00-|r Fixed the issue were sometimes the instance stops to update when clicking on the attribute name over sword menu.\n\n|cFFFFFF00-|r Disabling Healing now shutdown the absorbs too, disabling auras doesn't interrupt absorbs any more.\n\n|cFFFFFF00-|r Friendly Fire now only track players which is inside a group.\n\n|cFFFFFF00-|r Fixed a issue were pet damage on target isn't added to owner target.\n\n|cFFFFFF00-|r Fixed a bug were refreshing a cooldown isn't counting.\n\n|cFFFFFF00-|r Added absorbs for shammy and monk 2P tier 16.\n\n|cFFFFFF00-|r Added slash command 'worldboss' and 'updates'.\n\n"
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name
@@ -174,6 +174,7 @@ if not Loc then return end
Loc ["STRING_ATTRIBUTE_MISC_DEAD"] = "Deaths"
Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"] = "Cooldowns"
Loc ["STRING_ATTRIBUTE_MISC_BUFF_UPTIME"] = "Buff Uptime"
Loc ["STRING_ATTRIBUTE_MISC_DEBUFF_UPTIME"] = "Debuff Uptime"
Loc ["STRING_ATTRIBUTE_CUSTOM"] = "Custom"
@@ -277,6 +278,7 @@ if not Loc then return end
Loc ["STRING_REPORT_SINGLE_DEATH"] = "death details of"
Loc ["STRING_REPORT_SINGLE_COOLDOWN"] = "cooldowns used by"
Loc ["STRING_REPORT_SINGLE_BUFFUPTIME"] = "buff uptime for"
Loc ["STRING_REPORT_SINGLE_DEBUFFUPTIME"] = "debuff uptime for"
Loc ["STRING_NOCLOSED_INSTANCES"] = "There are no closed instances,\nclick to open a new one."
--> report frame
+3 -1
View File
@@ -3,7 +3,7 @@ if not Loc then return end
--------------------------------------------------------------------------------------------------------------------------------------------
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar durante o combate.\n\n|cFFFFFF00-|r Melhorado a reconhecimento dos donos de ajudantes.\n\n|cFFFFFF00-|r Adicionada uma opcao para mostrar apenas frags em cima de jogadores inimigos.\n\n|cFFFFFF00-|r Adicionado cor e icone aos frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Corrigido problema onde desativando o tempo dos buffs estava desativando tambem a cura feita.\n\n|cFFFFFF00-|r Estatisticas de Avoidance nao seram mais capturadas para pessoas foram do grupo, monstros ou ajudantes.\n\n|cFFFFFF00-|r Corrigido problema onde as vezes estava demorando muito para salvar o tempo dos buffs ao sair do jogo.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar o Dps onde as vezes nao mostrava nenhum jogador.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime foi implementado no atributo miscelanea.\n\n|cFFFFFF00-|r Cooldowns usados agora aparecem nos registros da morte.\n\n|cFFFFFF00-|r Implementado esta janela mostrando as atualizacoes.\n\n|cFFFFFF00-|r Corrigido problema onde algumas vezes clicando no nome do atributo fazia a instancia parar de atualizar.\n\n|cFFFFFF00-|r Desativando a cura agora para as absorcoes tambem. Desligando as Auras nao interrompe as absorcoes. \n\n|cFFFFFF00-|r Fogo Amigo agora conta apenas jogadores dentro do grupo.\n\n|cFFFFFF00-|r Corrigido problema onde o dano feito por um ajudando nao estava contando no alvo do dono.\n\n|cFFFFFF00-|r Corrigido problema onde a atualizacao de um cooldown nao estava sendo contada.\n\n|cFFFFFF00-|r Adicionada as magias de absorcao para 2P tier 16.\n\n|cFFFFFF00-|r Adicionado os comandos de barra 'worldboss' e 'updates'.\n\n|cFFFFFF00-|r Corrigido problema ao reportar onde algumas vezes nao estava funcionando."
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.6.0|r\n\n|cFFFFFF00-|r Adicionado tempo de debuff no atributo miscelanea.\n\n|cFFFFFF00-|r Atributos desativados agora ficam escurecidos no menu da espada.\n\n|cFFFFFF00-|r Corrigido um problema aonde algumas vezes era necessario dar /reload para trocar um talento.\n\n|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar durante o combate.\n\n|cFFFFFF00-|r Melhorado a reconhecimento dos donos de ajudantes.\n\n|cFFFFFF00-|r Adicionada uma opcao para mostrar apenas frags em cima de jogadores inimigos.\n\n|cFFFFFF00-|r Adicionado cor e icone aos frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Corrigido problema onde desativando o tempo dos buffs estava desativando tambem a cura feita.\n\n|cFFFFFF00-|r Estatisticas de Avoidance nao seram mais capturadas para pessoas foram do grupo, monstros ou ajudantes.\n\n|cFFFFFF00-|r Corrigido problema onde as vezes estava demorando muito para salvar o tempo dos buffs ao sair do jogo.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar o Dps onde as vezes nao mostrava nenhum jogador.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime foi implementado no atributo miscelanea.\n\n|cFFFFFF00-|r Cooldowns usados agora aparecem nos registros da morte.\n\n|cFFFFFF00-|r Implementado esta janela mostrando as atualizacoes.\n\n|cFFFFFF00-|r Corrigido problema onde algumas vezes clicando no nome do atributo fazia a instancia parar de atualizar.\n\n|cFFFFFF00-|r Desativando a cura agora para as absorcoes tambem. Desligando as Auras nao interrompe as absorcoes. \n\n|cFFFFFF00-|r Fogo Amigo agora conta apenas jogadores dentro do grupo.\n\n|cFFFFFF00-|r Corrigido problema onde o dano feito por um ajudando nao estava contando no alvo do dono.\n\n|cFFFFFF00-|r Corrigido problema onde a atualizacao de um cooldown nao estava sendo contada.\n\n|cFFFFFF00-|r Adicionada as magias de absorcao para 2P tier 16.\n\n|cFFFFFF00-|r Adicionado os comandos de barra 'worldboss' e 'updates'.\n\n|cFFFFFF00-|r Corrigido problema ao reportar onde algumas vezes nao estava funcionando."
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name
@@ -171,6 +171,7 @@ if not Loc then return end
Loc ["STRING_ATTRIBUTE_MISC_DEAD"] = "Mortes"
Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"] = "Cooldowns"
Loc ["STRING_ATTRIBUTE_MISC_BUFF_UPTIME"] = "Buff Tempo Ativo"
Loc ["STRING_ATTRIBUTE_MISC_DEBUFF_UPTIME"] = "Debuff Tempo Ativo"
Loc ["STRING_ATTRIBUTE_CUSTOM"] = "Customizados"
@@ -271,6 +272,7 @@ if not Loc then return end
Loc ["STRING_REPORT_SINGLE_DEATH"] = "detalhes da morte de"
Loc ["STRING_REPORT_SINGLE_COOLDOWN"] = "cooldowns usados por"
Loc ["STRING_REPORT_SINGLE_BUFFUPTIME"] = "duracao dos buffs de"
Loc ["STRING_REPORT_SINGLE_DEBUFFUPTIME"] = "duracao dos debuffs de"
Loc ["STRING_NOCLOSED_INSTANCES"] = "Nao ha instancias fechadas,\nclique para abrir uma nova."
--Loc ["STRING_REPORT_FRAG"] =
+2 -2
View File
@@ -4,7 +4,7 @@
-- 27/07/2013: Finished alpha version.
function _G._detalhes:Start()
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> details defaults
@@ -144,7 +144,7 @@ function _G._detalhes:Start()
--mana, rage, energy, runepower
self.row_singleclick_overwrite [3] = {true, true, true, true}
--cc breaks, ress, interrupts, dispells, deaths
self.row_singleclick_overwrite [4] = {true, true, true, true, self.atributo_misc.ReportSingleDeadLine, self.atributo_misc.ReportSingleCooldownLine, self.atributo_misc.ReportSingleBuffUptimeLine}
self.row_singleclick_overwrite [4] = {true, true, true, true, self.atributo_misc.ReportSingleDeadLine, self.atributo_misc.ReportSingleCooldownLine, self.atributo_misc.ReportSingleBuffUptimeLine, self.atributo_misc.ReportSingleDebuffUptimeLine}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialize