- Mode menu now have a sub menu for raid plugins.
- Red and Green colors under comparison frame has been inverted. - Fixed some report issues with dps and hps, also almost all reports now have guide lines. - Fixed DPS and HPS bug involving 'Everything Mode'. - NewAPI: ActorObject:GetBarColor() return the color in r, b, g which the actor's bar should be filled.
This commit is contained in:
+59
-42
@@ -53,6 +53,7 @@
|
||||
local TooltipMaximizedMethod = 1
|
||||
|
||||
local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
|
||||
local is_player_class = _detalhes.player_class
|
||||
|
||||
local key_overlay = {1, 1, 1, .1}
|
||||
local key_overlay_press = {1, 1, 1, .2}
|
||||
@@ -193,6 +194,30 @@
|
||||
return table1 [4] > table2 [4]
|
||||
end
|
||||
|
||||
--[[exported]] function _detalhes:GetBarColor (actor)
|
||||
actor = actor or self
|
||||
|
||||
if (actor.owner) then
|
||||
return _unpack (_detalhes.class_colors [actor.owner.classe])
|
||||
|
||||
elseif (actor.monster) then
|
||||
return _unpack (_detalhes.class_colors.ENEMY)
|
||||
|
||||
elseif (actor.arena_enemy) then
|
||||
return _unpack (_detalhes.class_colors.ARENA_ENEMY)
|
||||
|
||||
elseif (actor.arena_ally) then
|
||||
return _unpack (_detalhes.class_colors.ARENA_ALLY)
|
||||
|
||||
else
|
||||
if (not is_player_class [actor.classe] and _bit_band (actor.flag_original, 0x00000020) ~= 0) then --> neutral
|
||||
return _unpack (_detalhes.class_colors.NEUTRAL)
|
||||
else
|
||||
return _unpack (_detalhes.class_colors [actor.classe])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internals
|
||||
|
||||
@@ -251,6 +276,9 @@
|
||||
|
||||
-- dps (calculate dps for actors)
|
||||
function atributo_damage:ContainerRefreshDps (container, combat_time)
|
||||
|
||||
local total = 0
|
||||
|
||||
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet ("damage")) then
|
||||
for _, actor in _ipairs (container) do
|
||||
if (actor.grupo) then
|
||||
@@ -258,13 +286,17 @@
|
||||
else
|
||||
actor.last_dps = actor.total / actor:Tempo()
|
||||
end
|
||||
total = total + actor.last_dps
|
||||
end
|
||||
else
|
||||
for _, actor in _ipairs (container) do
|
||||
actor.last_dps = actor.total / actor:Tempo()
|
||||
total = total + actor.last_dps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return total
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> frags
|
||||
@@ -803,22 +835,20 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
--> grava o total
|
||||
instancia.top = conteudo[1][keyName]
|
||||
|
||||
--print ("aqui", amount, total, instancia.top)
|
||||
|
||||
elseif (modo == modo_ALL) then --> mostrando ALL
|
||||
|
||||
--> faz o sort da categoria e retorna o amount corrigido
|
||||
--print (keyName)
|
||||
if (sub_atributo == 2) then
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
|
||||
total = atributo_damage:ContainerRefreshDps (conteudo, combat_time)
|
||||
else
|
||||
--> pega o total ja aplicado na tabela do combate
|
||||
total = tabela_do_combate.totals [class_type]
|
||||
end
|
||||
|
||||
amount = _detalhes:ContainerSort (conteudo, amount, keyName)
|
||||
|
||||
--> pega o total ja aplicado na tabela do combate
|
||||
total = tabela_do_combate.totals [class_type]
|
||||
|
||||
--> grava o total
|
||||
instancia.top = conteudo[1][keyName]
|
||||
|
||||
@@ -864,7 +894,6 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
_table_sort (conteudo, _detalhes.SortKeyGroup)
|
||||
end
|
||||
--
|
||||
|
||||
if (not using_cache) then
|
||||
for index, player in _ipairs (conteudo) do
|
||||
if (player.grupo) then --> é um player e esta em grupo
|
||||
@@ -882,6 +911,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -891,7 +921,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end
|
||||
|
||||
if (exportar) then
|
||||
return total, keyName, instancia.top
|
||||
return total, keyName, instancia.top, amount
|
||||
end
|
||||
|
||||
if (amount < 1) then --> não há barras para mostrar
|
||||
@@ -1242,19 +1272,7 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
forcar = true
|
||||
end
|
||||
|
||||
if (self.owner) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
|
||||
|
||||
elseif (self.monster) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors.ENEMY)
|
||||
|
||||
else
|
||||
if (_bit_band (self.flag_original, 0x00000020) ~= 0) then --> neutral
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = 1, 1, 0
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
end
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
|
||||
return self:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, qual_barra, barras_container)
|
||||
|
||||
@@ -1334,17 +1352,7 @@ end
|
||||
--[[ exported]] function _detalhes:RefreshBarra (esta_barra, instancia, from_resize)
|
||||
|
||||
if (from_resize) then
|
||||
if (self.owner) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
|
||||
elseif (self.monster) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors.ENEMY)
|
||||
else
|
||||
if (_bit_band (self.flag_original, 0x00000020) ~= 0) then --> neutral
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = 1, 1, 0
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
end
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
@@ -1389,19 +1397,28 @@ end
|
||||
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method
|
||||
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
|
||||
end
|
||||
|
||||
|
||||
if (self.enemy) then
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
|
||||
if (self.arena_enemy) then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
|
||||
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
|
||||
end
|
||||
end
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
|
||||
if (self.arena_ally) then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
|
||||
end
|
||||
end
|
||||
|
||||
if (instancia.row_info.textL_class_colors) then
|
||||
|
||||
+19
-18
@@ -453,11 +453,7 @@ function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
gump:UpdateTooltip (qual_barra, esta_barra, instancia)
|
||||
end
|
||||
|
||||
if (self.owner) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
|
||||
return self:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, qual_barra, barras_container)
|
||||
end
|
||||
@@ -536,11 +532,7 @@ end
|
||||
function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize)
|
||||
|
||||
if (from_resize) then
|
||||
if (self.owner) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
@@ -587,17 +579,26 @@ function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize)
|
||||
end
|
||||
|
||||
if (self.enemy) then
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
|
||||
if (self.arena_enemy) then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
|
||||
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
esta_barra.textura:SetVertexColor (240/255, 0, 5/255, 1)
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
|
||||
end
|
||||
end
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
|
||||
if (self.arena_ally) then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
|
||||
end
|
||||
end
|
||||
|
||||
if (instancia.row_info.textL_class_colors) then
|
||||
|
||||
+32
-21
@@ -160,6 +160,8 @@ end
|
||||
|
||||
function atributo_heal:ContainerRefreshHps (container, combat_time)
|
||||
|
||||
local total = 0
|
||||
|
||||
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet ("heal")) then
|
||||
for _, actor in _ipairs (container) do
|
||||
if (actor.grupo) then
|
||||
@@ -167,13 +169,16 @@ function atributo_heal:ContainerRefreshHps (container, combat_time)
|
||||
else
|
||||
actor.last_hps = actor.total / actor:Tempo()
|
||||
end
|
||||
total = total + actor.last_hps
|
||||
end
|
||||
else
|
||||
for _, actor in _ipairs (container) do
|
||||
actor.last_hps = actor.total / actor:Tempo()
|
||||
total = total + actor.last_hps
|
||||
end
|
||||
end
|
||||
|
||||
return total
|
||||
end
|
||||
|
||||
function atributo_heal:ReportSingleDamagePreventedLine (actor, instancia)
|
||||
@@ -264,9 +269,14 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
|
||||
amount = _detalhes:ContainerSortHeal (conteudo, amount, keyName)
|
||||
|
||||
--> pega o total ja aplicado na tabela do combate
|
||||
total = tabela_do_combate.totals [class_type]
|
||||
|
||||
if (sub_atributo == 2) then --hps
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
total = atributo_heal:ContainerRefreshHps (conteudo, combat_time)
|
||||
else
|
||||
--> pega o total ja aplicado na tabela do combate
|
||||
total = tabela_do_combate.totals [class_type]
|
||||
end
|
||||
|
||||
--> grava o total
|
||||
instancia.top = conteudo[1][keyName]
|
||||
|
||||
@@ -641,11 +651,7 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
gump:UpdateTooltip (qual_barra, esta_barra, instancia)
|
||||
end
|
||||
|
||||
if (self.owner) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
|
||||
return self:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, qual_barra, barras_container)
|
||||
end
|
||||
@@ -724,11 +730,7 @@ end
|
||||
function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize)
|
||||
|
||||
if (from_resize) then
|
||||
if (self.owner) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
@@ -775,17 +777,26 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize)
|
||||
end
|
||||
|
||||
if (self.enemy) then
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
|
||||
if (self.arena_enemy) then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
|
||||
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
esta_barra.textura:SetVertexColor (240/255, 0, 5/255, 1)
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
|
||||
end
|
||||
end
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
|
||||
if (self.arena_ally) then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
|
||||
end
|
||||
end
|
||||
|
||||
if (instancia.row_info.textL_class_colors) then
|
||||
|
||||
@@ -2012,7 +2012,7 @@ function _detalhes:ChangeIcon (icon)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:AlteraModo (instancia, qual)
|
||||
function _detalhes:AlteraModo (instancia, qual, from_mode_menu)
|
||||
|
||||
if (_type (instancia) == "number") then
|
||||
qual = instancia
|
||||
@@ -2134,16 +2134,20 @@ function _detalhes:AlteraModo (instancia, qual)
|
||||
|
||||
local checked
|
||||
if (instancia.modo == 1) then
|
||||
checked = 3
|
||||
checked = 4
|
||||
elseif (instancia.modo == 2) then
|
||||
checked = 1
|
||||
elseif (instancia.modo == 3) then
|
||||
checked = 2
|
||||
elseif (instancia.modo == 4) then
|
||||
checked = 4
|
||||
checked = 3
|
||||
end
|
||||
|
||||
_detalhes.popup:Select (1, checked)
|
||||
|
||||
if (from_mode_menu) then
|
||||
instancia.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instancia.baseframe.cabecalho.modo_selecao)
|
||||
end
|
||||
end
|
||||
|
||||
local function GetDpsHps (_thisActor, key)
|
||||
@@ -2229,7 +2233,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
|
||||
if (not is_current) then
|
||||
--> assumindo que self é sempre uma instância aqui.
|
||||
local total, keyName, keyNameSec, first
|
||||
local total, keyName, keyNameSec, first, container_amount
|
||||
local atributo = self.atributo
|
||||
local container = self.showing [atributo]._ActorTable
|
||||
|
||||
@@ -2246,18 +2250,20 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
container = reportarFrags
|
||||
keyName = "frag"
|
||||
else
|
||||
total, keyName, first = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
|
||||
total, keyName, first, container_amount = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
|
||||
if (self.sub_atributo == 1) then
|
||||
keyNameSec = "dps"
|
||||
elseif (self.sub_atributo == 2) then
|
||||
|
||||
end
|
||||
end
|
||||
elseif (atributo == 2) then --> heal
|
||||
total, keyName, first = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
|
||||
total, keyName, first, container_amount = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
|
||||
if (self.sub_atributo == 1) then
|
||||
keyNameSec = "hps"
|
||||
end
|
||||
elseif (atributo == 3) then --> energy
|
||||
total, keyName, first = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
|
||||
total, keyName, first, container_amount = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
|
||||
elseif (atributo == 4) then --> misc
|
||||
if (self.sub_atributo == 5) then --> mortes
|
||||
local mortes = self.showing.last_events_tables
|
||||
@@ -2268,52 +2274,58 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
container = reportarMortes
|
||||
keyName = "dead"
|
||||
else
|
||||
total, keyName, first = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true)
|
||||
total, keyName, first, container_amount = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true)
|
||||
end
|
||||
elseif (atributo == 5) then --> custom
|
||||
|
||||
if (_detalhes.custom [self.sub_atributo]) then
|
||||
total, keyName, first = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, {key = "custom"})
|
||||
total, keyName, first, container_amount = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, {key = "custom"})
|
||||
total = self.showing.totals [self.customName]
|
||||
atributo = _detalhes.custom [self.sub_atributo].attribute
|
||||
container = self.showing [atributo]._ActorTable
|
||||
else
|
||||
total, keyName, first = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
|
||||
total, keyName, first, container_amount = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
|
||||
total = 1
|
||||
atributo = 1
|
||||
container = self.showing [atributo]._ActorTable
|
||||
end
|
||||
--print (total, keyName, first, atributo)
|
||||
--print (total, keyName, first, atributo, container_amount)
|
||||
end
|
||||
|
||||
amt = math.min (amt, container_amount)
|
||||
|
||||
for i = 1, amt do
|
||||
local _thisActor = container [i]
|
||||
if (_thisActor) then
|
||||
|
||||
local amount = _thisActor [keyName]
|
||||
|
||||
local name = _thisActor.nome.." "
|
||||
if (_detalhes.remove_realm_from_name and name:find ("-")) then
|
||||
name = name:gsub (("%-.*"), "")
|
||||
end
|
||||
|
||||
_detalhes.fontstring_len:SetText (name)
|
||||
local stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
|
||||
while (stringlen < default_len) do
|
||||
name = name .. "."
|
||||
_detalhes.fontstring_len:SetText (name)
|
||||
stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
end
|
||||
|
||||
if (_type (amount) == "number" and amount > 0) then --1236
|
||||
if (keyNameSec) then
|
||||
local dps = GetDpsHps (_thisActor, keyNameSec)
|
||||
|
||||
local name = _thisActor.nome.." "
|
||||
if (_detalhes.remove_realm_from_name and name:find ("-")) then
|
||||
name = name:gsub (("%-.*"), "")
|
||||
end
|
||||
|
||||
_detalhes.fontstring_len:SetText (name)
|
||||
local stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
|
||||
while (stringlen < default_len) do
|
||||
name = name .. "."
|
||||
_detalhes.fontstring_len:SetText (name)
|
||||
stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
end
|
||||
|
||||
report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_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:ToKReport (amount).." (".._cstr ("%.1f", amount/total*100).."%)"
|
||||
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. _detalhes:ToKReport (amount).." (".._cstr ("%.1f", amount/total*100).."%)"
|
||||
end
|
||||
|
||||
elseif (_type (amount) == "string") then
|
||||
report_lines [#report_lines+1] = i..". ".. _thisActor.nome.." ".. amount
|
||||
|
||||
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. amount
|
||||
|
||||
else
|
||||
break
|
||||
end
|
||||
@@ -2342,7 +2354,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
|
||||
if (not is_current) then
|
||||
--> assumindo que self é sempre uma instância aqui.
|
||||
local total, keyName, first
|
||||
local total, keyName, first, container_amount
|
||||
local atributo = self.atributo
|
||||
|
||||
local container = self.showing [atributo]._ActorTable
|
||||
@@ -2362,15 +2374,15 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
if (self.sub_atributo == 1) then
|
||||
keyNameSec = "dps"
|
||||
end
|
||||
total, keyName, first = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
|
||||
total, keyName, first, container_amount = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
|
||||
end
|
||||
elseif (atributo == 2) then --> heal
|
||||
total, keyName, first = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
|
||||
total, keyName, first, container_amount = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
|
||||
if (self.sub_atributo == 1) then
|
||||
keyNameSec = "hps"
|
||||
end
|
||||
elseif (atributo == 3) then --> energy
|
||||
total, keyName, first = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
|
||||
total, keyName, first, container_amount = _detalhes.atributo_energy:RefreshWindow (self, self.showing, true, true)
|
||||
elseif (atributo == 4) then --> misc
|
||||
if (self.sub_atributo == 5) then --> mortes
|
||||
local mortes = self.showing.last_events_tables
|
||||
@@ -2381,46 +2393,49 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
container = reportarMortes
|
||||
keyName = "dead"
|
||||
else
|
||||
total, keyName, first = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true)
|
||||
total, keyName, first, container_amount = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true)
|
||||
end
|
||||
elseif (atributo == 5) then --> custom
|
||||
total, keyName, first = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, {key = "custom"})
|
||||
total, keyName, first, container_amount = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, {key = "custom"})
|
||||
total = self.showing.totals [self.customName]
|
||||
atributo = _detalhes.custom [self.sub_atributo].attribute
|
||||
end
|
||||
|
||||
local this_amt = math.min (#container, container_amount, amt)
|
||||
this_amt = #container - this_amt
|
||||
|
||||
for i = #container, 1, -1 do
|
||||
for i = container_amount, this_amt, -1 do
|
||||
|
||||
local _thisActor = container [i]
|
||||
local amount = _thisActor [keyName]
|
||||
|
||||
local name = _thisActor.nome.." "
|
||||
|
||||
_detalhes.fontstring_len:SetText (name)
|
||||
local stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
|
||||
while (stringlen < default_len) do
|
||||
name = name .. "."
|
||||
_detalhes.fontstring_len:SetText (name)
|
||||
stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
end
|
||||
|
||||
if (_type (amount) == "number") then
|
||||
if (amount > 0) then
|
||||
if (keyNameSec) then
|
||||
local dps = GetDpsHps (_thisActor, keyNameSec)
|
||||
|
||||
local name = _thisActor.nome.." "
|
||||
|
||||
_detalhes.fontstring_len:SetText (name)
|
||||
local stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
|
||||
while (stringlen < default_len) do
|
||||
name = name .. "."
|
||||
_detalhes.fontstring_len:SetText (name)
|
||||
stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
end
|
||||
|
||||
report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_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).."%)"
|
||||
report_lines [#report_lines+1] = i .. "." .. name .. " " .. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)"
|
||||
end
|
||||
|
||||
quantidade = quantidade + 1
|
||||
if (quantidade == amt) then
|
||||
break
|
||||
end
|
||||
end
|
||||
elseif (_type (amount) == "string") then
|
||||
report_lines [#report_lines+1] = i..".".. _thisActor.nome.." ".. amount
|
||||
report_lines [#report_lines+1] = i .. ". " .. name .. " " .. amount
|
||||
else
|
||||
break
|
||||
end
|
||||
|
||||
+19
-18
@@ -683,11 +683,7 @@ function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
gump:UpdateTooltip (qual_barra, esta_barra, instancia)
|
||||
end
|
||||
|
||||
if (self.owner) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
|
||||
return self:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, qual_barra, barras_container)
|
||||
end
|
||||
@@ -766,11 +762,7 @@ end
|
||||
function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize)
|
||||
|
||||
if (from_resize) then
|
||||
if (self.owner) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
@@ -817,17 +809,26 @@ function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize)
|
||||
end
|
||||
|
||||
if (self.enemy) then
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
|
||||
if (self.arena_enemy) then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
|
||||
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
esta_barra.textura:SetVertexColor (240/255, 0, 5/255, 1)
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
|
||||
end
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
|
||||
end
|
||||
end
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
|
||||
if (self.arena_ally) then
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao .. ".|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda
|
||||
end
|
||||
end
|
||||
|
||||
if (instancia.row_info.textL_class_colors) then
|
||||
|
||||
@@ -108,12 +108,13 @@
|
||||
end
|
||||
|
||||
--> read the actor flag
|
||||
local read_actor_flag = function (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
|
||||
local read_actor_flag = function (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, container_type)
|
||||
|
||||
if (flag) then
|
||||
|
||||
--> é um player
|
||||
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then
|
||||
|
||||
novo_objeto.displayName = _detalhes:GetNickname (serial, false, true) --> serial, default, silent
|
||||
if (not novo_objeto.displayName) then
|
||||
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
|
||||
@@ -123,7 +124,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
if (_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNGROUPPLAYER") then --> faz parte do grupo
|
||||
if ( (_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNGROUPPLAYER")) then --> faz parte do grupo
|
||||
novo_objeto.grupo = true
|
||||
|
||||
if (shadow_objeto) then
|
||||
@@ -137,6 +138,68 @@
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes.is_in_arena) then
|
||||
|
||||
if (novo_objeto.grupo) then --> is ally
|
||||
novo_objeto.arena_ally = true
|
||||
|
||||
else --> is enemy
|
||||
novo_objeto.arena_enemy = true
|
||||
|
||||
end
|
||||
|
||||
local arena_props = _detalhes.arena_table [nome]
|
||||
if (nome == "Ditador") then
|
||||
print ("Arena Cprops: ", arena_props)
|
||||
end
|
||||
|
||||
if (arena_props) then
|
||||
novo_objeto.role = arena_props.role
|
||||
|
||||
if (arena_props.role == "NONE") then
|
||||
local role = UnitGroupRolesAssigned (nome)
|
||||
if (role ~= "NONE") then
|
||||
novo_objeto.role = role
|
||||
end
|
||||
end
|
||||
|
||||
print ("TEM CPROPS", novo_objeto.role)
|
||||
else
|
||||
local oponentes = GetNumArenaOpponentSpecs()
|
||||
local found = false
|
||||
for i = 1, oponentes do
|
||||
local name = GetUnitName ("arena" .. i, true)
|
||||
if (name == nome) then
|
||||
local spec = GetArenaOpponentSpec (i)
|
||||
if (spec) then
|
||||
local id, name, description, icon, background, role, class = GetSpecializationInfoByID (spec)
|
||||
novo_objeto.role = role
|
||||
novo_objeto.classe = class
|
||||
novo_objeto.enemy = true
|
||||
novo_objeto.arena_enemy = true
|
||||
found = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local role = UnitGroupRolesAssigned (nome)
|
||||
if (role ~= "NONE") then
|
||||
novo_objeto.role = role
|
||||
found = true
|
||||
end
|
||||
|
||||
if (not found and nome == _detalhes.playername) then
|
||||
local role = UnitGroupRolesAssigned ("player")
|
||||
if (role ~= "NONE") then
|
||||
novo_objeto.role = role
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
novo_objeto.grupo = true
|
||||
end
|
||||
|
||||
--> é um pet
|
||||
elseif (dono_do_pet) then
|
||||
@@ -217,7 +280,7 @@
|
||||
if (self.tipo == container_damage) then --> CONTAINER DAMAGE
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "damage")
|
||||
|
||||
if (dono_do_pet) then
|
||||
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
|
||||
@@ -249,7 +312,7 @@
|
||||
elseif (self.tipo == container_heal) then --> CONTAINER HEALING
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "heal")
|
||||
|
||||
if (dono_do_pet) then
|
||||
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
|
||||
@@ -278,7 +341,7 @@
|
||||
elseif (self.tipo == container_energy) then --> CONTAINER ENERGY
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "energy")
|
||||
|
||||
if (dono_do_pet) then
|
||||
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
|
||||
@@ -303,7 +366,7 @@
|
||||
elseif (self.tipo == container_misc) then --> CONTAINER MISC
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "misc")
|
||||
|
||||
--local teste_classe =
|
||||
|
||||
|
||||
Reference in New Issue
Block a user