This commit is contained in:
tercio
2014-04-16 22:17:50 -03:00
parent a569c7fbc4
commit 5c621d6c20
35 changed files with 2473 additions and 789 deletions
+7 -6
View File
@@ -796,7 +796,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
conteudo = _detalhes.cache_damage_group
if (sub_atributo == 2) then
if (sub_atributo == 2) then --> dps
local combat_time = instancia.showing:GetCombatTime()
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
end
@@ -818,7 +818,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
total = total + conteudo[i][keyName]
end
else
if (sub_atributo == 2) then
if (sub_atributo == 2) then --> dps
local combat_time = instancia.showing:GetCombatTime()
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
end
@@ -1137,11 +1137,11 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
elseif (sub_atributo == 2) then --> mostrando dps
dps = _math_floor (dps)
if (_detalhes.ps_abbreviation == 2) then
esta_barra.texto_direita:SetText (_detalhes:ToK (dps) .. " " .. div_abre .. _detalhes:ToK (damage_total) .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
elseif (_detalhes.ps_abbreviation == 3) then
esta_barra.texto_direita:SetText (_detalhes:ToK2 (dps) .. " " .. div_abre .. _detalhes:ToK (damage_total) .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
elseif (_detalhes.ps_abbreviation == 3) then
esta_barra.texto_direita:SetText (_detalhes:ToK2 (dps) .. " " .. div_abre .. _detalhes:ToK2 (damage_total) .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
else
esta_barra.texto_direita:SetText (_cstr ("%.1f", dps) .. " " .. div_abre .. _detalhes:ToK (damage_total) .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
esta_barra.texto_direita:SetText (_detalhes:ToK2 (dps) .. " " .. div_abre .. damage_total .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
end
esta_porcentagem = _math_floor ((dps/instancia.top) * 100) --> determina qual o tamanho da barra
@@ -1387,6 +1387,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
do
--> TOP HABILIDADES
local ActorDamage = self.total_without_pet
local ActorDamageWithPet = self.total
if (ActorDamage == 0) then
ActorDamage = 0.00000001
end
@@ -1452,7 +1453,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
for i = 1, _math_min (_detalhes.tooltip_max_targets, #ActorTargetsSortTable) do
local este_inimigo = ActorTargetsSortTable [i]
GameCooltip:AddLine (este_inimigo[1]..": ", _detalhes:comma_value (este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamage*100).."%)")
GameCooltip:AddLine (este_inimigo[1]..": ", _detalhes:comma_value (este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .2)
end
+32 -4
View File
@@ -152,6 +152,24 @@ function _detalhes:ContainerSortHeal (container, amount, keyName2)
end
end
function atributo_heal:ContainerRefreshHps (container, combat_time)
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet ("heal")) then
for _, actor in _ipairs (container) do
if (actor.grupo) then
actor.last_hps = actor.total / combat_time
else
actor.last_hps = actor.total / actor:Tempo()
end
end
else
for _, actor in _ipairs (container) do
actor.last_hps = actor.total / actor:Tempo()
end
end
end
function atributo_heal:ReportSingleDamagePreventedLine (actor, instancia)
local barra = instancia.barras [actor.minha_barra]
@@ -256,6 +274,11 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
conteudo = _detalhes.cache_healing_group
if (sub_atributo == 2) then --> hps
local combat_time = instancia.showing:GetCombatTime()
atributo_heal:ContainerRefreshHps (conteudo, combat_time)
end
if (#conteudo < 1) then
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
end
@@ -268,11 +291,16 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
instancia.top = conteudo[1][keyName]
amount = #conteudo
end
for i = 1, amount do
total = total + conteudo[i][keyName]
end
else
if (sub_atributo == 2) then --> hps
local combat_time = instancia.showing:GetCombatTime()
atributo_heal:ContainerRefreshHps (conteudo, combat_time)
end
--_table_sort (conteudo, _detalhes.SortKeyGroup)
_detalhes.SortGroupHeal (conteudo, keyName)
end
@@ -538,11 +566,11 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
hps = _math_floor (hps)
if (_detalhes.ps_abbreviation == 2) then
esta_barra.texto_direita:SetText (_detalhes:ToK (hps) .." ".. div_abre .. _detalhes:ToK (healing_total) .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
elseif (_detalhes.ps_abbreviation == 2) then
esta_barra.texto_direita:SetText (_detalhes:ToK2 (hps) .." ".. div_abre .. _detalhes:ToK (healing_total) .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
elseif (_detalhes.ps_abbreviation == 3) then
esta_barra.texto_direita:SetText (_detalhes:ToK2 (hps) .." ".. div_abre .. _detalhes:ToK2 (healing_total) .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
else
esta_barra.texto_direita:SetText (_cstr("%.1f", hps) .." ".. div_abre .. _detalhes:ToK (healing_total) .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
esta_barra.texto_direita:SetText (_detalhes:ToK2 (hps) .." ".. div_abre .. healing_total .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
end
esta_porcentagem = _math_floor ((hps/instancia.top) * 100) --> determina qual o tamanho da barra
+31 -3
View File
@@ -95,6 +95,18 @@ function _detalhes:GetLowerInstanceNumber()
end
end
function _detalhes:IsLowerInstance()
local lower = _detalhes:GetLowerInstanceNumber()
if (lower) then
return lower == self.meu_id
end
return false
end
function _detalhes:IsInteracting()
return self.is_interacting
end
function _detalhes:GetMode()
return self.modo
end
@@ -296,6 +308,8 @@ end
gump:Fade (self.baseframe.cabecalho.ball, 0)
gump:Fade (self.baseframe, 0)
self:SetMenuAlpha()
self.baseframe.cabecalho.fechar:Enable()
self:ChangeIcon()
@@ -720,6 +734,18 @@ end
--> setup all config
new_instance:ResetInstanceConfig()
--> setup default wallpaper
local spec = GetSpecialization()
if (spec) then
local id, name, description, icon, _background, role = GetSpecializationInfo (spec)
if (_background) then
local bg = "Interface\\TALENTFRAME\\" .. _background
if (new_instance.wallpaper) then
new_instance.wallpaper.texture = bg
new_instance.wallpaper.texcoord = {0, 1, 0, 0.703125}
end
end
end
--> internal stuff
new_instance.barras = {} --container que irá armazenar todas as barras
@@ -791,6 +817,7 @@ end
--> internal stuff
new_instance.row_height = new_instance.row_info.height + new_instance.row_info.space.between
new_instance.oldwith = new_instance.baseframe:GetWidth()
new_instance.iniciada = true
new_instance:SaveMainWindowPosition()
new_instance:ReajustaGump()
@@ -943,6 +970,7 @@ function _detalhes:RestauraJanela (index, temp)
end
--> internal stuff
self.oldwith = self.baseframe:GetWidth()
self:RestoreMainWindowPosition()
self:ReajustaGump()
self:SaveMainWindowPosition()
@@ -967,7 +995,7 @@ function _detalhes:ExportSkin()
}
for key, value in pairs (self) do
if (_detalhes.instance_defaults [key]) then
if (_detalhes.instance_defaults [key] ~= nil) then
if (type (value) == "table") then
exported [key] = table_deepcopy (value)
else
@@ -1051,8 +1079,8 @@ function _detalhes:SetBackgroundAlpha (alpha)
-- alpha = _detalhes:Scale (0, 1, 0.2, 1, alpha) - 0.8
end
self.bgdisplay:SetBackdropColor (self.bg_r or _detalhes.default_bg_color, self.bg_g or _detalhes.default_bg_color, self.bg_b or _detalhes.default_bg_color, alpha)
self.baseframe:SetBackdropColor (self.bg_r or _detalhes.default_bg_color, self.bg_g or _detalhes.default_bg_color, self.bg_b or _detalhes.default_bg_color, alpha)
self.bgdisplay:SetBackdropColor (self.bg_r, self.bg_g, self.bg_b, alpha)
self.baseframe:SetBackdropColor (self.bg_r, self.bg_g, self.bg_b, alpha)
self.bg_alpha = alpha
end
+16 -4
View File
@@ -35,17 +35,19 @@ _detalhes.instance_defaults = {
--skin
skin = "Default Skin",
--baseframe backdrop color
--baseframe backdrop
bg_alpha = 0.7,
bg_r = 0.0941,
bg_g = 0.0941,
bg_b = 0.0941,
backdrop_texture = "Details Ground",
--auto current
auto_current = true,
--show sidebars
show_sidebars = true,
--show bottom statusbar
show_statusbar = true,
statusbar_info = {alpha = 1, overlay = {1, 1, 1}},
--blackwhiite icons
desaturated_menu = false,
--hide main window attribute icon
@@ -66,13 +68,20 @@ _detalhes.instance_defaults = {
instancebutton_info = {text_color = {1, 0.82, 0, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}},
--close button info
closebutton_info = {color_overlay = {1, 1, 1, 1}},
--menu anchor store the anchor point of main menu
menu_anchor = {5, 1},
--menus:
--anchor store the anchor point of main menu
menu_anchor = {5, 1, side = 1},
--auto hide window borders
menu_alpha = {enabled = false, iconstoo = true, onenter = 1, onleave = 1},
--auto hide menu
auto_hide_menu = {left = false, right = false},
--attribute text
attribute_text = {enabled = false, anchor = {5, 1}, text_face = "Friz Quadrata TT", text_size = 12, text_color = {1, 1, 1, 1}, side = 1},
--instance button anchor store the anchor point of instance and delete button
instance_button_anchor = {-27, 1},
--total bar
total_bar = {enabled = false, color = {1, 1, 1}, only_in_group = true, icon = [[Interface\ICONS\INV_Sigil_Thorim]]},
--row info
row_info = {
--if true the texture of the bars will have the color of his actor class
@@ -117,10 +126,13 @@ _detalhes.instance_defaults = {
space = {left = 3, right = -5, between = 1},
--icon file
icon_file = [[Interface\AddOns\Details\images\classes_small]],
no_icon = false,
start_after_icon = true,
},
--instance window color
color = {1, 1, 1, 1},
color_buttons = {1, 1, 1, 1},
--hide in combat
hide_in_combat = false,
hide_in_combat_alpha = 0,