- Major improvements on row text scripts, now they pass 4 objects: actor, combat, instance and the default text of the bar.

- Added warrior Whirlwind, deamonhunter Fracture, rogue Mutilate to spell consolidation.
This commit is contained in:
Tercio
2018-10-30 19:40:07 -03:00
parent 24eebefb6f
commit 8dd8714dd5
9 changed files with 300 additions and 306 deletions
+3 -2
View File
@@ -538,10 +538,11 @@
end
else
local formated_value = SelectedToKFunction (_, self.value)
local rightText = formated_value .. bars_brackets[1] .. percent .. bars_brackets[2]
if (UsingCustomRightText) then
row.texto_direita:SetText (_string_replace (instance.row_info.textR_custom_text, formated_value, "", percent, self))
row.texto_direita:SetText (_string_replace (instance.row_info.textR_custom_text, formated_value, "", percent, self, combat, instance, rightText))
else
row.texto_direita:SetText (formated_value .. bars_brackets[1] .. percent .. bars_brackets[2])
row.texto_direita:SetText (rightText)
end
end
+136 -151
View File
@@ -1522,28 +1522,27 @@
porcentagem = _cstr ("%.1f", self.damage / top * 100)
end
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self))
local bars_show_data = instancia.row_info.textR_show_data
local bars_brackets = instancia:GetBarBracket()
local bars_separator = instancia:GetBarSeparator()
if (not bars_show_data [1]) then
formated_damage = ""
end
if (not bars_show_data [2]) then
formated_dps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
local bars_show_data = instancia.row_info.textR_show_data
local bars_brackets = instancia:GetBarBracket()
local bars_separator = instancia:GetBarSeparator()
if (not bars_show_data [1]) then
formated_damage = ""
end
if (not bars_show_data [2]) then
formated_dps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_damage .. bars_brackets[1] .. formated_dps .. bars_separator .. porcentagem .. bars_brackets[2])
porcentagem = porcentagem .. "%"
end
local rightText = formated_damage .. bars_brackets[1] .. formated_dps .. bars_separator .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. self.nome)
@@ -2416,23 +2415,23 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
local formated_dps = SelectedToKFunction (_, dps)
esta_barra.ps_text = formated_dps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self, instancia.showing))
if (not bars_show_data [1]) then
formated_damage = ""
end
if (not bars_show_data [2]) then
formated_dps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
if (not bars_show_data [1]) then
formated_damage = ""
end
if (not bars_show_data [2]) then
formated_dps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
--(bars_show_data [3] and bars_show_data [2] and bars_separator or "")
esta_barra.texto_direita:SetText (formated_damage .. bars_brackets[1] .. formated_dps .. bars_separator .. porcentagem .. bars_brackets[2])
porcentagem = porcentagem .. "%"
end
local rightText = formated_damage .. bars_brackets[1] .. formated_dps .. bars_separator .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100)
@@ -2452,46 +2451,49 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
diff_from_topdps = instancia.player_top_dps - raw_dps
end
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_dps, formated_damage, porcentagem, self, instancia.showing))
local rightText
if (diff_from_topdps) then
local threshold = diff_from_topdps / instancia.player_top_dps_threshold * 100
if (threshold < 100) then
threshold = _math_abs (threshold - 100)
else
threshold = 5
end
local rr, gg, bb = _detalhes:percent_color ( threshold )
rr, gg, bb = _detalhes:hex (_math_floor (rr*255)), _detalhes:hex (_math_floor (gg*255)), "28"
local color_percent = "" .. rr .. gg .. bb .. ""
if (not bars_show_data [1]) then
formated_dps = ""
end
if (not bars_show_data [2]) then
color_percent = ""
else
color_percent = bars_brackets[1] .. "|cFFFF4444-|r|cFF" .. color_percent .. SelectedToKFunction (_, _math_floor (diff_from_topdps)) .. "|r" .. bars_brackets[2]
end
rightText = formated_dps .. color_percent
else
if (diff_from_topdps) then
local threshold = diff_from_topdps / instancia.player_top_dps_threshold * 100
if (threshold < 100) then
threshold = _math_abs (threshold - 100)
else
threshold = 5
end
local rr, gg, bb = _detalhes:percent_color ( threshold )
rr, gg, bb = _detalhes:hex (_math_floor (rr*255)), _detalhes:hex (_math_floor (gg*255)), "28"
local color_percent = "" .. rr .. gg .. bb .. ""
if (not bars_show_data [1]) then
formated_dps = ""
end
if (not bars_show_data [2]) then
color_percent = ""
else
color_percent = bars_brackets[1] .. "|cFFFF4444-|r|cFF" .. color_percent .. SelectedToKFunction (_, _math_floor (diff_from_topdps)) .. "|r" .. bars_brackets[2]
end
esta_barra.texto_direita:SetText (formated_dps .. color_percent)
else
local icon = " |TInterface\\GROUPFRAME\\UI-Group-LeaderIcon:14:14:0:0:16:16:0:16:0:16|t "
if (not bars_show_data [1]) then
formated_dps = ""
end
if (not bars_show_data [2]) then
icon = ""
end
esta_barra.texto_direita:SetText (formated_dps .. icon)
local icon = " |TInterface\\GROUPFRAME\\UI-Group-LeaderIcon:14:14:0:0:16:16:0:16:0:16|t "
if (not bars_show_data [1]) then
formated_dps = ""
end
if (not bars_show_data [2]) then
icon = ""
end
rightText = formated_dps .. icon
end
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_dps, formated_damage, porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((dps/instancia.top) * 100)
elseif (sub_atributo == 3) then --> mostrando damage taken
@@ -2502,21 +2504,23 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
local formated_dtps = SelectedToKFunction (_, dtps)
esta_barra.ps_text = formated_dtps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage_taken, formated_dtps, porcentagem, self, instancia.showing))
if (not bars_show_data [1]) then
formated_damage_taken = ""
end
if (not bars_show_data [2]) then
formated_dtps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
if (not bars_show_data [1]) then
formated_damage_taken = ""
end
if (not bars_show_data [2]) then
formated_dtps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_damage_taken .. bars_brackets[1] .. formated_dtps .. bars_separator .. porcentagem .. bars_brackets[2])
porcentagem = porcentagem .. "%"
end
local rightText = formated_damage_taken .. bars_brackets[1] .. formated_dtps .. bars_separator .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage_taken, formated_dtps, porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((self.damage_taken/instancia.top) * 100)
@@ -2525,20 +2529,20 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
local formated_friendly_fire = SelectedToKFunction (_, self.friendlyfire_total)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_friendly_fire, "", porcentagem, self, instancia.showing))
if (not bars_show_data [1]) then
formated_friendly_fire = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
if (not bars_show_data [1]) then
formated_friendly_fire = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_friendly_fire .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
local rightText = formated_friendly_fire .. bars_brackets[1] .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_friendly_fire, "", porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((self.friendlyfire_total/instancia.top) * 100)
@@ -2550,51 +2554,26 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
local formated_dtps = SelectedToKFunction (_, dtps)
esta_barra.ps_text = formated_dtps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage_taken, formated_dtps, porcentagem, self, instancia.showing))
if (not bars_show_data [1]) then
formated_damage_taken = ""
end
if (not bars_show_data [2]) then
formated_dtps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
if (not bars_show_data [1]) then
formated_damage_taken = ""
end
if (not bars_show_data [2]) then
formated_dtps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_damage_taken .. bars_brackets[1] .. formated_dtps .. bars_separator .. porcentagem .. bars_brackets[2])
porcentagem = porcentagem .. "%"
end
local rightText = formated_damage_taken .. bars_brackets[1] .. formated_dtps .. bars_separator .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage_taken, formated_dtps, porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((self.damage_taken/instancia.top) * 100)
--[[
dps = _math_floor (dps)
local formated_damage = SelectedToKFunction (_, damage_total)
local formated_dps = SelectedToKFunction (_, dps)
esta_barra.ps_text = formated_dps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self, instancia.showing))
else
if (not bars_show_data [1]) then
formated_damage = ""
end
if (not bars_show_data [2]) then
formated_dps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_damage .. bars_brackets[1] .. formated_dps .. bars_separator .. porcentagem .. bars_brackets[2])
end
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100)
--]]
end
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
@@ -2697,46 +2676,52 @@ local InBarIconPadding = 6
if (arena_enemy) then
if (_detalhes.show_arena_role_icon) then
--> show arena role icon
local leftText = bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t " .. self.displayName
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t ", self, instance.showing))
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t ", self, instance.showing, instance, leftText))
else
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t " .. self.displayName)
bar.texto_esquerdo:SetText (leftText)
end
else
--don't show arena role icon
local leftText = bar_number .. self.displayName
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, " ", self, instance.showing))
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, " ", self, instance.showing, instance, leftText))
else
bar.texto_esquerdo:SetText (bar_number .. self.displayName)
bar.texto_esquerdo:SetText (leftText)
end
end
else
if (_detalhes.faction_against == "Horde") then
local leftText = bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:32:0:32:0:32|t"..self.displayName
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:32:0:32:0:32|t", self, instance.showing))
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:32:0:32:0:32|t", self, instance.showing, instance, leftText))
else
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
bar.texto_esquerdo:SetText (leftText) --seta o texto da esqueda -- HORDA
end
else --alliance
local leftText = bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:32:32:64:0:32|t"..self.displayName
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:32:32:64:0:32|t", self, instance.showing))
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:32:32:64:0:32|t", self, instance.showing, instance, leftText))
else
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
bar.texto_esquerdo:SetText (leftText) --seta o texto da esqueda -- ALLY
end
end
end
else
if (arena_ally and _detalhes.show_arena_role_icon) then
local leftText = bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t " .. self.displayName
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t ", self, instance.showing))
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t ", self, instance.showing, instance, leftText))
else
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. (instance.row_info.height - InBarIconPadding)..":"..(instance.row_info.height - InBarIconPadding) .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t " .. self.displayName)
bar.texto_esquerdo:SetText (leftText)
end
else
local leftText = bar_number .. self.displayName
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "", self, instance.showing))
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "", self, instance.showing, instance, leftText))
else
bar.texto_esquerdo:SetText (bar_number .. self.displayName) --seta o texto da esqueda
bar.texto_esquerdo:SetText (leftText) --seta o texto da esqueda
end
end
end
+33 -32
View File
@@ -225,27 +225,27 @@ function atributo_energy:AtualizarResources (qual_barra, colocacao, instancia)
porcentagem = _cstr ("%.1f", self.resource / instancia.top * 100)
end
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_resource, formated_rps, porcentagem, self))
else
local bars_show_data = instancia.row_info.textR_show_data
local bars_brackets = instancia:GetBarBracket()
local bars_separator = instancia:GetBarSeparator()
local bars_show_data = instancia.row_info.textR_show_data
local bars_brackets = instancia:GetBarBracket()
local bars_separator = instancia:GetBarSeparator()
if (not bars_show_data [1]) then
formated_resource = ""
end
if (not bars_show_data [2]) then
formated_rps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_resource .. bars_brackets[1] .. formated_rps .. bars_separator .. porcentagem .. bars_brackets[2])
if (not bars_show_data [1]) then
formated_resource = ""
end
if (not bars_show_data [2]) then
formated_rps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
local rightText = formated_resource .. bars_brackets[1] .. formated_rps .. bars_separator .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_resource, formated_rps, porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. self.nome)
@@ -665,20 +665,21 @@ function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra,
local esta_porcentagem = _math_floor ((esta_e_energy_total/instancia.top) * 100)
local formated_energy = SelectedToKFunction (_, esta_e_energy_total)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_energy, "", porcentagem, self, instancia.showing))
if (not bars_show_data [1]) then
formated_energy = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
if (not bars_show_data [1]) then
formated_energy = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_energy .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
local rightText = formated_energy .. bars_brackets[1] .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_energy, "", porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
+100 -97
View File
@@ -637,23 +637,23 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
local formated_hps = SelectedToKFunction (_, hps)
esta_barra.ps_text = formated_hps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_heal, formated_hps, porcentagem, self, instancia.showing))
if (not bars_show_data [1]) then
formated_heal = ""
end
if (not bars_show_data [2]) then
formated_hps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
if (not bars_show_data [1]) then
formated_heal = ""
end
if (not bars_show_data [2]) then
formated_hps = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_heal .. bars_brackets[1] .. formated_hps .. bars_separator .. porcentagem .. bars_brackets[2])
local rightText = formated_heal .. bars_brackets[1] .. formated_hps .. bars_separator .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_heal, formated_hps, porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((healing_total/instancia.top) * 100)
@@ -664,24 +664,25 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
local formated_hps = SelectedToKFunction (_, hps)
esta_barra.ps_text = formated_hps
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_hps, formated_heal, porcentagem, self, instancia.showing))
else
if (not bars_show_data [1]) then
formated_hps = ""
end
if (not bars_show_data [2]) then
formated_heal = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_hps .. bars_brackets[1] .. formated_heal .. bars_separator .. porcentagem .. bars_brackets[2])
if (not bars_show_data [1]) then
formated_hps = ""
end
if (not bars_show_data [2]) then
formated_heal = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
local rightText = formated_hps .. bars_brackets[1] .. formated_heal .. bars_separator .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_hps, formated_heal, porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((hps/instancia.top) * 100)
elseif (sub_atributo == 3) then --> mostrando overall
@@ -695,62 +696,64 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
rr, gg, bb = _detalhes:hex (_math_floor (rr*255)), _detalhes:hex (_math_floor (gg*255)), _detalhes:hex (_math_floor (bb*255))
overheal_percent = "|cFF" .. rr .. gg .. bb .. overheal_percent .. "|r"
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_overheal, "", overheal_percent, self, instancia.showing))
else
if (not bars_show_data [1]) then
formated_overheal = ""
end
if (not bars_show_data [3]) then
overheal_percent = ""
else
overheal_percent = overheal_percent .. "%"
end
esta_barra.texto_direita:SetText (formated_overheal .. bars_brackets[1] .. overheal_percent .. bars_brackets[2])
if (not bars_show_data [1]) then
formated_overheal = ""
end
if (not bars_show_data [3]) then
overheal_percent = ""
else
overheal_percent = overheal_percent .. "%"
end
local rightText = formated_overheal .. bars_brackets[1] .. overheal_percent .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_overheal, "", overheal_percent, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((self.totalover/instancia.top) * 100)
elseif (sub_atributo == 4) then --> mostrando healing taken
local formated_healtaken = SelectedToKFunction (_, self.healing_taken)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_healtaken, "", porcentagem, self, instancia.showing))
else
if (not bars_show_data [1]) then
formated_healtaken = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_healtaken .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
if (not bars_show_data [1]) then
formated_healtaken = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
local rightText = formated_healtaken .. bars_brackets[1] .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_healtaken, "", porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((self.healing_taken/instancia.top) * 100)
elseif (sub_atributo == 5) then --> mostrando enemy heal
local formated_enemyheal = SelectedToKFunction (_, self.heal_enemy_amt)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_enemyheal, "", porcentagem, self, instancia.showing))
if (not bars_show_data [1]) then
formated_enemyheal = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
if (not bars_show_data [1]) then
formated_enemyheal = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_enemyheal .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
porcentagem = porcentagem .. "%"
end
local rightText = formated_enemyheal .. bars_brackets[1] .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_enemyheal, "", porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((self.heal_enemy_amt/instancia.top) * 100)
@@ -758,20 +761,20 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
local formated_absorbs = SelectedToKFunction (_, self.totalabsorb)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_absorbs, "", porcentagem, self, instancia.showing))
if (not bars_show_data [1]) then
formated_absorbs = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
if (not bars_show_data [1]) then
formated_absorbs = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_absorbs .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
local rightText = formated_absorbs .. bars_brackets[1] .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_absorbs, "", porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((self.totalabsorb/instancia.top) * 100)
@@ -779,20 +782,20 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
local formated_absorbs = SelectedToKFunction (_, self.totaldenied)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_absorbs, "", porcentagem, self, instancia.showing))
if (not bars_show_data [1]) then
formated_absorbs = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
if (not bars_show_data [1]) then
formated_absorbs = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (formated_absorbs .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
local rightText = formated_absorbs .. bars_brackets[1] .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_absorbs, "", porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
esta_porcentagem = _math_floor ((self.totaldenied/instancia.top) * 100)
+12 -13
View File
@@ -873,21 +873,20 @@ function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, l
local esta_porcentagem = _math_floor ((meu_total/instancia.top) * 100)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, meu_total, "", porcentagem, self, instancia.showing))
if (not bars_show_data [1]) then
meu_total = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
if (not bars_show_data [1]) then
meu_total = ""
end
if (not bars_show_data [3]) then
porcentagem = ""
else
porcentagem = porcentagem .. "%"
end
esta_barra.texto_direita:SetText (meu_total .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
local rightText = meu_total .. bars_brackets[1] .. porcentagem .. bars_brackets[2]
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, meu_total, "", porcentagem, self, instancia.showing, instancia, rightText))
else
esta_barra.texto_direita:SetText (rightText)
end
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip