- Added option for lock segments display, so, when a segment is chosen, the other windows also change it.

- Added option for show the total amount of spells, targets and pets in tooltips.
This commit is contained in:
tercio
2014-05-24 15:32:53 -03:00
parent 491575faa5
commit e9e1fe4dfd
11 changed files with 134 additions and 41 deletions
+8 -5
View File
@@ -1486,7 +1486,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
--> MOSTRA HABILIDADES
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #ActorSkillsSortTable)
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Shaman_BlessingOfTheEternals]], 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875)
if (is_maximized) then
@@ -1517,7 +1518,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
--> MOSTRA INIMIGOS
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 6) then
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, r, g, b, #ActorTargetsSortTable)
local max_targets = _detalhes.tooltip_max_targets
local is_maximized = false
@@ -1614,7 +1616,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
if (not added_logo) then
added_logo = true
GameCooltip:AddLine (Loc ["STRING_PETS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_PETS"], headerColor, r, g, b, #totais)
GameCooltip:AddIcon ([[Interface\COMMON\friendship-heart]], 1, 1, 14, 14, 0.21875, 0.78125, 0.09375, 0.6875)
@@ -1686,7 +1689,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
ismaximized = true
end
GameCooltip:AddLine (Loc ["STRING_FROM"], nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_FROM"], headerColor, r, g, b, #meus_agressores)
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
@@ -1750,7 +1753,7 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
_table_sort (DamagedPlayers, _detalhes.Sort2)
_table_sort (Skills, _detalhes.Sort2)
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, r, g, b, #DamagedPlayers)
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.224609375, 0.056640625, 0.140625)
+3 -2
View File
@@ -724,7 +724,8 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
local fontes, habilidades = self:Fontes_e_Habilidades (recebido_from, showing, keyName)
-----------------------------------------------------------------
GameCooltip:AddLine (Loc ["STRING_SPELLS"], nil, nil, headerColor, nil, 12) --> localiza-me
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #habilidades)
GameCooltip:AddIcon ([[Interface\HELPFRAME\ReportLagIcon-Spells]], 1, 1, 14, 14, 0.21875, 0.78125, 0.21875, 0.78125)
local ismaximized = false
@@ -755,7 +756,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
-----------------------------------------------------------------
GameCooltip:AddLine (Loc ["STRING_PLAYERS"], nil, nil, headerColor, nil, 12) --> localiza-me
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_PLAYERS"], headerColor, r, g, b, #fontes)
GameCooltip:AddIcon ([[Interface\HELPFRAME\HelpIcon-HotIssues]], 1, 1, 14, 14, 0.21875, 0.78125, 0.21875, 0.78125)
local ismaximized = false
+11 -7
View File
@@ -852,13 +852,13 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra, keydown)
if (este_curador) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano
local alvos = este_curador.targets
local este_alvo = alvos._ActorTable[alvos._NameIndexTable[self.nome]]
if (este_alvo) then
if (este_alvo and este_alvo.total > 0) then
meus_curadores [#meus_curadores+1] = {nome, este_alvo.total, este_curador.classe}
end
end
end
GameCooltip:AddLine (Loc ["STRING_FROM"], nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_FROM"], headerColor, r, g, b, #meus_curadores)
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)
@@ -935,19 +935,23 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
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, _skill.total})
if (_skill [skill_key] > 0) then
_table_insert (ActorHealingTable, {_spellid, _skill [skill_key], _skill [skill_key]/ActorTotal*100, {SkillName, nil, SkillIcon}, _skill [skill_key]/meu_tempo, _skill.total})
end
end
_table_sort (ActorHealingTable, _detalhes.Sort2)
--> TOP Curados
ActorSkillsContainer = self.targets._ActorTable
for _, TargetTable in _ipairs (ActorSkillsContainer) do
_table_insert (ActorHealingTargets, {TargetTable.nome, TargetTable.total, TargetTable.total/ActorTotal*100})
if (TargetTable.total > 0) then
_table_insert (ActorHealingTargets, {TargetTable.nome, TargetTable.total, TargetTable.total/ActorTotal*100})
end
end
_table_sort (ActorHealingTargets, _detalhes.Sort2)
--> Mostra as habilidades no tooltip
GameCooltip:AddLine (Loc ["STRING_SPELLS"], nil, nil, headerColor, nil, 12) --> localiza-me
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #ActorHealingTable)
GameCooltip:AddIcon ([[Interface\RAIDFRAME\Raid-Icon-Rez]], 1, 1, 14, 14, 0.109375, 0.890625, 0.0625, 0.90625)
local ismaximized = false
@@ -996,7 +1000,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
if (instancia.sub_atributo == 1) then -- 1 or 2 -> healing done or hps
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, r, g, b, #ActorHealingTargets)
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 1, 1, 14, 14, 0.10546875, 0.89453125, 0.05859375, 0.6796875)
local ismaximized = false
@@ -1109,7 +1113,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
if (not added_logo) then
added_logo = true
GameCooltip:AddLine (Loc ["STRING_PETS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_PETS"], headerColor, r, g, b, #totais)
GameCooltip:AddIcon ([[Interface\COMMON\friendship-heart]], 1, 1, 14, 14, 0.21875, 0.78125, 0.09375, 0.6875)
+44
View File
@@ -1493,6 +1493,50 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGESEGMENT", nil, instancia, segmento)
if (_detalhes.instances_segments_locked and not iniciando_instancia) then
for _, instance in ipairs (_detalhes.tabela_instancias) do
if (instance.meu_id ~= instancia.meu_id and instance.ativa) then
if (instance.modo == 2 or instance.modo == 3) then
--> na troca de segmento, conferir se a instancia esta frozen
if (instance.freezed) then
if (not iniciando_instancia) then
instance:UnFreeze()
else
instance.freezed = false
end
end
instance.segmento = segmento
if (segmento == -1) then --> overall
instance.showing = _detalhes.tabela_overall
elseif (segmento == 0) then --> combate atual
instance.showing = _detalhes.tabela_vigente
else --> alguma tabela do histórico
instance.showing = _detalhes.tabela_historico.tabelas [segmento]
end
if (not instance.showing) then
if (not iniciando_instancia) then
instance:Freeze()
end
return
end
instance.v_barras = true
instance.showing [atributo].need_refresh = true
if (not _detalhes.initializing and not iniciando_instancia) then
instance:ResetaGump()
instance:AtualizaGumpPrincipal (true)
end
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGESEGMENT", nil, instance, segmento)
end
end
end
end
end
--> Muda o atributo caso necessário
+16 -17
View File
@@ -947,9 +947,8 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
end
_table_sort (meus_dispells, function(a, b) return a[2] > b[2] end)
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)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #meus_dispells)
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)
@@ -972,7 +971,8 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
end
_table_sort (buffs_dispelados, function(a, b) return a[2] > b[2] end)
GameCooltip:AddLine (Loc ["STRING_DISPELLED"] .. ":", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_DISPELLED"], headerColor, r, g, b, #buffs_dispelados)
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)
@@ -986,15 +986,15 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
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)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, r, g, b, #alvos_dispelados)
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)
for i = 1, _math_min (25, #alvos_dispelados) do
if (alvos_dispelados[i][2] < 1) then
@@ -1251,7 +1251,7 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
--_table_sort (debuffs_usados, Sort2Reverse)
_table_sort (debuffs_usados, _detalhes.Sort2)
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #debuffs_usados)
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)
@@ -1308,7 +1308,7 @@ function atributo_misc:ToolTipBuffUptime (instancia, numero, barra)
--_table_sort (buffs_usados, Sort2Reverse)
_table_sort (buffs_usados, _detalhes.Sort2)
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #buffs_usados)
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)
@@ -1362,8 +1362,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
end
_table_sort (cooldowns_usados, function(a, b) return a[2] > b[2] end)
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #cooldowns_usados)
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)
@@ -1388,7 +1387,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
end
_table_sort (alvos, function(a, b) return a[2] > b[2] end)
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, r, g, b, #alvos)
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)
@@ -1439,7 +1438,7 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
end
_table_sort (meus_ress, function(a, b) return a[2] > b[2] end)
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #meus_ress)
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)
@@ -1464,7 +1463,7 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
end
_table_sort (alvos, function(a, b) return a[2] > b[2] end)
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, r, g, b, #alvos)
--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)
@@ -1515,7 +1514,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
end
_table_sort (meus_interrupts, function(a, b) return a[2] > b[2] end)
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #meus_interrupts)
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)
@@ -1539,7 +1538,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
end
_table_sort (habilidades_interrompidas, function(a, b) return a[2] > b[2] end)
GameCooltip:AddLine (Loc ["STRING_SPELL_INTERRUPTED"] .. ":", nil, nil, headerColor, nil, 12)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELL_INTERRUPTED"] .. ":", headerColor, r, g, b, #habilidades_interrompidas)
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)