- Added option for percentage: follow the combat totals or the first player total.
- Added option for show or hide the left buttons on menu bar. - Added option for change the left buttons size in the menu bar. - Added option for delete a instance. - 'Instance Segment' Mini display now is more accuracy about telling the enemy in the segment. - Player Details Window now show all pet abilities instead of just the total pet damage. - Rework done on report texts, now the title is more shorter and also format Dps and Hps numbers. - Simple Gray and again ElvUI skins got some rework. - Added Mind Sear (mastery) for priest in the spell customization. - Fixed the stretch button strata which was making the button shows up to any other frame when hover over. - Lib HotCorner now is broker based and shows up all broker plugins in the bar. - Removed the lower instance consolidate menu. - Removed ErrorReport and SavaData plugins. - NewAPI: _detalhes:GetCombatName() returns the combat enemy, boss, battleground. - NewAPI: _detalhes:DeleteInstance (ID) erase a instance. - NewAPI: _detalhes:GetClassColor (class or actor) return the table with the color.
This commit is contained in:
@@ -219,6 +219,30 @@ function combate:seta_data (tipo)
|
||||
end
|
||||
end
|
||||
|
||||
function combate:GetCombatName (try_find)
|
||||
if (self.is_pvp) then
|
||||
return self.is_pvp.name
|
||||
|
||||
elseif (self.is_boss) then
|
||||
return self.is_boss.encounter
|
||||
|
||||
elseif (self.is_tras) then
|
||||
return Loc ["STRING_SEGMENT_TRASH"]
|
||||
|
||||
else
|
||||
if (self.enemy) then
|
||||
return self.enemy
|
||||
end
|
||||
|
||||
if (try_find) then
|
||||
return _detalhes:FindEnemy()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return Loc ["STRING_UNKNOW"]
|
||||
end
|
||||
|
||||
function combate:GetActorList (container)
|
||||
return self [container]._ActorTable
|
||||
end
|
||||
|
||||
+74
-33
@@ -64,7 +64,6 @@ local ToKFunctions = _detalhes.ToKFunctions
|
||||
local SelectedToKFunction = ToKFunctions [1]
|
||||
local UsingCustomRightText = false
|
||||
|
||||
|
||||
local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
|
||||
|
||||
local info = _detalhes.janela_info
|
||||
@@ -875,13 +874,12 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
end
|
||||
|
||||
--estra mostrando ALL então posso seguir o padrão correto? primeiro, atualiza a scroll bar...
|
||||
--print ("AMOUT: " .. amount)
|
||||
instancia:AtualizarScrollBar (amount)
|
||||
|
||||
--depois faz a atualização normal dele através dos iterators
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras --> evita buscar N vezes a key .barras dentro da instância
|
||||
local percentage_type = instancia.row_info.percent_type
|
||||
|
||||
if (not true) then --> follow tests, not working atm.
|
||||
local myPos = showing._NameIndexTable [_detalhes.playername]
|
||||
@@ -901,7 +899,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
print (myPos, cima, baixo)
|
||||
|
||||
for i = cima, baixo, 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) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
@@ -955,13 +953,13 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
gump:Fade (row1, "out")
|
||||
|
||||
for i = instancia.barraS[1], iter_last, 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
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
else
|
||||
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
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -991,13 +989,13 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
gump:Fade (row1, "out")
|
||||
|
||||
for i = iter_last, instancia.barraS[1], -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
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
else
|
||||
for i = instancia.barraS[2], instancia.barraS[1], -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
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -1073,7 +1071,7 @@ end
|
||||
local actor_class_color_r, actor_class_color_g, actor_class_color_b
|
||||
|
||||
--self = esta classe de dano
|
||||
function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time)
|
||||
function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type)
|
||||
-- instância, container das barras, qual barra, colocação, total?, sub atributo, forçar refresh, key
|
||||
|
||||
local esta_barra = barras_container [qual_barra] --> pega a referência da barra na janela
|
||||
@@ -1093,8 +1091,15 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
|
||||
local damage_total = self.total --> total de dano que este jogador deu
|
||||
local dps
|
||||
local porcentagem = self [keyName] / total * 100
|
||||
|
||||
local porcentagem
|
||||
local esta_porcentagem
|
||||
|
||||
if (percentage_type == 1) then
|
||||
porcentagem = _cstr ("%.1f", self [keyName] / total * 100)
|
||||
elseif (percentage_type == 2) then
|
||||
porcentagem = _cstr ("%.1f", self [keyName] / instancia.top * 100)
|
||||
end
|
||||
|
||||
--tempo da shadow não é mais calculado pela timemachine
|
||||
if ((_detalhes.time_type == 2 and self.grupo) or not _detalhes:CaptureGet ("damage") or not self.shadow) then --not self.shadow is overall but...
|
||||
@@ -1128,7 +1133,7 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
|
||||
-- >>>>>>>>>>>>>>> texto da direita
|
||||
if (instancia.atributo == 5) then --> custom
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (self.custom) .." ".. div_abre .. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (self.custom) .." (" .. porcentagem .. "%)") --seta o texto da direita
|
||||
esta_porcentagem = _math_floor ((self.custom/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
else
|
||||
|
||||
@@ -1139,9 +1144,9 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
local formated_dps = SelectedToKFunction (_, dps)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage, formated_dps, _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage, formated_dps, porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_damage .." ".. div_abre .. formated_dps .. ", ".. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (formated_damage .. " (" .. formated_dps .. ", " .. porcentagem .. "%)") --seta o texto da direita
|
||||
end
|
||||
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -1152,9 +1157,9 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
local formated_dps = SelectedToKFunction (_, dps)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_dps, formated_damage, _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_dps, formated_damage, porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_dps .. " " .. div_abre .. formated_damage .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (formated_dps .. " (" .. formated_damage .. ", " .. porcentagem .. "%)") --seta o texto da direita
|
||||
end
|
||||
esta_porcentagem = _math_floor ((dps/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -1163,9 +1168,9 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
local formated_damage_taken = SelectedToKFunction (_, self.damage_taken)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage_taken, "", _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage_taken, "", porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_damage_taken .." ".. div_abre .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita --
|
||||
esta_barra.texto_direita:SetText (formated_damage_taken .." (" .. porcentagem .. "%)") --seta o texto da direita --
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.damage_taken/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -1174,9 +1179,9 @@ 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 (instancia.row_info.textR_custom_text:ReplaceData (formated_friendly_fire, "", _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_friendly_fire, "", porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_friendly_fire .. " " .. div_abre .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita --
|
||||
esta_barra.texto_direita:SetText (formated_friendly_fire .. " (" .. porcentagem .. "%)") --seta o texto da direita --
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.friendlyfire_total/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -1187,9 +1192,9 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
local formated_dps = SelectedToKFunction (_, dps)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage, formated_dps, _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage, formated_dps, porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_damage .. " " .. div_abre .. formated_dps .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (formated_damage .. " (" .. formated_dps .. ", " .. porcentagem .. "%)") --seta o texto da direita
|
||||
end
|
||||
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -2097,10 +2102,21 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
|
||||
--> add pets
|
||||
local ActorPets = self.pets
|
||||
--local class_color = RAID_CLASS_COLORS [self.classe] and RAID_CLASS_COLORS [self.classe].colorStr
|
||||
local class_color = "FFDDDDDD"
|
||||
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\\AddOns\\Details\\images\\classes_small"})
|
||||
local PetSkillsContainer = PetActor.spell_tables._ActorTable
|
||||
for _spellid, _skill in _pairs (PetSkillsContainer) do --> da foreach em cada spellid do container
|
||||
local nome, _, icone = _GetSpellInfo (_spellid)
|
||||
if (class_color) then
|
||||
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
|
||||
else
|
||||
_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", icone, PetActor})
|
||||
end
|
||||
end
|
||||
--_table_insert (ActorSkillsSortTable, {PetName, PetActor.total, PetActor.total/ActorTotalDamage*100, PetName:gsub ((" <.*"), ""), "Interface\\AddOns\\Details\\images\\classes_small"})
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2120,6 +2136,7 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
self:FocusLock (barra, tabela[1])
|
||||
|
||||
self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], max_, tabela[3], tabela[5], true)
|
||||
barra.other_actor = tabela [6]
|
||||
end
|
||||
|
||||
--> TOP INIMIGOS
|
||||
@@ -2196,12 +2213,14 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
end
|
||||
else
|
||||
local meus_inimigos = {}
|
||||
conteudo = self.targets._ActorTable
|
||||
|
||||
--> my target container
|
||||
conteudo = self.targets._ActorTable
|
||||
for _, tabela in _ipairs (conteudo) do
|
||||
_table_insert (meus_inimigos, {tabela.nome, tabela.total, tabela.total/total*100})
|
||||
end
|
||||
|
||||
--> sort
|
||||
_table_sort (meus_inimigos, function(a, b) return a[2] > b[2] end )
|
||||
|
||||
local amt_alvos = #meus_inimigos
|
||||
@@ -2236,7 +2255,7 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
if (barra.isAlvo) then
|
||||
GameTooltip:Hide()
|
||||
GameTooltip:SetOwner (barra, "ANCHOR_TOPRIGHT")
|
||||
if (not barra.minha_tabela:MontaTooltipAlvos (barra, index)) then
|
||||
if (not barra.minha_tabela:MontaTooltipAlvos (barra, index, instancia)) then
|
||||
return
|
||||
end
|
||||
GameTooltip:Show()
|
||||
@@ -2469,7 +2488,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
|
||||
end
|
||||
|
||||
------ Detalhe Info Damage Done e Dps
|
||||
function atributo_damage:MontaDetalhesDamageDone (spellid, barra)
|
||||
function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
|
||||
|
||||
if (_type (spellid) == "string") then
|
||||
|
||||
@@ -2535,11 +2554,18 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra)
|
||||
return
|
||||
end
|
||||
|
||||
local esta_magia = self.spell_tables._ActorTable [spellid]
|
||||
|
||||
local esta_magia
|
||||
if (barra.other_actor) then
|
||||
esta_magia = barra.other_actor.spell_tables._ActorTable [spellid]
|
||||
else
|
||||
esta_magia = self.spell_tables._ActorTable [spellid]
|
||||
end
|
||||
|
||||
if (not esta_magia) then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
--> icone direito superior
|
||||
local nome, rank, icone = _GetSpellInfo (spellid)
|
||||
local infospell = {nome, rank, icone}
|
||||
@@ -2709,14 +2735,15 @@ function atributo_damage:MontaTooltipDamageTaken (esta_barra, index)
|
||||
|
||||
end
|
||||
|
||||
function atributo_damage:MontaTooltipAlvos (esta_barra, index)
|
||||
function atributo_damage:MontaTooltipAlvos (esta_barra, index, instancia)
|
||||
-- eu ja sei quem é o alvo a mostrar os detalhes
|
||||
-- dar foreach no container de habilidades -- pegar os alvos da habilidade -- e ver se dentro do container tem o meu alvo.
|
||||
|
||||
local inimigo = esta_barra.nome_inimigo
|
||||
local container = self.spell_tables._ActorTable
|
||||
local habilidades = {}
|
||||
local total = self.total_without_pet
|
||||
--local total = self.total_without_pet
|
||||
local total = self.total
|
||||
|
||||
for spellid, tabela in _pairs (container) do
|
||||
--> tabela = classe_damage_habilidade
|
||||
@@ -2724,11 +2751,25 @@ function atributo_damage:MontaTooltipAlvos (esta_barra, index)
|
||||
for _, tabela in _ipairs (alvos) do
|
||||
--> tabela = classe_target
|
||||
if (tabela.nome == inimigo) then
|
||||
habilidades [#habilidades+1] = {spellid, tabela.total}
|
||||
local nome, _, icone = _GetSpellInfo (spellid)
|
||||
habilidades [#habilidades+1] = {nome, tabela.total, icone}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> add pets
|
||||
local ActorPets = self.pets
|
||||
for _, PetName in _ipairs (ActorPets) do
|
||||
local PetActor = instancia.showing (class_type, PetName)
|
||||
if (PetActor) then
|
||||
local PetSkillsContainer = PetActor.spell_tables._ActorTable
|
||||
for _spellid, _skill in _pairs (PetSkillsContainer) do --> da foreach em cada spellid do container
|
||||
local nome, _, icone = _GetSpellInfo (_spellid)
|
||||
habilidades [#habilidades+1] = {nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", _skill.total, icone}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
table.sort (habilidades, function (a, b) return a[2] > b[2] end)
|
||||
|
||||
GameTooltip:AddLine (index..". "..inimigo)
|
||||
@@ -2736,12 +2777,12 @@ function atributo_damage:MontaTooltipAlvos (esta_barra, index)
|
||||
GameTooltip:AddLine (" ")
|
||||
|
||||
for index, tabela in _ipairs (habilidades) do
|
||||
local nome, rank, icone = _GetSpellInfo (tabela[1])
|
||||
|
||||
if (index < 8) then
|
||||
GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
GameTooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t "..tabela[1], _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
|
||||
--GameTooltip:AddTexture (icone)
|
||||
else
|
||||
GameTooltip:AddDoubleLine (index..". "..nome, _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65)
|
||||
GameTooltip:AddDoubleLine (index..". "..tabela[1], _detalhes:comma_value (tabela[2]).." (".._cstr("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -283,6 +283,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras
|
||||
local percentage_type = instancia.row_info.percent_type
|
||||
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
UsingCustomRightText = instancia.row_info.textR_enable_custom_text
|
||||
@@ -326,13 +327,13 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
gump:Fade (row1, "out")
|
||||
|
||||
for i = instancia.barraS[1], iter_last, 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
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
else
|
||||
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) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -361,13 +362,13 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
gump:Fade (row1, "out")
|
||||
|
||||
for i = iter_last, instancia.barraS[1], -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
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
else
|
||||
for i = instancia.barraS[2], instancia.barraS[1], 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -413,7 +414,7 @@ end
|
||||
|
||||
local actor_class_color_r, actor_class_color_g, actor_class_color_b
|
||||
|
||||
function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar)
|
||||
function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type)
|
||||
|
||||
local esta_barra = instancia.barras[qual_barra] --> pega a referência da barra na janela
|
||||
|
||||
@@ -431,15 +432,23 @@ function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
self.colocacao = lugar
|
||||
|
||||
local esta_e_energy_total = self [keyName] --> total de dano que este jogador deu
|
||||
local porcentagem = esta_e_energy_total / total * 100
|
||||
|
||||
-- local porcentagem = esta_e_energy_total / total * 100
|
||||
local porcentagem
|
||||
if (percentage_type == 1) then
|
||||
porcentagem = _cstr ("%.1f", esta_e_energy_total / total * 100)
|
||||
elseif (percentage_type == 2) then
|
||||
porcentagem = _cstr ("%.1f", esta_e_energy_total / instancia.top * 100)
|
||||
end
|
||||
|
||||
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 (instancia.row_info.textR_custom_text:ReplaceData (formated_energy, "", _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_energy, "", porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_energy .. " " .. div_abre .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (formated_energy .. " (" .. porcentagem .. "%)") --seta o texto da direita
|
||||
end
|
||||
|
||||
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
|
||||
|
||||
+28
-19
@@ -362,6 +362,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
--depois faz a atualização normal dele através dos iterators
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras --> evita buscar N vezes a key .barras dentro da instância
|
||||
local percentage_type = instancia.row_info.percent_type
|
||||
|
||||
--print (sub_atributo, total, keyName)
|
||||
|
||||
@@ -407,7 +408,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
gump:Fade (row1, "out")
|
||||
|
||||
for i = instancia.barraS[1], iter_last, 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
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
else
|
||||
@@ -435,12 +436,12 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
gump:Fade (row1, "out")
|
||||
|
||||
for i = iter_last, instancia.barraS[1], -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
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
else
|
||||
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
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -448,7 +449,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
|
||||
elseif (instancia.bars_sort_direction == 2) then --bottom to top
|
||||
for i = instancia.barraS[2], instancia.barraS[1], 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
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
@@ -499,7 +500,7 @@ end
|
||||
local actor_class_color_r, actor_class_color_g, actor_class_color_b
|
||||
|
||||
--function atributo_heal:AtualizaBarra (instancia, qual_barra, lugar, total, sub_atributo, forcar)
|
||||
function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time)
|
||||
function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type)
|
||||
|
||||
local esta_barra = instancia.barras[qual_barra] --> pega a referência da barra na janela
|
||||
|
||||
@@ -518,8 +519,16 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
|
||||
local healing_total = self.total --> total de dano que este jogador deu
|
||||
local hps
|
||||
local porcentagem = self [keyName] / total * 100
|
||||
|
||||
--local porcentagem = self [keyName] / total * 100
|
||||
local porcentagem
|
||||
local esta_porcentagem
|
||||
|
||||
if (percentage_type == 1) then
|
||||
porcentagem = _cstr ("%.1f", self [keyName] / total * 100)
|
||||
elseif (percentage_type == 2) then
|
||||
porcentagem = _cstr ("%.1f", self [keyName] / instancia.top * 100)
|
||||
end
|
||||
|
||||
if ((_detalhes.time_type == 2 and self.grupo) or (not _detalhes:CaptureGet ("heal") and not _detalhes:CaptureGet ("aura")) or not self.shadow) then
|
||||
if (not self.shadow and combat_time == 0) then
|
||||
@@ -552,7 +561,7 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
|
||||
-- >>>>>>>>>>>>>>> texto da direita
|
||||
if (instancia.atributo == 5) then --> custom
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (self.custom) .." ".. div_abre .. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (self.custom) .. " (" .. porcentagem .. "%)") --seta o texto da direita
|
||||
esta_porcentagem = _math_floor ((self.custom/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
else
|
||||
if (sub_atributo == 1) then --> mostrando healing done
|
||||
@@ -562,9 +571,9 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
local formated_hps = SelectedToKFunction (_, hps)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_heal, formated_hps, _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_heal, formated_hps, porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_heal .." ".. div_abre .. formated_hps .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (formated_heal .." (" .. formated_hps .. ", " .. porcentagem .. "%)") --seta o texto da direita
|
||||
end
|
||||
esta_porcentagem = _math_floor ((healing_total/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -575,9 +584,9 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
local formated_hps = SelectedToKFunction (_, hps)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_hps, formated_heal, _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_hps, formated_heal, porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_hps .. " " .. div_abre .. formated_heal .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (formated_hps .. " (" .. formated_heal .. ", " .. porcentagem .. "%)") --seta o texto da direita
|
||||
end
|
||||
esta_porcentagem = _math_floor ((hps/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -586,9 +595,9 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
local formated_overheal = SelectedToKFunction (_, self.totalover)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_overheal, "", _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_overheal, "", porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_overheal .." " .. 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_barra.texto_direita:SetText (formated_overheal .." (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.totalover/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -597,9 +606,9 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
local formated_healtaken = SelectedToKFunction (_, self.healing_taken)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_healtaken, "", _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_healtaken, "", porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_healtaken .. " " .. 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_barra.texto_direita:SetText (formated_healtaken .. " (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.healing_taken/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -608,9 +617,9 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
local formated_enemyheal = SelectedToKFunction (_, self.heal_enemy_amt)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_enemyheal, "", _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_enemyheal, "", porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_enemyheal .. " " .. 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_barra.texto_direita:SetText (formated_enemyheal .. " (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.heal_enemy_amt/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -619,9 +628,9 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
local formated_absorbs = SelectedToKFunction (_, self.totalabsorb)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_absorbs, "", _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_absorbs, "", porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_absorbs .. " " .. 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_barra.texto_direita:SetText (formated_absorbs .. " (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.totalabsorb/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
end
|
||||
|
||||
@@ -74,12 +74,12 @@ end
|
||||
function _detalhes:InstanciaCallFunction (funcao, ...)
|
||||
for index, instancia in _ipairs (_detalhes.tabela_instancias) do
|
||||
if (instancia:IsAtiva()) then --> só reabre se ela estiver ativa
|
||||
funcao (_, instancia, ...) -- > ? seria isso?
|
||||
funcao (_, instancia, ...)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> chama a função para ser executada em todas as instâncias (internal)
|
||||
--> chama a função para ser executada em todas as instâncias (internal)
|
||||
function _detalhes:InstanciaCallFunctionOffline (funcao, ...)
|
||||
for index, instancia in _ipairs (_detalhes.tabela_instancias) do
|
||||
funcao (_, instancia, ...)
|
||||
@@ -194,7 +194,7 @@ end
|
||||
|
||||
if (lower == self.meu_id) then
|
||||
--> os icones dos plugins estao hostiados nessa instancia.
|
||||
_detalhes.ToolBar:ReorganizeIcons (nil, true)
|
||||
_detalhes.ToolBar:ReorganizeIcons (true) --não precisa recarregar toda a skin
|
||||
end
|
||||
|
||||
if (_detalhes.switch.current_instancia and _detalhes.switch.current_instancia == self) then
|
||||
@@ -299,7 +299,7 @@ end
|
||||
|
||||
if (lower == self.meu_id) then
|
||||
--> os icones dos plugins precisam ser hostiados nessa instancia.
|
||||
_detalhes.ToolBar:ReorganizeIcons (nil, true)
|
||||
_detalhes.ToolBar:ReorganizeIcons (true) --> não precisa recarregar toda a skin
|
||||
end
|
||||
|
||||
if (not self.iniciada) then
|
||||
@@ -363,6 +363,43 @@ end
|
||||
end
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:DeleteInstance (id)
|
||||
|
||||
local instance = _detalhes:GetInstance (id)
|
||||
|
||||
if (not instance) then
|
||||
return false
|
||||
end
|
||||
|
||||
--verifica se esta aberta
|
||||
if (instance:IsEnabled()) then
|
||||
instance:ShutDown()
|
||||
end
|
||||
|
||||
--fixas os snaps nas janelas superiores
|
||||
for i = id+1, #_detalhes.tabela_instancias do
|
||||
local this_instance = _detalhes:GetInstance (i)
|
||||
|
||||
--down the id
|
||||
this_instance.meu_id = i-1
|
||||
|
||||
--fix the snaps
|
||||
for index, id in _pairs (this_instance.snap) do
|
||||
if (id == i+1) then --snap na proxima instancia
|
||||
this_instance.snap [index] = i
|
||||
elseif (id == i-1) then --snap na instancia anterior
|
||||
this_instance.snap [index] = i-2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--remover do container tabela_instancias
|
||||
tremove (_detalhes.tabela_instancias, id)
|
||||
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
--> cria uma nova instância e a joga para o container de instâncias
|
||||
|
||||
function _detalhes:CreateInstance (id)
|
||||
@@ -887,9 +924,6 @@ end
|
||||
--> change the attribute
|
||||
_detalhes:TrocaTabela (new_instance, 0, 1, 1)
|
||||
|
||||
--> handle icons
|
||||
new_instance:DefaultIcons (true, true, true, true)
|
||||
|
||||
--> internal stuff
|
||||
new_instance.row_height = new_instance.row_info.height + new_instance.row_info.space.between
|
||||
|
||||
@@ -928,14 +962,20 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--> apply all changed attributes
|
||||
instance:ChangeSkin()
|
||||
end
|
||||
|
||||
--> apply all changed attributes
|
||||
new_instance:ChangeSkin()
|
||||
|
||||
return new_instance
|
||||
end
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:FixToolbarMenu (instance)
|
||||
--print ("fixing...", instance.meu_id)
|
||||
--instance:ToolbarMenuButtons()
|
||||
end
|
||||
|
||||
--> ao reiniciar o addon esta função é rodada para recriar a janela da instância
|
||||
--> search key: ~restaura ~inicio ~start
|
||||
function _detalhes:RestauraJanela (index, temp)
|
||||
@@ -1051,11 +1091,6 @@ function _detalhes:RestauraJanela (index, temp)
|
||||
self:ReajustaGump()
|
||||
self:SaveMainWindowPosition()
|
||||
|
||||
-- chama 6 vezes a função de mudar skin...
|
||||
|
||||
self:DefaultIcons (true, true, true, true)
|
||||
|
||||
|
||||
self.iniciada = true
|
||||
self:AtivarInstancia (temp)
|
||||
|
||||
@@ -1937,9 +1972,9 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
local report_lines = {}
|
||||
|
||||
if (self.atributo == 5) then --> custom
|
||||
report_lines [#report_lines+1] = "Details! " .. Loc ["STRING_CUSTOM_REPORT"] .. " " .. self.customName
|
||||
report_lines [#report_lines+1] = "Details!: " .. self.customName .. " " .. Loc ["STRING_CUSTOM_REPORT"]
|
||||
else
|
||||
report_lines [#report_lines+1] = "Details! " .. Loc ["STRING_REPORT"] .. " " .. _detalhes.sub_atributos [self.atributo].lista [self.sub_atributo]
|
||||
report_lines [#report_lines+1] = "Details!: " .. _detalhes.sub_atributos [self.atributo].lista [self.sub_atributo]
|
||||
end
|
||||
|
||||
local barras = self.barras
|
||||
@@ -2046,7 +2081,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
end
|
||||
|
||||
report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _math_floor (dps) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
|
||||
report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_math_floor (dps)) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
|
||||
else
|
||||
report_lines [#report_lines+1] = i..". ".. _thisActor.nome.." ".. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)"
|
||||
end
|
||||
@@ -2148,7 +2183,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
end
|
||||
|
||||
report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _math_floor (dps) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
|
||||
report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_math_floor (dps)) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")"
|
||||
else
|
||||
report_lines [#report_lines+1] = i..".".. _thisActor.nome.." ".. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)"
|
||||
end
|
||||
@@ -2199,18 +2234,25 @@ function _detalhes:envia_relatorio (linhas, custom)
|
||||
if (not custom) then
|
||||
if (segmento == -1) then --overall
|
||||
luta = Loc ["STRING_REPORT_LAST"] .. " " .. #_detalhes.tabela_historico.tabelas .. " " .. Loc ["STRING_REPORT_FIGHTS"]
|
||||
|
||||
elseif (segmento == 0) then --current
|
||||
|
||||
if (_detalhes.tabela_vigente.is_boss) then
|
||||
local encounterName = _detalhes.tabela_vigente.is_boss.name
|
||||
if (encounterName) then
|
||||
luta = _detalhes.segmentos.current .. " " .. Loc ["STRING_AGAINST"] .. " " .. encounterName
|
||||
luta = encounterName
|
||||
end
|
||||
|
||||
elseif (_detalhes.tabela_vigente.is_pvp) then
|
||||
local battleground_name = _detalhes.tabela_vigente.is_pvp.name
|
||||
if (battleground_name) then
|
||||
luta = battleground_name
|
||||
end
|
||||
end
|
||||
|
||||
if (not luta) then
|
||||
if (_detalhes.tabela_vigente.enemy) then
|
||||
luta = _detalhes.segmentos.current .. " " .. Loc ["STRING_AGAINST"] .. " " .. _detalhes.tabela_vigente.enemy
|
||||
luta = _detalhes.tabela_vigente.enemy
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2223,13 +2265,19 @@ function _detalhes:envia_relatorio (linhas, custom)
|
||||
if (_detalhes.tabela_historico.tabelas[1].is_boss) then
|
||||
local encounterName = _detalhes.tabela_historico.tabelas[1].is_boss.name
|
||||
if (encounterName) then
|
||||
luta = Loc ["STRING_REPORT_LASTFIGHT"] .. " " .. Loc ["STRING_AGAINST"] .. " " .. encounterName
|
||||
luta = encounterName .. " (" .. Loc ["STRING_REPORT_LASTFIGHT"] .. ")"
|
||||
end
|
||||
|
||||
elseif (_detalhes.tabela_historico.tabelas[1].is_pvp) then
|
||||
local battleground_name = _detalhes.tabela_historico.tabelas[1].is_pvp.name
|
||||
if (battleground_name) then
|
||||
luta = battleground_name .. " (" .. Loc ["STRING_REPORT_LASTFIGHT"] .. ")"
|
||||
end
|
||||
end
|
||||
|
||||
if (not luta) then
|
||||
if (_detalhes.tabela_historico.tabelas[1].enemy) then
|
||||
luta = Loc ["STRING_REPORT_LASTFIGHT"] .. " " .. Loc ["STRING_AGAINST"] .. " " .. _detalhes.tabela_historico.tabelas[1].enemy
|
||||
luta = _detalhes.tabela_historico.tabelas[1].enemy .. " (" .. Loc ["STRING_REPORT_LASTFIGHT"] .. ")"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2242,23 +2290,29 @@ function _detalhes:envia_relatorio (linhas, custom)
|
||||
if (_detalhes.tabela_historico.tabelas[segmento].is_boss) then
|
||||
local encounterName = _detalhes.tabela_historico.tabelas[segmento].is_boss.name
|
||||
if (encounterName) then
|
||||
luta = segmento .. " " .. Loc ["STRING_REPORT_PREVIOUSFIGHTS"] .. " " .. Loc ["STRING_AGAINST"] .. " " .. encounterName
|
||||
luta = encounterName .. " (" .. segmento .. " " .. Loc ["STRING_REPORT_PREVIOUSFIGHTS"] .. ")"
|
||||
end
|
||||
|
||||
elseif (_detalhes.tabela_historico.tabelas[segmento].is_pvp) then
|
||||
local battleground_name = _detalhes.tabela_historico.tabelas[segmento].is_pvp.name
|
||||
if (battleground_name) then
|
||||
luta = battleground_name .. " (" .. Loc ["STRING_REPORT_LASTFIGHT"] .. ")"
|
||||
end
|
||||
end
|
||||
|
||||
if (not luta) then
|
||||
if (_detalhes.tabela_historico.tabelas[segmento].enemy) then
|
||||
luta = segmento .. " " .. Loc ["STRING_REPORT_PREVIOUSFIGHTS"] .. " " .. Loc ["STRING_AGAINST"] .. " " .. _detalhes.tabela_historico.tabelas[segmento].enemy
|
||||
luta = _detalhes.tabela_historico.tabelas[segmento].enemy .. " (" .. segmento .. " " .. Loc ["STRING_REPORT_PREVIOUSFIGHTS"] .. ")"
|
||||
end
|
||||
end
|
||||
|
||||
if (not luta) then
|
||||
luta = segmento .. " " .. Loc ["STRING_REPORT_PREVIOUSFIGHTS"]
|
||||
luta = " (" .. segmento .. " " .. Loc ["STRING_REPORT_PREVIOUSFIGHTS"] .. ")"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
linhas[1] = linhas[1] .. ". " .. Loc ["STRING_REPORT_FIGHT"] .. ": " .. luta
|
||||
linhas[1] = linhas[1] .. " " .. Loc ["STRING_REPORT"] .. " " .. luta
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -73,6 +73,10 @@ _detalhes.instance_defaults = {
|
||||
--menus:
|
||||
--anchor store the anchor point of main menu
|
||||
menu_anchor = {5, 1, side = 1},
|
||||
--icons on menu
|
||||
menu_icons = {true, true, true, true},
|
||||
--menu icons size multiplicator factor
|
||||
menu_icons_size = 1.0,
|
||||
--auto hide window borders
|
||||
menu_alpha = {enabled = false, iconstoo = true, onenter = 1, onleave = 1, ignorebars = false},
|
||||
--auto hide menu
|
||||
@@ -134,6 +138,8 @@ _detalhes.instance_defaults = {
|
||||
icon_file = [[Interface\AddOns\Details\images\classes_small]],
|
||||
no_icon = false,
|
||||
start_after_icon = true,
|
||||
--percent type
|
||||
percent_type = 1,
|
||||
|
||||
},
|
||||
--instance window color
|
||||
|
||||
@@ -465,6 +465,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
--depois faz a atualização normal dele através dos iterators
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras
|
||||
local percentage_type = instancia.row_info.percent_type
|
||||
|
||||
if (instancia.bars_sort_direction == 1) then
|
||||
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
@@ -569,18 +570,19 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
--depois faz a atualização normal dele através dos iterators
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras
|
||||
local percentage_type = instancia.row_info.percent_type
|
||||
|
||||
UsingCustomRightText = instancia.row_info.textR_enable_custom_text
|
||||
|
||||
if (instancia.bars_sort_direction == 1) then --top to bottom
|
||||
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) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, nil, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
elseif (instancia.bars_sort_direction == 2) then --bottom to top
|
||||
for i = instancia.barraS[2], instancia.barraS[1], 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) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, nil, percentage_type) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
@@ -628,7 +630,7 @@ end
|
||||
|
||||
local actor_class_color_r, actor_class_color_g, actor_class_color_b
|
||||
|
||||
function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, is_dead)
|
||||
function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, is_dead, percentage_type)
|
||||
|
||||
--print (self.ress)
|
||||
|
||||
@@ -651,13 +653,20 @@ function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
if (not meu_total) then
|
||||
return
|
||||
end
|
||||
local porcentagem = meu_total / total * 100
|
||||
|
||||
--local porcentagem = meu_total / total * 100
|
||||
if (not percentage_type or percentage_type == 1) then
|
||||
porcentagem = _cstr ("%.1f", meu_total / total * 100)
|
||||
elseif (percentage_type == 2) then
|
||||
porcentagem = _cstr ("%.1f", meu_total / instancia.top * 100)
|
||||
end
|
||||
|
||||
local esta_porcentagem = _math_floor ((meu_total/instancia.top) * 100)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (meu_total, "", _cstr ("%.1f", porcentagem)))
|
||||
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (meu_total, "", porcentagem))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (meu_total .." ".. div_abre .. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (meu_total .." (" .. porcentagem .. "%)") --seta o texto da direita
|
||||
end
|
||||
|
||||
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
|
||||
|
||||
Reference in New Issue
Block a user