- Added new sub attribute for Heal: Enemy Heal.

- Added new sub attribute for Heal: Damage Prevented.
- Added new sub attribute for Misc: Cooldowns.
- All tooltips has been revised and changed.
- Fixed issue with absobed heal amount.
- Actors will be placed inside cache only if Details is in combat.
- Added support to dual status bar on CoolTips.
- Fixed some labels over info window were text was to big.
- Cosmetic changes in many places.
This commit is contained in:
Tercio
2013-09-01 18:27:16 -03:00
parent 225980313a
commit 3f45e83047
34 changed files with 1813 additions and 189 deletions
+27 -3
View File
@@ -133,7 +133,8 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
ress = 0, --> armazena quantos pessoas ele reviveu
interrupt = 0, --> armazena quantos interrupt a pessoa deu
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
dead = 0 --> armazena quantas vezes essa oessia morreu
dead = 0, --> armazena quantas vezes essa pessia morreu
cooldowns_defensive = 0 --> armazena quantos cooldowns a raid usou
}
}
@@ -151,7 +152,8 @@ function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
ress = 0, --> armazena quantos pessoas ele reviveu
interrupt = 0, --> armazena quantos interrupt a pessoa deu
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
dead = 0 --> armazena quantas vezes essa oessia morreu
dead = 0, --> armazena quantas vezes essa oessia morreu
cooldowns_defensive = 0 --> armazena quantos cooldowns a raid usou
}
}
@@ -333,6 +335,27 @@ combate.__sub = function (overall, combate)
local no_overall = overall[4]._ActorTable [overall[4]._NameIndexTable [nome]]
no_overall = no_overall - classe_misc
if (classe_misc.cooldowns_defensive) then
local alvos = classe_misc.cooldowns_defensive_targets
local habilidades = classe_misc.cooldowns_defensive_spell_tables
for index, alvo in _ipairs (alvos._ActorTable) do
local alvo_overall = no_overall.cooldowns_defensive_targets._ActorTable [no_overall.cooldowns_defensive_targets._NameIndexTable [alvo.nome]]
alvo_overall = alvo_overall - alvo
end
for _spellid, habilidade in _pairs (habilidades._ActorTable) do
local habilidade_overall = no_overall.cooldowns_defensive_spell_tables._ActorTable [_spellid]
habilidade_overall = habilidade_overall - habilidade
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]]
alvo_overall = alvo_overall - alvo
end
end
end
if (classe_misc.interrupt) then
local alvos = classe_misc.interrupt_targets
local habilidades = classe_misc.interrupt_spell_tables
@@ -433,6 +456,7 @@ combate.__sub = function (overall, combate)
overall.totals[4].interrupt = overall.totals[4].interrupt - combate.totals[4].interrupt
overall.totals[4].dispell = overall.totals[4].dispell - combate.totals[4].dispell
overall.totals[4].dead = overall.totals[4].dead - combate.totals[4].dead
overall.totals[4].cooldowns_defensive = overall.totals[4].cooldowns_defensive - combate.totals[4].cooldowns_defensive
overall.totals_grupo[1] = overall.totals_grupo[1] - combate.totals_grupo[1]
@@ -448,7 +472,7 @@ combate.__sub = function (overall, combate)
overall.totals_grupo[4].interrupt = overall.totals_grupo[4].interrupt - combate.totals_grupo[4].interrupt
overall.totals_grupo[4].dispell = overall.totals_grupo[4].dispell - combate.totals_grupo[4].dispell
overall.totals_grupo[4].dead = overall.totals_grupo[4].dead - combate.totals_grupo[4].dead
overall.totals_grupo[4].cooldowns_defensive = overall.totals_grupo[4].cooldowns_defensive - combate.totals_grupo[4].cooldowns_defensive
return overall
end
+3 -3
View File
@@ -244,7 +244,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (_detalhes.in_combat) then
using_cache = true
end
if (using_cache) then
conteudo = _detalhes.cache_damage_group
@@ -741,7 +741,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
--leftText, rightText, frame, ColorR, ColorG, ColorB, ColorA, ColorR1, ColorG2, ColorB3, ColorA4, fontSize, fontFace
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\HELPFRAME\HotIssueIcon]], 1, 1, 14, 14, 0.0625, 0.90625, 0, 1)
--GameCooltip:AddIcon ([[Interface\HELPFRAME\HotIssueIcon]], 1, 1, 14, 14, 0.0625, 0.90625, 0, 1)
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Shaman_BlessingOfTheEternals]], 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
local tooltip_max_abilities = _detalhes.tooltip_max_abilities
@@ -769,7 +770,6 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
--> MOSTRA INIMIGOS
if (instancia.sub_atributo == 1) then
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0, 0.03125, 0.126953125, 0.15625)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
+89 -21
View File
@@ -67,6 +67,7 @@ function atributo_heal:NovaTabela (serial, nome, link)
total = 0,
totalover = 0,
totalabsorb = 0,
custom = 0,
total_without_pet = 0,
@@ -88,6 +89,7 @@ function atributo_heal:NovaTabela (serial, nome, link)
pets = {}, --> nome já formatado: pet nome <owner nome>
heal_enemy = {}, --> quando o jogador cura um inimigo
heal_enemy_amt = 0,
--container armazenará os IDs das habilidades usadas por este jogador
spell_tables = container_habilidades:NovoContainer (container_heal),
@@ -144,6 +146,10 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
keyName = "totalover"
elseif (sub_atributo == 4) then --> healing take
keyName = "healing_taken"
elseif (sub_atributo == 5) then --> enemy heal
keyName = "heal_enemy_amt"
elseif (sub_atributo == 6) then --> absorbs
keyName = "totalabsorb"
end
else
keyName = exportar.key
@@ -161,6 +167,10 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
keyName = "totalover"
elseif (sub_atributo == 4) then --> healing take
keyName = "healing_taken"
elseif (sub_atributo == 5) then --> enemy heal
keyName = "heal_enemy_amt"
elseif (sub_atributo == 6) then --> absorbs
keyName = "totalabsorb"
end
end
@@ -171,7 +181,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
--> grava o total
instancia.top = conteudo[1][keyName]
elseif (instancia.modo == modo_ALL) then --> mostrando ALL
elseif (instancia.modo == modo_ALL or sub_atributo == 5) then --> mostrando ALL
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
@@ -194,16 +204,15 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
instancia.top = conteudo[1][keyName]
elseif (instancia.modo == modo_GROUP) then --> mostrando GROUP
if (_detalhes.in_combat) then
using_cache = true
end
if (using_cache) then
conteudo = _detalhes.cache_healing_group
_table_sort (conteudo, _detalhes.SortKeySimple)
_detalhes:ContainerSort (conteudo, nil, keyName)
if (conteudo[1][keyName] < 1) then
amount = 0
@@ -254,6 +263,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
end
--> refaz o mapa do container
--> se for cache não precisa remapear
showing:remapear()
if (exportar) then
@@ -272,6 +282,8 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
local qual_barra = 1
local barras_container = instancia.barras --> evita buscar N vezes a key .barras dentro da instância
--print (sub_atributo, total, keyName)
local combat_time = instancia.showing:GetCombatTime()
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado
--conteudo[i]:AtualizaBarra (instancia, qual_barra, i, total, sub_atributo, forcar) --> instância, index, total, valor da 1º barra
@@ -378,7 +390,14 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
elseif (sub_atributo == 4) then --> mostrando healing take
esta_barra.texto_direita:SetText (_detalhes:ToK (self.healing_taken) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
esta_porcentagem = _math_floor ((self.healing_taken/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 5) then --> mostrando enemy heal
esta_barra.texto_direita:SetText (_detalhes:ToK (self.heal_enemy_amt) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
esta_porcentagem = _math_floor ((self.heal_enemy_amt/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 6) then --> mostrando enemy heal
esta_barra.texto_direita:SetText (_detalhes:ToK (self.totalabsorb) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
esta_porcentagem = _math_floor ((self.totalabsorb/instancia.top) * 100) --> determina qual o tamanho da barra
end
end
@@ -403,6 +422,8 @@ function atributo_heal:ToolTip (instancia, numero, barra)
--GameTooltip:AddLine (barra.colocacao..". "..self.nome)
if (instancia.sub_atributo <= 3) then --> healing done, HPS or Overheal
return self:ToolTip_HealingDone (instancia, numero, barra)
elseif (instancia.sub_atributo == 6) then --> healing done, HPS or Overheal
return self:ToolTip_HealingDone (instancia, numero, barra)
elseif (instancia.sub_atributo == 4) then --> healing taken
return self:ToolTip_HealingTaken (instancia, numero, barra)
end
@@ -471,6 +492,7 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra)
end
---------> HEALING DONE / HPS / OVERHEAL
local background_heal_vs_absorbs = {value = 100, color = {1, 1, 0, .25}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_glass]]}
function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
local owner = self.owner
@@ -486,7 +508,9 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
local actor_key, skill_key = "total", "total"
if (instancia.sub_atributo == 3) then
key = "totalover", "overheal"
actor_key, skill_key = "totalover", "overheal"
elseif (instancia.sub_atributo == 6) then
actor_key, skill_key = "totalabsorb", "totalabsorb"
end
local meu_tempo
@@ -495,10 +519,12 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
elseif (_detalhes.time_type == 2) then
meu_tempo = self:GetCombatTime()
end
local ActorTotal = self [actor_key]
for _spellid, _skill in _pairs (ActorSkillsContainer) do
local SkillName, _, SkillIcon = _GetSpellInfo (_spellid)
_table_insert (ActorHealingTable, {_spellid, _skill [skill_key], _skill [skill_key]/ActorTotal*100, {SkillName, nil, SkillIcon}, _skill [skill_key]/meu_tempo})
_table_insert (ActorHealingTable, {_spellid, _skill [skill_key], _skill [skill_key]/ActorTotal*100, {SkillName, nil, SkillIcon}, _skill [skill_key]/meu_tempo, _skill.total})
end
_table_sort (ActorHealingTable, _detalhes.Sort2)
@@ -511,9 +537,6 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
--> Mostra as habilidades no tooltip
GameCooltip:AddLine (Loc ["STRING_SPELLS"], nil, nil, headerColor, nil, 12) --> localiza-me
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
--GameCooltip:AddIcon ([[Interface\HELPFRAME\HotIssueIcon]], 1, 1, 14, 14, 0, 1, 0, 1)
--GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIALFRAME-SPIRITREZ]], 1, 1, 14, 14, 0.283203125, 0.470703125, 0.0859375, 0.9296875)
GameCooltip:AddIcon ([[Interface\RAIDFRAME\Raid-Icon-Rez]], 1, 1, 14, 14, 0.109375, 0.890625, 0.0625, 0.90625)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
@@ -527,8 +550,12 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
if (ActorHealingTable[i][2] < 1) then
break
end
if (instancia.sub_atributo == 2) then
if (instancia.sub_atributo == 2) then --> hps
GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", _detalhes:comma_value ( _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
elseif (instancia.sub_atributo == 3) then --> overheal
local overheal = ActorHealingTable[i][2]
local total = ActorHealingTable[i][6]
GameCooltip:AddLine (ActorHealingTable[i][4][1] .." (|cFFFF3333" .. _math_floor ( (overheal / (overheal+total)) *100) .. "%|r):", _detalhes:comma_value ( _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
else
GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", _detalhes:comma_value (ActorHealingTable[i][2]).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
end
@@ -541,8 +568,6 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
if (instancia.sub_atributo == 1) then -- 1 or 2 -> healing done or hps
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0, 0.03125, 0.126953125, 0.15625)
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 1, 1, 14, 14, 0.10546875, 0.89453125, 0.05859375, 0.6796875)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
@@ -573,7 +598,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
--> PETS
local meus_pets = self.pets
if (#meus_pets > 0) then --> teve ajudantes
if (#meus_pets > 0 and (instancia.sub_atributo == 1 or instancia.sub_atributo == 2)) then --> teve ajudantes
local quantidade = {} --> armazena a quantidade de pets iguais
local danos = {} --> armazena as habilidades
@@ -650,6 +675,46 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
end
--> absorbs vs heal
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 2) then
local total_healed = self.total - self.totalabsorb
local total_previned = self.totalabsorb
local healed_percentage = total_healed / self.total * 100
local previned_percentage = total_previned / self.total * 100
if (healed_percentage > 1 and previned_percentage > 1) then
GameCooltip:AddLine (_math_floor (healed_percentage).."%", _math_floor (previned_percentage).."%")
local r, g, b = _unpack (_detalhes.class_colors [self.classe])
background_heal_vs_absorbs.color[1] = r
background_heal_vs_absorbs.color[2] = g
background_heal_vs_absorbs.color[3] = b
background_heal_vs_absorbs.specialSpark = false
GameCooltip:AddStatusBar (healed_percentage, 1, r, g, b, .9, false, background_heal_vs_absorbs)
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Priest_ReflectiveShield]], 1, 2, 14, 14, 0.0625, 0.9375, 0.0625, 0.9375)
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Monk_ChiWave]], 1, 1, 14, 14, 0.9375, 0.0625, 0.0625, 0.9375)
end
elseif (instancia.sub_atributo == 3) then
local total_healed = self.total
local total_overheal = self.totalover
local both = total_healed + total_overheal
local healed_okey = total_healed / both * 100
local healed_disposed = total_overheal / both * 100
if (healed_okey > 1 and healed_disposed > 1) then
GameCooltip:AddLine (_math_floor (healed_okey).."%", _math_floor (healed_disposed).."%")
background_heal_vs_absorbs.color[1] = 1
background_heal_vs_absorbs.color[2] = 0
background_heal_vs_absorbs.color[3] = 0
background_heal_vs_absorbs.specialSpark = false
GameCooltip:AddStatusBar (healed_okey, 1, 0, 1, 0, .9, false, background_heal_vs_absorbs)
GameCooltip:AddIcon ([[Interface\Scenarios\ScenarioIcon-Check]], 1, 1, 14, 14, 0, 1, 0, 1)
GameCooltip:AddIcon ([[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 1, 2, 14, 14, 1, 0, 0, 1)
end
end
return true
end
@@ -767,7 +832,7 @@ function atributo_heal:MontaInfoOverHealing()
local barras = info.barras1
for spellid, tabela in _pairs (tabela) do
local nome, rank, icone = _GetSpellInfo (spellid)
local nome, _, icone = _GetSpellInfo (spellid)
_table_insert (minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
end
@@ -813,7 +878,7 @@ function atributo_heal:MontaInfoOverHealing()
end
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[4]) --seta o texto da esqueda
barra.texto_direita:SetText (tabela[2] .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
barra.icone:SetTexture (tabela[5])
@@ -855,7 +920,8 @@ function atributo_heal:MontaInfoOverHealing()
end
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
barra.texto_direita:SetText (tabela[2] .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
barra.texto_esquerdo:SetWidth (barra:GetWidth() - barra.texto_direita:GetStringWidth() - 30)
-- o que mostrar no local do ícone?
--barra.icone:SetTexture (tabela[4][3])
@@ -1321,19 +1387,20 @@ atributo_heal.__add = function (shadow, tabela2)
local tempo = (tabela2.end_time or time()) - tabela2.start_time
shadow.start_time = shadow.start_time - tempo
shadow.total = shadow.total - tabela2.total
shadow.total = shadow.total + tabela2.total
_detalhes.tabela_overall.totals[2] = _detalhes.tabela_overall.totals[2] + tabela2.total
if (tabela2.grupo) then
_detalhes.tabela_overall.totals_grupo[2] = _detalhes.tabela_overall.totals_grupo[2] + tabela2.total
end
shadow.totalover = shadow.totalover - tabela2.totalover
shadow.totalover = shadow.totalover + tabela2.totalover
shadow.heal_enemy_amt = shadow.heal_enemy_amt + tabela2.heal_enemy_amt
shadow.total_without_pet = shadow.total_without_pet - tabela2.total_without_pet
shadow.totalover_without_pet = shadow.totalover_without_pet - tabela2.totalover_without_pet
shadow.total_without_pet = shadow.total_without_pet + tabela2.total_without_pet
shadow.totalover_without_pet = shadow.totalover_without_pet + tabela2.totalover_without_pet
shadow.healing_taken = shadow.healing_taken - tabela2.healing_taken
shadow.healing_taken = shadow.healing_taken + tabela2.healing_taken
--> copia o healing_from
for nome, _ in _pairs (tabela2.healing_from) do
@@ -1388,6 +1455,7 @@ end
atributo_heal.__sub = function (tabela1, tabela2)
tabela1.total = tabela1.total - tabela2.total
tabela1.totalover = tabela1.totalover - tabela2.totalover
tabela1.heal_enemy_amt = tabela1.heal_enemy_amt - tabela2.heal_enemy_amt
tabela1.total_without_pet = tabela1.total_without_pet - tabela2.total_without_pet
tabela1.totalover_without_pet = tabela1.totalover_without_pet - tabela2.totalover_without_pet
+5
View File
@@ -24,6 +24,7 @@ function habilidade_cura:NovaTabela (id, link) --aqui eu n
local _newHealSpell = {
total = 0,
totalabsorb = 0,
counter = 0,
id = id,
@@ -54,6 +55,7 @@ function habilidade_cura:NovaTabela (id, link) --aqui eu n
return _newHealSpell
end
--> o primeiro parametro "spell" vira self a atrasa 1 parâmetro em todos os argumentos.
function habilidade_cura:Add (serial, nome, flag, amount, who_nome, absorbed, critical, overhealing, is_shield)
self.counter = self.counter + 1
@@ -79,6 +81,9 @@ function habilidade_cura:Add (serial, nome, flag, amount, who_nome, absorbed, cr
if (amount and amount > 0) then
self.total = self.total + amount
if (is_shield) then
self.totalabsorb = self.totalabsorb + amount
end
alvo:AddQuantidade (amount)
+223 -9
View File
@@ -146,7 +146,11 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra)
GameCooltip:SetOption ("StatusBarHeightMod", -6)
GameCooltip:SetOption ("FixedWidth", 300)
GameCooltip:SetOption ("TextSize", 9.5)
GameCooltip:SetOption ("TextSize", 9)
GameCooltip:SetOption ("LeftBorderSize", -4)
GameCooltip:SetOption ("RightBorderSize", 5)
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_reverse]])
GameCooltip:ShowCooltip()
--_detalhes.popup:ShowMe (esta_barra, "tooltip_bars", linhas, 300, 16, 9) --> [1] ancora [2] tipo do painel [3] texto/linhas [4] largura [5] tamanho do icone e altura da barra [6] tamanho da fonte
@@ -251,6 +255,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
keyName = "dispell"
elseif (sub_atributo == 5) then --> DEATHS
keyName = "dead"
elseif (sub_atributo == 6) then --> DEFENSIVE COOLDOWNS
keyName = "cooldowns_defensive"
end
else
keyName = exportar.key
@@ -274,6 +280,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
keyName = "dispell"
elseif (sub_atributo == 5) then --> DEATHS
keyName = "dead"
elseif (sub_atributo == 6) then --> DEFENSIVE COOLDOWNS
keyName = "cooldowns_defensive"
end
end
@@ -514,6 +522,8 @@ function atributo_misc:ToolTip (instancia, numero, barra)
return self:ToolTipDispell (instancia, numero, barra)
elseif (instancia.sub_atributo == 5) then --> mortes
return self:ToolTipDead (instancia, numero, barra)
elseif (instancia.sub_atributo == 6) then --> defensive cooldowns
return self:ToolTipDefensiveCooldowns (instancia, numero, barra)
end
end
--> tooltip locals
@@ -598,13 +608,19 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
end
_table_sort (meus_dispells, function(a, b) return a[2] > b[2] end)
GameTooltip:AddLine (Loc ["STRING_SPELLS"]..":")
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\ICONS\inv_emberweavebandage2]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125)
--GameCooltip:AddIcon ([[Interface\ICONS\INV_Enchant_Disenchant]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125)
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Arcane_ArcaneTorrent]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#meus_dispells > 0) then
for i = 1, _math_min (3, #meus_dispells) do
local esta_habilidade = meus_dispells[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
else
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
@@ -617,19 +633,133 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
end
_table_sort (buffs_dispelados, function(a, b) return a[2] > b[2] end)
GameTooltip:AddLine (Loc ["STRING_DISPELLED"] .. ":")
GameCooltip:AddLine (Loc ["STRING_DISPELLED"] .. ":", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Arcane_ManaTap]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#buffs_dispelados > 0) then
for i = 1, _math_min (3, #buffs_dispelados) do
local esta_habilidade = buffs_dispelados[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
end
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\ICONS\ACHIEVEMENT_GUILDPERK_EVERYONES A HERO_RANK2]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
local alvos_dispelados = {}
for _, TargetTable in _ipairs (self.dispell_targets._ActorTable) do
alvos_dispelados [#alvos_dispelados + 1] = {TargetTable.nome, TargetTable.total, TargetTable.total/meu_total*100}
end
_table_sort (alvos_dispelados, _detalhes.Sort2)
for i = 1, _math_min (3, #alvos_dispelados) do
if (alvos_dispelados[i][2] < 1) then
break
end
GameCooltip:AddLine (alvos_dispelados[i][1]..": ", _detalhes:comma_value (alvos_dispelados[i][2]) .." (".._cstr ("%.1f", alvos_dispelados[i][3]).."%)")
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
local targetActor = instancia.showing[4]:PegarCombatente (_, alvos_dispelados[i][1])
if (targetActor) then
local classe = targetActor.classe
if (not classe) then
classe = "UNKNOW"
end
if (classe == "UNKNOW") then
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
end
end
end
return true
end
function atributo_misc:ToolTipDefensiveCooldowns (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 ["cooldowns_defensive"]
local minha_tabela = self.cooldowns_defensive_spell_tables._ActorTable
--> habilidade usada para interromper
local cooldowns_usados = {}
for _spellid, _tabela in _pairs (minha_tabela) do
cooldowns_usados [#cooldowns_usados+1] = {_spellid, _tabela.counter}
end
_table_sort (cooldowns_usados, function(a, b) return a[2] > b[2] end)
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 (#cooldowns_usados > 0) then
for i = 1, _math_min (3, #cooldowns_usados) do
local esta_habilidade = cooldowns_usados[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) --0.03125, 0.96875, 0.03125, 0.96875
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
end
--> quem foi que o cara reviveu
local meus_alvos = self.cooldowns_defensive_targets._ActorTable
local alvos = {}
for _, _tabela in _ipairs (meus_alvos) do
alvos [#alvos+1] = {_tabela.nome, _tabela.total}
end
_table_sort (alvos, function(a, b) return a[2] > b[2] end)
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_DefensiveStance]], 1, 1, 14, 14, 0.9375, 0.125, 0.0625, 0.9375)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#alvos > 0) then
for i = 1, _math_min (3, #alvos) do
GameCooltip:AddLine (alvos[i][1]..": ", alvos[i][2], 1, "white", "white")
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
GameCooltip:AddIcon ("Interface\\Icons\\PALADIN_HOLY", nil, nil, 14, 14)
local targetActor = instancia.showing[4]:PegarCombatente (_, alvos[i][1])
if (targetActor) then
local classe = targetActor.classe
if (not classe) then
classe = "UNKNOW"
end
if (classe == "UNKNOW") then
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
end
end
end
end
return true
end
function atributo_misc:ToolTipRess (instancia, numero, barra)
local owner = self.owner
@@ -650,16 +780,20 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
end
_table_sort (meus_ress, function(a, b) return a[2] > b[2] end)
GameTooltip:AddLine (Loc ["STRING_SPELLS"]..":")
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Paladin_BlessedMending]], 1, 1, 14, 14, 0.098125, 0.828125, 0.953125, 0.168125)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#meus_ress > 0) then
for i = 1, _math_min (3, #meus_ress) do
local esta_habilidade = meus_ress[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
else
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
end
--> quem foi que o cara reviveu
@@ -671,11 +805,30 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
end
_table_sort (alvos, function(a, b) return a[2] > b[2] end)
GameTooltip:AddLine (Loc ["STRING_TARGETS"]..":")
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\ICONS\Ability_DeathKnight_IcyGrip]], 1, 1, 14, 14, 0.9375, 0.078125, 0.953125, 0.078125)
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Priest_Cascade]], 1, 1, 14, 14, 0.9375, 0.0625, 0.0625, 0.9375)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#alvos > 0) then
for i = 1, _math_min (3, #alvos) do
GameCooltip:AddLine (alvos[i][1]..": ", alvos[i][2])
GameCooltip:AddIcon ("Interface\\Icons\\PALADIN_HOLY", nil, nil, 14, 14)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
local targetActor = instancia.showing[4]:PegarCombatente (_, alvos[i][1])
if (targetActor) then
local classe = targetActor.classe
if (not classe) then
classe = "UNKNOW"
end
if (classe == "UNKNOW") then
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
end
end
end
end
@@ -703,13 +856,17 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
end
_table_sort (meus_interrupts, function(a, b) return a[2] > b[2] end)
GameTooltip:AddLine (Loc ["STRING_SPELLS"]..":")
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_PunishingBlow]], 1, 1, 14, 14, 0.9375, 0.078125, 0.078125, 0.953125)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#meus_interrupts > 0) then
for i = 1, _math_min (3, #meus_interrupts) do
local esta_habilidade = meus_interrupts[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
else
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
@@ -723,13 +880,17 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
end
_table_sort (habilidades_interrompidas, function(a, b) return a[2] > b[2] end)
GameTooltip:AddLine (Loc ["STRING_SPELL_INTERRUPTED"] .. ":")
GameCooltip:AddLine (Loc ["STRING_SPELL_INTERRUPTED"] .. ":", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_Sunder]], 1, 1, 14, 14, 0.078125, 0.9375, 0.128125, 0.913125)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#habilidades_interrompidas > 0) then
for i = 1, _math_min (3, #habilidades_interrompidas) do
local esta_habilidade = habilidades_interrompidas[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
end
@@ -1063,6 +1224,11 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
_detalhes.refresh:r_container_combatentes (este_jogador.interrupt_targets, shadow.interrupt_targets)
_detalhes.refresh:r_container_habilidades (este_jogador.interrupt_spell_tables, shadow.interrupt_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)
_detalhes.refresh:r_container_habilidades (este_jogador.cooldowns_defensive_spell_tables, shadow.cooldowns_defensive_spell_tables)
end
--> refresh ressers
if (este_jogador.ress_targets) then
@@ -1088,6 +1254,11 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
_detalhes.refresh:r_container_combatentes (este_jogador.interrupt_targets, -1)
_detalhes.refresh:r_container_habilidades (este_jogador.interrupt_spell_tables, -1)
end
--> refresh cooldowns defensive
if (este_jogador.cooldowns_defensive_targets) then
_detalhes.refresh:r_container_combatentes (este_jogador.cooldowns_defensive_targets, -1)
_detalhes.refresh:r_container_habilidades (este_jogador.cooldowns_defensive_spell_tables, -1)
end
--> refresh ressers
if (este_jogador.ress_targets) then
@@ -1120,6 +1291,10 @@ function _detalhes.clear:c_atributo_misc (este_jogador)
_detalhes.clear:c_container_combatentes (este_jogador.interrupt_targets)
_detalhes.clear:c_container_habilidades (este_jogador.interrupt_spell_tables)
end
if (este_jogador.cooldowns_defensive_targets) then
_detalhes.clear:c_container_combatentes (este_jogador.cooldowns_defensive_targets)
_detalhes.clear:c_container_habilidades (este_jogador.cooldowns_defensive_spell_tables)
end
if (este_jogador.ress_targets) then
_detalhes.clear:c_container_combatentes (este_jogador.ress_targets)
@@ -1188,6 +1363,42 @@ atributo_misc.__add = function (shadow, tabela2)
end
if (tabela2.cooldowns_defensive) then
shadow.cooldowns_defensive = shadow.cooldowns_defensive + tabela2.cooldowns_defensive
_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
for index, alvo in _ipairs (tabela2.cooldowns_defensive_targets._ActorTable) do
local alvo_shadow = shadow.cooldowns_defensive_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.cooldowns_defensive_spell_tables._ActorTable) do
local habilidade_shadow = shadow.cooldowns_defensive_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.ress) then
shadow.ress = shadow.ress + tabela2.ress
@@ -1335,6 +1546,9 @@ atributo_misc.__sub = function (tabela1, tabela2)
tabela1.interrompeu_oque [spellid] = tabela1.interrompeu_oque [spellid] - amt
end
end
if (tabela1.cooldowns_defensive and tabela2.cooldowns_defensive) then
tabela1.cooldowns_defensive = tabela1.cooldowns_defensive - tabela2.cooldowns_defensive
end
if (tabela1.ress and tabela2.ress) then
tabela1.ress = tabela1.ress - tabela2.ress
+6 -2
View File
@@ -53,8 +53,12 @@ function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spel
alvo.total = alvo.total + 1
--alvo:AddQuantidade (1)
if (token == "SPELL_INTERRUPT") then
if (spellID == "BUFF") then
if (spellName == "COOLDOWN") then
self.counter = self.counter + 1
end
elseif (token == "SPELL_INTERRUPT") then
self.counter = self.counter + 1
if (not self.interrompeu_oque [spellID]) then --> interrompeu_oque a NIL value
+3 -29
View File
@@ -259,7 +259,7 @@ 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
if (novo_objeto.grupo and _detalhes.in_combat) then
_detalhes.cache_damage_group [#_detalhes.cache_damage_group+1] = novo_objeto
end
end
@@ -288,7 +288,7 @@ 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
if (novo_objeto.grupo and _detalhes.in_combat) then
_detalhes.cache_healing_group [#_detalhes.cache_healing_group+1] = novo_objeto
end
end
@@ -482,30 +482,4 @@ function _detalhes.clear:c_container_combatentes (container)
container._NameIndexTable = nil
container.need_refresh = nil
container.funcao_de_criacao = nil
end
--[[
if (not serial) then
print ("DEBUG: objeto sem serial: "..nome)
novo_objeto.classe = "UNKNOW"
else
if (_bit_band (flag, 0x00000400) ~= 0) then --> é player
local _, engClass, _, engRace = _GetPlayerInfoByGUID (serial)
novo_objeto.classe = engClass
--print (novo_objeto.classe)
--print ("eh um player ".. nome.." da classe "..engClass)
else
--print ("nao eh um player "..nome)
local _, engClass = _UnitClass (nome)
--print (engClass)
if (engClass) then
novo_objeto.classe = engClass
else
novo_objeto.classe = "UNKNOW"
end
end
--novo_objeto.classe = "UNKNOW"
end
--]]
end