- fixed issue when reporting a custom heal attribute.

- fixed problem with dps with isn't showing after a new combat start.
- fixed icon problem on actor details panel.
- fixed a rare issue when switching between healing and damage throws a lua error.
- fixed custom list which wasn't showing the correct custom selected.
- added single click report for damage prevented.
- added a alert when data share is running.
- added single click report for cooldowns.
- cooldowns tooltip now show 15 cooldowns up from 3.
- added API: _detalhes:GetEncounterEqualize (mapid, bossindex)
- added API CoolTip options: "MinWidth".
This commit is contained in:
Tercio
2013-10-08 18:12:25 -03:00
parent 3c1e8b784d
commit 7c93260db7
18 changed files with 370 additions and 49 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ function atributo_custom:RefreshWindow (instancia, _combat, forcar, exportar)
if (CustomObject.attribute == 1) then
return _detalhes.atributo_damage:RefreshWindow (instancia, _combat, forcar, exportar)
elseif (CustomObject.attribute == 2) then
_detalhes.atributo_heal:RefreshWindow (instancia, _combat, forcar, exportar)
return _detalhes.atributo_heal:RefreshWindow (instancia, _combat, forcar, exportar)
end
--> aqui precisa fazer algo para retornar algo pro report reconhecer a tabela
+95 -22
View File
@@ -1,4 +1,4 @@
--why do a cleanup on classes today if i can do tomorrow?
--lua locals
local _cstr = string.format
@@ -139,7 +139,7 @@ end
--[[exported]] function _detalhes.SortKeySimple (table1, table2)
return table1 [keyName] > table2 [keyName]
end
--[[exported]] function _detalhes:ContainerSort (container, amount, keyName2)
keyName = keyName2
_table_sort (container, _detalhes.SortKeySimple)
@@ -166,6 +166,24 @@ end
return false
end
function atributo_damage:ContainerRefreshDps (container, combat_time)
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet ("damage")) then
for _, actor in _ipairs (container) do
if (actor.grupo) then
actor.last_dps = actor.total / combat_time
else
actor.last_dps = actor.total / actor:Tempo()
end
end
else
for _, actor in _ipairs (container) do
actor.last_dps = actor.total / actor:Tempo()
end
end
end
function _detalhes:ToolTipFrags (instancia, frag, esta_barra)
--vardump (frag)
@@ -236,7 +254,16 @@ function _detalhes:ToolTipFrags (instancia, frag, esta_barra)
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
GameCooltip:ShowCooltip()
else
GameCooltip:AddLine (Loc ["STRING_NO_DATA"], nil, 1, "white")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords ["UNKNOW"]))
GameCooltip:ShowCooltip()
end
else
GameCooltip:AddLine (Loc ["STRING_NO_DATA"], nil, 1, "white")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords ["UNKNOW"]))
GameCooltip:ShowCooltip()
end
end
@@ -327,6 +354,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
local using_cache = false
local combat_time = instancia.showing:GetCombatTime()
local sub_atributo = instancia.sub_atributo --> o que esta sendo mostrado nesta instância
local conteudo = showing._ActorTable --> pega a lista de jogadores -- get actors table from container
local amount = #conteudo
@@ -441,6 +470,11 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
elseif (modo == modo_ALL) then --> mostrando ALL
--> faz o sort da categoria e retorna o amount corrigido
--print (keyName)
if (sub_atributo == 2) then
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
end
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
--> pega o total ja aplicado na tabela do combate
@@ -458,7 +492,12 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
if (using_cache) then
conteudo = _detalhes.cache_damage_group
if (sub_atributo == 2) then
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
end
if (#conteudo < 1) then
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
@@ -477,6 +516,9 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
total = total + conteudo[i][keyName]
end
else
if (sub_atributo == 2) then
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
end
_table_sort (conteudo, _detalhes.SortKeyGroup)
end
--
@@ -568,7 +610,6 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
else
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, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra
qual_barra = qual_barra+1
@@ -623,11 +664,13 @@ function atributo_damage:Custom (_customName, _combat, sub_atributo, spell, alvo
for _, TargetActor in _ipairs (SkillTargets) do
--print (TargetActor.nome)
local TargetActorSelf = _combat (class_type, TargetActor.nome)
--print (TargetActor.total)
TargetActorSelf.custom = TargetActor.total + TargetActorSelf.custom
--print (TargetActorSelf.custom)
_combat.totals [_customName] = _combat.totals [_customName] + TargetActor.total
--print (self.nome .. " " ..TargetActor.total)
if (TargetActorSelf) then
--print (TargetActor.total)
TargetActorSelf.custom = TargetActor.total + TargetActorSelf.custom
--print (TargetActorSelf.custom)
_combat.totals [_customName] = _combat.totals [_customName] + TargetActor.total
--print (self.nome .. " " ..TargetActor.total)
end
end
end
--end
@@ -878,12 +921,8 @@ end
--------------------------------------------- // TOOLTIPS // ---------------------------------------------
--[[Exported]] function _detalhes:TooltipForCustom (barra)
_detalhes.popup:Close()
GameTooltip:ClearLines()
GameTooltip:AddLine (barra.colocacao..". "..self.nome)
GameTooltip:AddLine ("-> Left click for report", 1, 1, 1, 1) --> localize-me
--GameCooltip:AddLine (barra.colocacao..". "..self.nome)
GameCooltip:AddLine (Loc ["STRING_LEFT_CLICK_SHARE"])
return true
end
@@ -1456,12 +1495,33 @@ function atributo_damage:MontaInfoDamageTaken()
return true
end
_table_sort (meus_agressores, function (a, b) return a[2] > b[2] end)
--_table_sort (meus_agressores, function (a, b) return a[2] > b[2] end)
_table_sort (meus_agressores, _detalhes.Sort2)
gump:JI_AtualizaContainerBarras (amt)
local max_ = meus_agressores [1] and meus_agressores [1][2] or 0
local barra
for index, tabela in _ipairs (meus_agressores) do
barra = barras [index]
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
end
self:FocusLock (barra, tabela[1])
--hes:UpdadeInfoBar (row, index, spellid, name, value, max, percent, icon, detalhes)
local texCoords = CLASS_ICON_TCOORDS [tabela[4]]
if (not texCoords) then
texCoords = _detalhes.class_coords ["UNKNOW"]
end
self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
end
--[[
for index, tabela in _ipairs (meus_agressores) do
local barra = barras [index]
@@ -1469,7 +1529,6 @@ function atributo_damage:MontaInfoDamageTaken()
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.on_focus = false
end
@@ -1516,7 +1575,7 @@ function atributo_damage:MontaInfoDamageTaken()
end
end
--]]
end
--[[
@@ -1538,7 +1597,7 @@ end
_table_sort (ActorTargetsSortTable, _detalhes.Sort2)
--]]
--[[exported]] function _detalhes:UpdadeInfoBar (row, index, spellid, name, value, max, percent, icon, detalhes)
--[[exported]] function _detalhes:UpdadeInfoBar (row, index, spellid, name, value, max, percent, icon, detalhes, texCoords)
--> seta o tamanho da barra
if (index == 1) then
row.textura:SetValue (100)
@@ -1558,10 +1617,19 @@ end
--> seta o icone
if (icon) then
row.icone:SetTexture (icon)
if (icon == "Interface\\AddOns\\Details\\images\\classes_small") then
row.icone:SetTexCoord (0.25, 0.49609375, 0.75, 1)
else
row.icone:SetTexCoord (0, 1, 0, 1)
end
else
row.icone:SetTexture ("")
end
if (texCoords) then
row.icone:SetTexCoord (unpack (texCoords))
end
row.minha_tabela = self
row.show = spellid
row:Show() --> mostra a barra
@@ -1606,13 +1674,13 @@ function atributo_damage:MontaInfoDamageDone()
local nome, _, icone = _GetSpellInfo (_spellid)
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone})
end
--> add pets
local ActorPets = self.pets
for _, PetName in _ipairs (ActorPets) do
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
_table_insert (ActorSkillsSortTable, {PetName, PetActor.total, PetActor.total/ActorTotalDamage*100, PetName:gsub ((" <.*"), ""), "Interface\\ICONS\\Ability_Hunter_Pet_Wolf"})
_table_insert (ActorSkillsSortTable, {PetName, PetActor.total, PetActor.total/ActorTotalDamage*100, PetName:gsub ((" <.*"), ""), "Interface\\AddOns\\Details\\images\\classes_small"})
end
end
@@ -1858,11 +1926,15 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra)
if (not _barra.pet) then
_barra.bg.PetIcon = _barra.bg:CreateTexture (nil, "overlay")
_barra.bg.PetIcon:SetTexture ("Interface\\ICONS\\Ability_Druid_SkinTeeth")
--_barra.bg.PetIcon:SetTexture ("Interface\\ICONS\\Ability_Druid_SkinTeeth")
_barra.bg.PetIcon:SetTexture ("Interface\\AddOns\\Details\\images\\classes")
_barra.bg.PetIcon:SetTexCoord (0.25, 0.49609375, 0.75, 1)
_barra.bg.PetIcon:SetPoint ("left", _barra.bg, "left", 2, 2)
_barra.bg.PetIcon:SetWidth (40)
_barra.bg.PetIcon:SetHeight (40)
gump:NewLabel (_barra.bg, _barra.bg, nil, "PetText", "The Actor is a Pet", "GameFontHighlightLeft")
gump:NewLabel (_barra.bg, _barra.bg, nil, "PetText", Loc ["STRING_ISA_PET"], "GameFontHighlightLeft")
_barra.bg.PetText:SetPoint ("topleft", _barra.bg.PetIcon, "topright", 10, -2)
gump:NewLabel (_barra.bg, _barra.bg, nil, "PetDps", "", "GameFontHighlightSmall")
_barra.bg.PetDps:SetPoint ("left", _barra.bg.PetIcon, "right", 10, 2)
@@ -1875,6 +1947,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra)
gump:Fade (_barra.bg.overlay, "OUT")
_barra.bg:SetStatusBarColor (1, 1, 1)
_barra.bg_end:SetPoint ("LEFT", _barra.bg, "LEFT", (_barra.bg:GetValue()*2.19)-6, 0)
_barra.bg.PetIcon:SetVertexColor (_unpack (_detalhes.class_colors [self.classe]))
_barra.bg:Show()
_barra.bg.PetIcon:Show()
_barra.bg.PetText:Show()
+39 -1
View File
@@ -112,6 +112,44 @@ function atributo_energy:NovaTabela (serial, nome, link)
return _new_energyActor
end
function _detalhes.SortGroupEnergy (container, keyName2)
keyName = keyName2
return _table_sort (container, _detalhes.SortKeyGroupEnergy)
end
function _detalhes.SortKeyGroupEnergy (table1, table2)
if (table1.grupo and table2.grupo) then
return table1 [keyName] > table2 [keyName]
elseif (table1.grupo and not table2.grupo) then
return true
elseif (not table1.grupo and table2.grupo) then
return false
else
return table1 [keyName] > table2 [keyName]
end
end
function _detalhes.SortKeySimpleEnergy (table1, table2)
return table1 [keyName] > table2 [keyName]
end
function _detalhes:ContainerSortEnergy (container, amount, keyName2)
keyName = keyName2
_table_sort (container, _detalhes.SortKeySimpleEnergy)
if (amount) then
for i = amount, 1, -1 do --> de trás pra frente
if (container[i][keyName] < 1) then
amount = amount-1
else
break
end
end
return amount
end
end
function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, exportar)
local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura --> pega o container com ._NameIndexTable ._ActorTable
@@ -162,7 +200,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (instancia.atributo == 5) then --> custom
--> faz o sort da categoria e retorna o amount corrigido
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
amount = _detalhes:ContainerSortEnergy (conteudo, amount, keyName)
--> grava o total
instancia.top = conteudo[1][keyName]
+88 -7
View File
@@ -112,6 +112,59 @@ function atributo_heal:NovaTabela (serial, nome, link)
end
function _detalhes.SortGroupHeal (container, keyName2)
keyName = keyName2
return _table_sort (container, _detalhes.SortKeyGroupHeal)
end
function _detalhes.SortKeyGroupHeal (table1, table2)
if (table1.grupo and table2.grupo) then
return table1 [keyName] > table2 [keyName]
elseif (table1.grupo and not table2.grupo) then
return true
elseif (not table1.grupo and table2.grupo) then
return false
else
return table1 [keyName] > table2 [keyName]
end
end
function _detalhes.SortKeySimpleHeal (table1, table2)
return table1 [keyName] > table2 [keyName]
end
function _detalhes:ContainerSortHeal (container, amount, keyName2)
keyName = keyName2
_table_sort (container, _detalhes.SortKeySimpleHeal)
if (amount) then
for i = amount, 1, -1 do --> de trás pra frente
if (container[i][keyName] < 1) then
amount = amount-1
else
break
end
end
return amount
end
end
function atributo_heal:ReportSingleDamagePreventedLine (actor, instancia)
local barra = instancia.barras [actor.minha_barra]
local reportar = {"Details! " .. Loc ["STRING_ATTRIBUTE_HEAL_PREVENT"].. ": " .. actor.nome} --> localize-me
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..""
end
end
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, exportar)
local showing = tabela_do_combate [class_type] --> o que esta sendo mostrado -> [1] - dano [2] - cura
@@ -176,14 +229,14 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
if (instancia.atributo == 5) then --> custom
--> faz o sort da categoria e retorna o amount corrigido
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
amount = _detalhes:ContainerSortHeal (conteudo, amount, keyName)
--> grava o total
instancia.top = conteudo[1][keyName]
elseif (instancia.modo == modo_ALL or sub_atributo == 5) then --> mostrando ALL
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
amount = _detalhes:ContainerSortHeal (conteudo, amount, keyName)
--> pega o total ja aplicado na tabela do combate
total = tabela_do_combate.totals [class_type]
@@ -205,7 +258,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
end
_detalhes:ContainerSort (conteudo, nil, keyName)
_detalhes:ContainerSortHeal (conteudo, nil, keyName)
if (conteudo[1][keyName] < 1) then
amount = 0
@@ -219,7 +272,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
end
else
--_table_sort (conteudo, _detalhes.SortKeyGroup)
_detalhes.SortGroup (conteudo, keyName)
_detalhes.SortGroupHeal (conteudo, keyName)
end
--_table_sort (conteudo, _detalhes.SortKeyGroup)
@@ -317,8 +370,10 @@ function atributo_heal:Custom (_customName, _combat, sub_atributo, spell, alvo)
for _, TargetActor in _ipairs (SkillTargets) do
local TargetActorSelf = _combat (class_type, TargetActor.nome)
TargetActorSelf.custom = TargetActor.total + TargetActorSelf.custom
_combat.totals [_customName] = _combat.totals [_customName] + TargetActor.total
if (TargetActorSelf) then
TargetActorSelf.custom = TargetActor.total + TargetActorSelf.custom
_combat.totals [_customName] = _combat.totals [_customName] + TargetActor.total
end
end
end
end
@@ -713,6 +768,12 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
if (instancia.sub_atributo == 6) then
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, "white")
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
GameCooltip:ShowCooltip()
end
local container = instancia.showing [2]
if (instancia.sub_atributo == 1) then -- 1 or 2 -> healing done or hps
@@ -915,6 +976,26 @@ function atributo_heal:MontaInfoHealTaken()
local max_ = meus_curandeiros [1] and meus_curandeiros [1][2] or 0
local barra
for index, tabela in _ipairs (meus_curandeiros) do
barra = barras [index]
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
end
self:FocusLock (barra, tabela[1])
--hes:UpdadeInfoBar (row, index, spellid, name, value, max, percent, icon, detalhes)
local texCoords = CLASS_ICON_TCOORDS [tabela[4]]
if (not texCoords) then
texCoords = _detalhes.class_coords ["UNKNOW"]
end
self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords)
end
--[[
for index, tabela in _ipairs (meus_curandeiros) do
local barra = barras [index]
@@ -969,7 +1050,7 @@ function atributo_heal:MontaInfoHealTaken()
end
end
--]]
end
function atributo_heal:MontaInfoOverHealing()
+9 -5
View File
@@ -1273,6 +1273,8 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
end
end
local atributo_changed = false
if (atributo ~= meu_atributo or _detalhes.initializing or iniciando_instancia or (instancia.modo == modo_alone or instancia.modo == modo_raid)) then
if (instancia.modo == modo_alone and not (_detalhes.initializing or iniciando_instancia)) then
@@ -1297,6 +1299,8 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
return _detalhes.RaidTables.switch (_, _, -1)
end
atributo_changed = true
instancia.m2_last [instancia.atributo] = instancia.sub_atributo --> salta o último sub-atributo do atributo que esta sendo mostrado na instÇancia
instancia.atributo = atributo
@@ -1355,8 +1359,8 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, atributo, sub_atributo)
end
if (sub_atributo ~= meu_sub_atributo or _detalhes.initializing or iniciando_instancia) then
if (sub_atributo ~= meu_sub_atributo or _detalhes.initializing or iniciando_instancia or atributo_changed) then
instancia.m2_last [instancia.atributo] = sub_atributo
instancia.sub_atributo = sub_atributo
@@ -1453,9 +1457,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
for index, custom in _ipairs (_detalhes.custom) do
CoolTip:AddMenu (2, func, nil, 5, index, custom.name, custom.icon, true)
end
CoolTip:SetLastSelected (2, 5, instancia.m2_last [5])
CoolTip:SetLastSelected (2, 5, instancia.m2_last [5]+1)
CoolTip:SetLastSelected (1, atributo_ativo)
return menu_principal, sub_menus
@@ -1770,6 +1772,8 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
total = self.showing.totals [self.customName]
atributo = _detalhes.custom [self.sub_atributo].attribute
container = self.showing [atributo]._ActorTable
print (total, keyName, first, atributo)
end
for i = 1, amt do
+61 -2
View File
@@ -92,6 +92,44 @@ function _detalhes.SortGroupIfHaveKey (table1, table2)
end
end
function _detalhes.SortGroupMisc (container, keyName2)
keyName = keyName2
return _table_sort (container, _detalhes.SortKeyGroupMisc)
end
function _detalhes.SortKeyGroupMisc (table1, table2)
if (table1.grupo and table2.grupo) then
return table1 [keyName] > table2 [keyName]
elseif (table1.grupo and not table2.grupo) then
return true
elseif (not table1.grupo and table2.grupo) then
return false
else
return table1 [keyName] > table2 [keyName]
end
end
function _detalhes.SortKeySimpleMisc (table1, table2)
return table1 [keyName] > table2 [keyName]
end
function _detalhes:ContainerSortMisc (container, amount, keyName2)
keyName = keyName2
_table_sort (container, _detalhes.SortKeySimpleMisc)
if (amount) then
for i = amount, 1, -1 do --> de trás pra frente
if (container[i][keyName] < 1) then
amount = amount-1
else
break
end
end
return amount
end
end
function atributo_misc:NovaTabela (serial, nome, link)
local _new_miscActor = {
@@ -197,7 +235,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
local barra = instancia.barras [morte.minha_barra]
local reportar = {"Detalhes da morte de " .. morte [3] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me
for i = 1, GameCooltip:GetNumLines() do
local texto_left, texto_right = GameCooltip:GetText (i)
@@ -210,6 +248,27 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
local barra = misc_actor.minha_barra
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_COOLDOWN"] .. " " .. 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
@@ -867,7 +926,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#cooldowns_usados > 0) then
for i = 1, _math_min (3, #cooldowns_usados) do
for i = 1, _math_min (15, #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).."%)")