Added Misses

This commit is contained in:
Tercio Jose
2022-10-13 19:08:17 -03:00
parent bebb4af33c
commit 50ed1cf776
15 changed files with 188 additions and 167 deletions
+2 -2
View File
@@ -519,7 +519,7 @@ function DF:CreateCoolTip()
statusbar.texture = statusbar:CreateTexture("$parent_Texture", "BACKGROUND")
statusbar.texture:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Skills-Bar")
statusbar.texture:SetSize(300, 14)
statusbar:SetStatusBarTexture (statusbar.texture)
statusbar:SetStatusBarTexture(statusbar.texture)
statusbar:SetMinMaxValues(0, 100)
statusbar.spark = statusbar:CreateTexture("$parent_Spark", "BACKGROUND")
@@ -582,7 +582,7 @@ function DF:CreateCoolTip()
statusbar2.texture = statusbar2:CreateTexture("$parent_Texture", "BACKGROUND")
statusbar2.texture:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Skills-Bar")
statusbar2.texture:SetSize(300, 14)
statusbar2:SetStatusBarTexture (statusbar2.texture)
statusbar2:SetStatusBarTexture(statusbar2.texture)
statusbar2:SetMinMaxValues(0, 100)
--on load
+1 -1
View File
@@ -716,7 +716,7 @@ local build_statusbar = function(self)
self.texture:SetSize(300, 14)
self.texture:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
self:SetStatusBarTexture (self.texture)
self:SetStatusBarTexture(self.texture)
self.icontexture = self:CreateTexture("$parent_icon", "OVERLAY")
self.icontexture:SetSize(14, 14)
+3 -3
View File
@@ -7290,7 +7290,7 @@ function detailsFramework:CreateHealthBar (parent, name, settingsOverride)
healthBar.shieldAbsorbGlow:SetDrawLayer("artwork", 7)
--statusbar texture
healthBar.barTexture = healthBar:CreateTexture(nil, "artwork")
healthBar:SetStatusBarTexture (healthBar.barTexture)
healthBar:SetStatusBarTexture(healthBar.barTexture)
end
--mixins
@@ -7551,7 +7551,7 @@ function detailsFramework:CreatePowerBar(parent, name, settingsOverride)
--artwork
powerBar.barTexture = powerBar:CreateTexture(nil, "artwork")
powerBar:SetStatusBarTexture (powerBar.barTexture)
powerBar:SetStatusBarTexture(powerBar.barTexture)
--overlay
powerBar.percentText = powerBar:CreateFontString(nil, "overlay", "GameFontNormal")
@@ -8549,7 +8549,7 @@ function detailsFramework:CreateCastBar(parent, name, settingsOverride)
--statusbar texture
castBar.barTexture = castBar:CreateTexture(nil, "artwork", nil, -6)
castBar:SetStatusBarTexture (castBar.barTexture)
castBar:SetStatusBarTexture(castBar.barTexture)
--animations fade in and out
local fadeOutAnimationHub = detailsFramework:CreateAnimationHub (castBar, detailsFramework.CastFrameFunctions.Animation_FadeOutStarted, detailsFramework.CastFrameFunctions.Animation_FadeOutFinished)
+1 -1
View File
@@ -700,7 +700,7 @@ local build_statusbar = function(self)
self.righttext:SetJustifyH("right")
self.righttext:SetPoint("RIGHT", self.righticon, "LEFT", -3, 0)
self:SetStatusBarTexture (self.texture)
self:SetStatusBarTexture(self.texture)
self:SetMinMaxValues(1, 100)
self:SetValue(50)
DetailsFrameworkSplitlBar_OnCreate (self)
+5 -5
View File
@@ -858,25 +858,25 @@ do
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--frames
local _CreateFrame = CreateFrame --api locals
local CreateFrame = CreateFrame --api locals
local UIParent = UIParent --api locals
--Info Window
_detalhes.playerDetailWindow = _CreateFrame ("Frame", "DetailsPlayerDetailsWindow", UIParent, "BackdropTemplate")
_detalhes.playerDetailWindow = CreateFrame("Frame", "DetailsPlayerDetailsWindow", UIParent, "BackdropTemplate")
_detalhes.PlayerDetailsWindow = _detalhes.playerDetailWindow
--Event Frame
_detalhes.listener = _CreateFrame ("Frame", nil, UIParent)
_detalhes.listener = CreateFrame("Frame", nil, UIParent)
_detalhes.listener:RegisterEvent ("ADDON_LOADED")
_detalhes.listener:SetFrameStrata("LOW")
_detalhes.listener:SetFrameLevel(9)
_detalhes.listener.FrameTime = 0
_detalhes.overlay_frame = _CreateFrame ("Frame", nil, UIParent)
_detalhes.overlay_frame = CreateFrame("Frame", nil, UIParent)
_detalhes.overlay_frame:SetFrameStrata("TOOLTIP")
--Pet Owner Finder
_CreateFrame ("GameTooltip", "DetailsPetOwnerFinder", nil, "GameTooltipTemplate")
CreateFrame("GameTooltip", "DetailsPetOwnerFinder", nil, "GameTooltipTemplate")
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+22 -20
View File
@@ -4840,7 +4840,7 @@ local MontaDetalhesBuffProcs = function(actor, row, instance)
local spellApplies = spellObject.appliedamt
local spellRefreshes = spellObject.refreshamt
gump:SetaDetalheInfoTexto (i, 100, FormatSpellString ("" .. spellID .. " " .. spellName), "Activations: " .. spellApplies, " ", "Refreshes: " .. spellRefreshes, " ", "Uptime: " .. spellUptime .. "s")
gump:SetaDetalheInfoTexto(i, 100, FormatSpellString ("" .. spellID .. " " .. spellName), "Activations: " .. spellApplies, " ", "Refreshes: " .. spellRefreshes, " ", "Uptime: " .. spellUptime .. "s")
added = added + 1
end
end
@@ -4861,17 +4861,16 @@ end
function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
function atributo_damage:MontaDetalhesDamageDone (spellId, spellLine, instance)
local esta_magia
if (barra.other_actor) then
esta_magia = barra.other_actor.spells._ActorTable [spellid]
if (spellLine.other_actor) then
esta_magia = spellLine.other_actor.spells._ActorTable [spellId]
else
esta_magia = self.spells._ActorTable [spellid]
esta_magia = self.spells._ActorTable [spellId]
end
if (spellid == -51) then
return MontaDetalhesBuffProcs (self, barra, instancia)
if (spellId == -51) then
return MontaDetalhesBuffProcs(self, spellLine, instance)
end
if (not esta_magia) then
@@ -4879,7 +4878,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
end
--icone direito superior
local _, _, icone = _GetSpellInfo(spellid)
local _, _, icone = _GetSpellInfo(spellId)
Details.playerDetailWindow.spell_icone:SetTexture(icone)
@@ -4888,6 +4887,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
local meu_tempo
if (Details.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
elseif (Details.time_type == 2) then
meu_tempo = info.instancia.showing:GetCombatTime()
end
@@ -4940,10 +4940,10 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
hits_string = hits_string .. " |cFFDDDD44(" .. _math_floor(debuff_uptime / info.instancia.showing:GetCombatTime() * 100) .. "% uptime)|r"
end
local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spellid]
local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spellId]
if (not spell_cast and misc_actor.spell_cast) then
local spellname = GetSpellInfo(spellid)
local spellname = GetSpellInfo(spellId)
for casted_spellid, amount in pairs(misc_actor.spell_cast) do
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
@@ -4957,13 +4957,14 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
cast_string = cast_string .. spell_cast
end
gump:SetaDetalheInfoTexto ( index, 100,
gump:SetaDetalheInfoTexto( index, 100,
cast_string,
Loc ["STRING_DAMAGE"]..": "..Details:ToK(esta_magia.total),
schooltext, --offhand,
Loc ["STRING_AVERAGE"] .. ": " .. Details:comma_value (media),
this_dps,
Loc ["STRING_HITS"]..": " .. hits_string)
Loc ["STRING_HITS"]..": " .. hits_string
)
--NORMAL
local normal_hits = esta_magia.n_amt
@@ -4986,7 +4987,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
t1[6] = Loc ["STRING_AVERAGE"] .. ": " .. Details:comma_value (media_normal)
t1[7] = Loc ["STRING_DPS"] .. ": " .. Details:comma_value (normal_dmg/T)
t1[8] = normal_hits .. " [|cFFC0C0C0" .. format("%.1f", normal_hits/max(total_hits, 0.0001)*100) .. "%|r]"
t1[9] = ""
end
--CRITICO
@@ -5012,18 +5013,19 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
t2[6] = Loc ["STRING_AVERAGE"] .. ": " .. Details:comma_value (media_critico)
t2[7] = Loc ["STRING_DPS"] .. ": " .. Details:comma_value (crit_dps)
t2[8] = esta_magia.c_amt .. " [|cFFC0C0C0" .. format("%.1f", esta_magia.c_amt/total_hits*100) .. "%|r]"
t2[9] = ""
end
--Outros erros: GLACING, resisted, blocked, absorbed
local outros_desvios = esta_magia.g_amt + esta_magia.b_amt
local parry = esta_magia ["PARRY"] or 0
local dodge = esta_magia ["DODGE"] or 0
local erros = parry + dodge
local misses = esta_magia ["MISS"] or 0
local erros = parry + dodge + misses
if (outros_desvios > 0 or erros > 0) then
local porcentagem_defesas = (outros_desvios+erros) / total_hits * 100
local porcentagem_defesas = (outros_desvios + erros) / total_hits * 100
data[#data+1] = t3
defenses_table.p = porcentagem_defesas
@@ -5036,7 +5038,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
t3[6] = Loc ["STRING_DODGE"] .. ": " .. dodge
t3[7] = Loc ["STRING_BLOCKED"] .. ": " .. _math_floor(esta_magia.b_amt/esta_magia.counter*100)
t3[8] = (outros_desvios+erros) .. " / " .. format("%.1f", porcentagem_defesas) .. "%"
t3[9] = "MISS" .. ": " .. misses
end
--Details:BuildPlayerDetailsSpellChart()
@@ -5048,7 +5050,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
_table_sort(data, Details.Sort1)
for index, tabela in ipairs(data) do
gump:SetaDetalheInfoTexto (index+1, tabela[2], tabela[3], tabela[4], tabela[5], tabela[6], tabela[7], tabela[8])
gump:SetaDetalheInfoTexto(index+1, tabela[2], tabela[3], tabela[4], tabela[5], tabela[6], tabela[7], tabela[8], tabela[9])
end
for i = #data+2, 5 do
+2 -2
View File
@@ -2291,7 +2291,7 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
cast_string = cast_string .. spell_cast
end
gump:SetaDetalheInfoTexto ( index, 100,
gump:SetaDetalheInfoTexto( index, 100,
--Loc ["STRING_GERAL"],
cast_string,
heal_string .. ": " .. _detalhes:ToK (esta_magia.total),
@@ -2414,7 +2414,7 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
if (not tabela) then
gump:HidaDetalheInfo (index+1)
else
gump:SetaDetalheInfoTexto (index+1, tabela[2], tabela[3], tabela[4], tabela[5], tabela[6], tabela[7], tabela[8])
gump:SetaDetalheInfoTexto(index+1, tabela[2], tabela[3], tabela[4], tabela[5], tabela[6], tabela[7], tabela[8])
end
end
+3
View File
@@ -1752,6 +1752,9 @@
-- ~miss
function parser:missed (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, missType, isOffHand, amountMissed, arg1, arg2, arg3)
--print(spellid, spellname, missType, amountMissed) --MISS
------------------------------------------------------------------------------------------------
--early checks and fixes
+10 -10
View File
@@ -24,7 +24,7 @@
local _setmetatable = setmetatable --lua local
local _GetSpellInfo = _detalhes.getspellinfo --api local
local _CreateFrame = CreateFrame --api local
local CreateFrame = CreateFrame --api local
local GetTime = GetTime --api local
local _GetCursorPosition = GetCursorPosition --api local
local _GameTooltip = GameTooltip --api local
@@ -164,7 +164,7 @@
DetailsCustomPanel.Initialized = true
--main frame
local custom_window = DetailsCustomPanel or _CreateFrame ("frame", "DetailsCustomPanel", UIParent,"BackdropTemplate")
local custom_window = DetailsCustomPanel or CreateFrame("frame", "DetailsCustomPanel", UIParent,"BackdropTemplate")
local f = custom_window
custom_window:SetPoint("center", UIParent, "center")
@@ -739,7 +739,7 @@
--left menu
custom_window.menu = {}
local menu_start = -50
local menu_up_frame = _CreateFrame ("frame", nil, custom_window)
local menu_up_frame = CreateFrame("frame", nil, custom_window)
menu_up_frame:SetFrameLevel(custom_window:GetFrameLevel()+2)
local onenter = function(self)
@@ -946,7 +946,7 @@
}
--create box
local attribute_box = _CreateFrame ("frame", nil, custom_window)
local attribute_box = CreateFrame("frame", nil, custom_window)
attribute_box:SetPoint("topleft", custom_window, "topleft", 200, -60)
attribute_box:SetSize(180, 260)
attribute_box:Hide()
@@ -989,7 +989,7 @@
if (attributes [i]) then
local button = _CreateFrame ("button", "DetailsCustomPanelAttributeMenu" .. i, attribute_box, "BackdropTemplate")
local button = CreateFrame("button", "DetailsCustomPanelAttributeMenu" .. i, attribute_box, "BackdropTemplate")
button:SetPoint("topleft", attribute_box, "topleft", 2, ((i-1)*23*-1) + (-26))
button:SetPoint("topright", attribute_box, "topright", 2, ((i-1)*23*-1) + (-26))
button:SetHeight(20)
@@ -1023,7 +1023,7 @@
end
--create box 0, holds the name, author, desc and icon
local box0 = _CreateFrame ("frame", "DetailsCustomPanelBox0", custom_window)
local box0 = CreateFrame("frame", "DetailsCustomPanelBox0", custom_window)
custom_window.box0 = box0
box0:SetSize(450, 360)
@@ -1093,7 +1093,7 @@
accept_button:SetFrameLevel(500)
--create box type 1
local box1 = _CreateFrame ("frame", "DetailsCustomPanelBox1", custom_window)
local box1 = CreateFrame("frame", "DetailsCustomPanelBox1", custom_window)
custom_window.box1 = box1
box1:SetSize(450, 180)
box1:SetPoint("topleft", icon_label.widget, "bottomleft", -10, -20)
@@ -1145,7 +1145,7 @@
actorsFrame:SetPoint("topleft", custom_window, "topright", 5, -60)
actorsFrame:Hide()
local modelFrame = _CreateFrame ("playermodel", "DetailsCustomActorsFrame2Model", custom_window)
local modelFrame = CreateFrame("playermodel", "DetailsCustomActorsFrame2Model", custom_window)
modelFrame:SetSize(138, 261)
modelFrame:SetPoint("topright", actorsFrame.widget, "topleft", -15, -8)
modelFrame:Hide()
@@ -1367,7 +1367,7 @@
actorsFrame:SetPoint("topleft", custom_window, "topright", 5, -60)
actorsFrame:Hide()
local modelFrame = _CreateFrame ("playermodel", "DetailsCustomActorsFrameModel", custom_window)
local modelFrame = CreateFrame("playermodel", "DetailsCustomActorsFrameModel", custom_window)
modelFrame:SetSize(138, 261)
modelFrame:SetPoint("topright", actorsFrame.widget, "topleft", -15, -8)
modelFrame:Hide()
@@ -1691,7 +1691,7 @@
--select spell
--create box type 2
local box2 = _CreateFrame ("frame", "DetailsCustomPanelBox2", custom_window)
local box2 = CreateFrame("frame", "DetailsCustomPanelBox2", custom_window)
custom_window.box2 = box2
box2:SetSize(450, 180)
box2:SetPoint("topleft", icon_label.widget, "bottomleft", -10, -20)
+1 -1
View File
@@ -345,7 +345,7 @@ function Details:CreateEventTrackerFrame(parent, name)
local statusbar = CreateFrame("statusbar", "$parentStatusBar", line,"BackdropTemplate")
statusbar:SetAllPoints()
local statusbartexture = statusbar:CreateTexture(nil, "border")
statusbar:SetStatusBarTexture (statusbartexture)
statusbar:SetStatusBarTexture(statusbartexture)
statusbar:SetMinMaxValues(0, 1)
statusbar:SetValue(0)
+133 -117
View File
@@ -13,7 +13,7 @@ local ipairs = ipairs
local pairs = pairs
local type = type
--api locals
local _CreateFrame = CreateFrame
local CreateFrame = CreateFrame
local GetTime = GetTime
local _GetSpellInfo = _detalhes.getspellinfo
local _GetCursorPosition = GetCursorPosition
@@ -609,104 +609,101 @@ local detalhes_inforeport_onleave = function(self)
Details.FadeHandler.Fader(self, "IN")
end
function gump:CriaDetalheInfo (index)
local info = {}
function gump:CriaDetalheInfo(index)
local spellInfoBlock = {}
info.bg = _CreateFrame ("StatusBar", "DetailsPlayerDetailsWindow_DetalheInfoBG" .. index, _detalhes.playerDetailWindow.container_detalhes, "BackdropTemplate")
info.bg:SetStatusBarTexture ("Interface\\AddOns\\Details\\images\\bar_detalhes2")
info.bg:SetStatusBarColor(1, 1, 1, .84)
info.bg:SetMinMaxValues(0, 100)
info.bg:SetValue(100)
info.bg:SetSize(320, 47)
spellInfoBlock.bg = CreateFrame("StatusBar", "DetailsPlayerDetailsWindow_DetalheInfoBG" .. index, _detalhes.playerDetailWindow.container_detalhes, "BackdropTemplate")
spellInfoBlock.bg:SetStatusBarTexture("Interface\\AddOns\\Details\\images\\bar_detalhes2")
spellInfoBlock.bg:SetStatusBarColor(1, 1, 1, .84)
spellInfoBlock.bg:SetMinMaxValues(0, 100)
spellInfoBlock.bg:SetValue(100)
spellInfoBlock.bg:SetSize(320, 47)
info.nome = info.bg:CreateFontString(nil, "OVERLAY", "GameFontNormal")
info.nome2 = info.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
info.dano = info.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
info.dano_porcento = info.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
info.dano_media = info.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
info.dano_dps = info.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
spellInfoBlock.nome = spellInfoBlock.bg:CreateFontString(nil, "OVERLAY", "GameFontNormal")
spellInfoBlock.nome2 = spellInfoBlock.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
spellInfoBlock.dano = spellInfoBlock.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
spellInfoBlock.dano_porcento = spellInfoBlock.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
spellInfoBlock.dano_media = spellInfoBlock.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
spellInfoBlock.dano_dps = spellInfoBlock.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
info.bg.overlay = info.bg:CreateTexture("DetailsPlayerDetailsWindow_DetalheInfoBG_Overlay" .. index, "ARTWORK")
info.bg.overlay:SetTexture("Interface\\AddOns\\Details\\images\\overlay_detalhes")
info.bg.overlay:SetWidth(341)
info.bg.overlay:SetHeight(61)
info.bg.overlay:SetPoint("TOPLEFT", info.bg, "TOPLEFT", -7, 6)
Details.FadeHandler.Fader(info.bg.overlay, 1)
spellInfoBlock.middleStringUp = spellInfoBlock.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
spellInfoBlock.middleStringDown = spellInfoBlock.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
info.bg.reportar = gump:NewDetailsButton (info.bg, nil, nil, _detalhes.Reportar, _detalhes.playerDetailWindow, 10+index, 16, 16,
spellInfoBlock.bg.overlay = spellInfoBlock.bg:CreateTexture("DetailsPlayerDetailsWindow_DetalheInfoBG_Overlay" .. index, "ARTWORK")
spellInfoBlock.bg.overlay:SetTexture("Interface\\AddOns\\Details\\images\\overlay_detalhes")
spellInfoBlock.bg.overlay:SetWidth(341)
spellInfoBlock.bg.overlay:SetHeight(61)
spellInfoBlock.bg.overlay:SetPoint("TOPLEFT", spellInfoBlock.bg, "TOPLEFT", -7, 6)
Details.FadeHandler.Fader(spellInfoBlock.bg.overlay, 1)
spellInfoBlock.bg.reportar = gump:NewDetailsButton (spellInfoBlock.bg, nil, nil, _detalhes.Reportar, _detalhes.playerDetailWindow, 10+index, 16, 16,
"Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport1")
info.bg.reportar:SetPoint("BOTTOMLEFT", info.bg.overlay, "BOTTOMRIGHT", -33, 10)
Details.FadeHandler.Fader(info.bg.reportar, 1)
spellInfoBlock.bg.reportar:SetPoint("BOTTOMLEFT", spellInfoBlock.bg.overlay, "BOTTOMRIGHT", -33, 10)
Details.FadeHandler.Fader(spellInfoBlock.bg.reportar, 1)
info.bg:SetScript("OnEnter", detalhe_infobg_onenter)
info.bg:SetScript("OnLeave", detalhe_infobg_onleave)
spellInfoBlock.bg:SetScript("OnEnter", detalhe_infobg_onenter)
spellInfoBlock.bg:SetScript("OnLeave", detalhe_infobg_onleave)
info.bg.reportar:SetScript("OnEnter", detalhes_inforeport_onenter)
info.bg.reportar:SetScript("OnLeave", detalhes_inforeport_onleave)
spellInfoBlock.bg.reportar:SetScript("OnEnter", detalhes_inforeport_onenter)
spellInfoBlock.bg.reportar:SetScript("OnLeave", detalhes_inforeport_onleave)
info.bg_end = info.bg:CreateTexture("DetailsPlayerDetailsWindow_DetalheInfoBG_bg_end" .. index, "BACKGROUND")
info.bg_end:SetHeight(47)
info.bg_end:SetTexture("Interface\\AddOns\\Details\\images\\bar_detalhes2_end")
spellInfoBlock.bg_end = spellInfoBlock.bg:CreateTexture("DetailsPlayerDetailsWindow_DetalheInfoBG_bg_end" .. index, "BACKGROUND")
spellInfoBlock.bg_end:SetHeight(47)
spellInfoBlock.bg_end:SetTexture("Interface\\AddOns\\Details\\images\\bar_detalhes2_end")
_detalhes.playerDetailWindow.grupos_detalhes [index] = info
_detalhes.playerDetailWindow.grupos_detalhes[index] = spellInfoBlock
end
function info:SetDetailInfoConfigs (texture, color, x, y)
function info:SetDetailInfoConfigs(texture, color, x, y)
for i = 1, spellInfoSettings.amount do
if (texture) then
info.grupos_detalhes [i].bg:SetStatusBarTexture (texture)
info.grupos_detalhes[i].bg:SetStatusBarTexture(texture)
end
if (color) then
local texture = info.grupos_detalhes [i].bg:GetStatusBarTexture()
local texture = info.grupos_detalhes[i].bg:GetStatusBarTexture()
texture:SetVertexColor(unpack(color))
end
if (x or y) then
gump:SetaDetalheInfoAltura (i, x, y)
gump:SetaDetalheInfoAltura(i, x, y)
end
end
end
--determina qual a pociso que a barra de detalhes vai ocupar
------------------------------------------------------------------------------------------------------------------------------
function gump:SetaDetalheInfoAltura (index, xmod, ymod)
local info = _detalhes.playerDetailWindow.grupos_detalhes [index]
local janela = _detalhes.playerDetailWindow.container_detalhes
local altura = {-10, -63, -118, -173, -228, -279}
local x1 = 64 + (xmod or 0)
local x2 = 00 + (ymod or 0)
altura = altura [index]
function gump:SetaDetalheInfoAltura(index, xmod, ymod)
local spellInfoBlock = _detalhes.playerDetailWindow.grupos_detalhes[index]
--local janela = _detalhes.playerDetailWindow.container_detalhes
--local altura = {-10, -63, -118, -173, -228, -279}
--altura = altura[index]
local background
local y = -74 - ((index-1) * 79.5)
local yOffset = -74 - ((index-1) * 79.5)
if (index == 1) then
_detalhes.playerDetailWindow.right_background1:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), y)
_detalhes.playerDetailWindow.right_background1:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), yOffset)
background = _detalhes.playerDetailWindow.right_background1
elseif (index == 2) then
_detalhes.playerDetailWindow.right_background2:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), y)
_detalhes.playerDetailWindow.right_background2:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), yOffset)
background = _detalhes.playerDetailWindow.right_background2
elseif (index == 3) then
_detalhes.playerDetailWindow.right_background3:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), y)
_detalhes.playerDetailWindow.right_background3:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), yOffset)
background = _detalhes.playerDetailWindow.right_background3
elseif (index == 4) then
_detalhes.playerDetailWindow.right_background4:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), y)
_detalhes.playerDetailWindow.right_background4:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), yOffset)
background = _detalhes.playerDetailWindow.right_background4
elseif (index == 5) then
_detalhes.playerDetailWindow.right_background5:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), y)
_detalhes.playerDetailWindow.right_background5:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), yOffset)
background = _detalhes.playerDetailWindow.right_background5
elseif (index == 6) then
_detalhes.playerDetailWindow.right_background6:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), y)
_detalhes.playerDetailWindow.right_background6:SetPoint("topleft", _detalhes.playerDetailWindow, "topleft", 357 + (xmod or 0), yOffset)
background = _detalhes.playerDetailWindow.right_background6
end
@@ -714,91 +711,111 @@ function gump:SetaDetalheInfoAltura (index, xmod, ymod)
background:SetHeight(75)
--3 textos da esquerda e direita
local y = -3
local x = 3
local yOffset = -3
local xOffset = 3
local right = -1
info.nome:SetPoint("TOPLEFT", background, "TOPLEFT", x, y + (-2))
info.dano:SetPoint("TOPLEFT", background, "TOPLEFT", x, y + (-24))
info.dano_media:SetPoint("TOPLEFT", background, "TOPLEFT", x, y + (-44))
spellInfoBlock.nome:SetPoint("TOPLEFT", background, "TOPLEFT", xOffset, yOffset + (-2))
spellInfoBlock.dano:SetPoint("TOPLEFT", background, "TOPLEFT", xOffset, yOffset + (-24))
spellInfoBlock.dano_media:SetPoint("TOPLEFT", background, "TOPLEFT", xOffset, yOffset + (-44))
info.nome2:SetPoint("TOPRIGHT", background, "TOPRIGHT", -x + right, y + (-2))
info.dano_porcento:SetPoint("TOPRIGHT", background, "TOPRIGHT", -x + right, y + (-24))
info.dano_dps:SetPoint("TOPRIGHT", background, "TOPRIGHT", -x + right, y + (-44))
spellInfoBlock.nome2:SetPoint("TOPRIGHT", background, "TOPRIGHT", -xOffset + right, yOffset + (-2))
spellInfoBlock.dano_porcento:SetPoint("TOPRIGHT", background, "TOPRIGHT", -xOffset + right, yOffset + (-24))
spellInfoBlock.dano_dps:SetPoint("TOPRIGHT", background, "TOPRIGHT", -xOffset + right, yOffset + (-44))
info.bg:SetPoint("TOPLEFT", background, "TOPLEFT", 1, -1)
info.bg:SetHeight(background:GetHeight() - 2)
info.bg:SetWidth(background:GetWidth())
spellInfoBlock.middleStringUp:SetPoint("center", background, "center", 0, 0)
spellInfoBlock.middleStringUp:SetPoint("top", background, "top", 0, -2)
info.bg_end:SetPoint("LEFT", info.bg, "LEFT", info.bg:GetValue()*2.19, 0)
info.bg_end:SetHeight(background:GetHeight()+2)
info.bg_end:SetWidth(6)
info.bg_end:SetAlpha(.75)
spellInfoBlock.middleStringDown:SetPoint("center", background, "center", 0, 0)
spellInfoBlock.middleStringDown:SetPoint("bottom", background, "bottom", 0, 2)
info.bg.overlay:SetWidth(background:GetWidth() + 24)
info.bg.overlay:SetHeight(background:GetHeight() + 16)
spellInfoBlock.bg:SetPoint("TOPLEFT", background, "TOPLEFT", 1, -1)
spellInfoBlock.bg:SetHeight(background:GetHeight() - 2)
spellInfoBlock.bg:SetWidth(background:GetWidth())
info.bg:Hide()
spellInfoBlock.bg_end:SetPoint("LEFT", spellInfoBlock.bg, "LEFT", spellInfoBlock.bg:GetValue()*2.19, 0)
spellInfoBlock.bg_end:SetHeight(background:GetHeight()+2)
spellInfoBlock.bg_end:SetWidth(6)
spellInfoBlock.bg_end:SetAlpha(.75)
spellInfoBlock.bg.overlay:SetWidth(background:GetWidth() + 24)
spellInfoBlock.bg.overlay:SetHeight(background:GetHeight() + 16)
spellInfoBlock.bg:Hide()
end
--seta o contedo da barra de detalhes
------------------------------------------------------------------------------------------------------------------------------
function gump:SetaDetalheInfoTexto (index, p, arg1, arg2, arg3, arg4, arg5, arg6)
local info = _detalhes.playerDetailWindow.grupos_detalhes [index]
function gump:SetaDetalheInfoTexto(index, data, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
local spellInfoBlock = _detalhes.playerDetailWindow.grupos_detalhes[index]
if (p) then
if (type(p) == "table") then
info.bg:SetValue(p.p)
info.bg:SetStatusBarColor(p.c[1], p.c[2], p.c[3], p.c[4] or 1)
if (data) then
if (type(data) == "table") then
spellInfoBlock.bg:SetValue(data.p)
spellInfoBlock.bg:SetStatusBarColor(data.c[1], data.c[2], data.c[3], data.c[4] or 1)
else
info.bg:SetValue(p)
info.bg:SetStatusBarColor(1, 1, 1, .5)
local percentAmount = data
spellInfoBlock.bg:SetValue(percentAmount)
spellInfoBlock.bg:SetStatusBarColor(1, 1, 1, .5)
end
info.bg_end:Show()
info.bg_end:SetPoint("LEFT", info.bg, "LEFT", (info.bg:GetValue() * (info.bg:GetWidth( ) / 100)) - 3, 0) -- 2.19
info.bg:Show()
spellInfoBlock.bg_end:Show()
spellInfoBlock.bg_end:SetPoint("LEFT", spellInfoBlock.bg, "LEFT", (spellInfoBlock.bg:GetValue() * (spellInfoBlock.bg:GetWidth( ) / 100)) - 3, 0) -- 2.19
spellInfoBlock.bg:Show()
end
if (info.IsPet) then
info.bg.PetIcon:Hide()
info.bg.PetText:Hide()
info.bg.PetDps:Hide()
Details.FadeHandler.Fader(info.bg.overlay, "IN")
info.IsPet = false
if (spellInfoBlock.IsPet) then
spellInfoBlock.bg.PetIcon:Hide()
spellInfoBlock.bg.PetText:Hide()
spellInfoBlock.bg.PetDps:Hide()
Details.FadeHandler.Fader(spellInfoBlock.bg.overlay, "IN")
spellInfoBlock.IsPet = false
end
if (arg1) then
info.nome:SetText(arg1)
spellInfoBlock.nome:SetText(arg1)
end
if (arg2) then
info.dano:SetText(arg2)
spellInfoBlock.dano:SetText(arg2)
end
if (arg3) then
info.dano_porcento:SetText(arg3)
spellInfoBlock.dano_porcento:SetText(arg3)
end
if (arg4) then
info.dano_media:SetText(arg4)
spellInfoBlock.dano_media:SetText(arg4)
end
if (arg5) then
info.dano_dps:SetText(arg5)
spellInfoBlock.dano_dps:SetText(arg5)
end
if (arg6) then
info.nome2:SetText(arg6)
spellInfoBlock.nome2:SetText(arg6)
end
info.nome:Show()
info.dano:Show()
info.dano_porcento:Show()
info.dano_media:Show()
info.dano_dps:Show()
info.nome2:Show()
if (arg7) then
spellInfoBlock.middleStringUp:SetText(arg7)
else
spellInfoBlock.middleStringUp:SetText("")
end
if (arg8) then
spellInfoBlock.middleStringDown:SetText(arg8)
else
spellInfoBlock.middleStringDown:SetText("")
end
spellInfoBlock.nome:Show()
spellInfoBlock.dano:Show()
spellInfoBlock.dano_porcento:Show()
spellInfoBlock.dano_media:Show()
spellInfoBlock.dano_dps:Show()
spellInfoBlock.nome2:Show()
spellInfoBlock.middleStringUp:Show()
spellInfoBlock.middleStringDown:Show()
end
--cria as 5 caixas de detalhes infos que sero usados
@@ -807,7 +824,7 @@ local function cria_barras_detalhes()
_detalhes.playerDetailWindow.grupos_detalhes = {}
for i = 1, spellInfoSettings.amount do
gump:CriaDetalheInfo (i)
gump:SetaDetalheInfoAltura (i)
gump:SetaDetalheInfoAltura(i)
end
end
@@ -841,15 +858,14 @@ local function cria_textos (este_gump, SWW)
este_gump.avatar:Hide()
este_gump.avatar_bg:Hide()
este_gump.avatar_nick:Hide()
end
--esquerdo superior
local function cria_container_barras (este_gump, SWW)
local container_barras_window = _CreateFrame ("ScrollFrame", "Details_Info_ContainerBarrasScroll", SWW, "BackdropTemplate")
local container_barras = _CreateFrame ("Frame", "Details_Info_ContainerBarras", container_barras_window, "BackdropTemplate")
local container_barras_window = CreateFrame("ScrollFrame", "Details_Info_ContainerBarrasScroll", SWW, "BackdropTemplate")
local container_barras = CreateFrame("Frame", "Details_Info_ContainerBarras", container_barras_window, "BackdropTemplate")
container_barras:SetAllPoints(container_barras_window)
container_barras:SetWidth(300)
@@ -917,7 +933,7 @@ end
--container direita
local function cria_container_detalhes (este_gump, SWW)
local container_detalhes = _CreateFrame ("Frame", "Details_Info_ContainerDetalhes", SWW, "BackdropTemplate")
local container_detalhes = CreateFrame("Frame", "Details_Info_ContainerDetalhes", SWW, "BackdropTemplate")
container_detalhes:SetPoint("TOPRIGHT", este_gump, "TOPRIGHT", -74, -76)
container_detalhes:SetWidth(220)
@@ -931,8 +947,8 @@ end
--esquerdo inferior
local function cria_container_alvos (este_gump, SWW)
local container_alvos_window = _CreateFrame ("ScrollFrame", "Details_Info_ContainerAlvosScroll", SWW, "BackdropTemplate")
local container_alvos = _CreateFrame ("Frame", "Details_Info_ContainerAlvos", container_alvos_window, "BackdropTemplate")
local container_alvos_window = CreateFrame("ScrollFrame", "Details_Info_ContainerAlvosScroll", SWW, "BackdropTemplate")
local container_alvos = CreateFrame("Frame", "Details_Info_ContainerAlvos", container_alvos_window, "BackdropTemplate")
container_alvos:SetAllPoints(container_alvos_window)
container_alvos:SetWidth(300)
@@ -1062,13 +1078,13 @@ function _detalhes:SetPDWBarConfig (texture)
local texture = SharedMedia:Fetch ("statusbar", texture)
for _, bar in ipairs(window.barras1) do
bar.textura:SetStatusBarTexture (texture)
bar.textura:SetStatusBarTexture(texture)
end
for _, bar in ipairs(window.barras2) do
bar.textura:SetStatusBarTexture (texture)
bar.textura:SetStatusBarTexture(texture)
end
for _, bar in ipairs(window.barras3) do
bar.textura:SetStatusBarTexture (texture)
bar.textura:SetStatusBarTexture(texture)
end
end
end
@@ -1172,7 +1188,7 @@ local default_skin = function()
end
--info container
info:SetDetailInfoConfigs ("Interface\\AddOns\\Details\\images\\bar_detalhes2", {1, 1, 1, 0.5}, 0, 0)
info:SetDetailInfoConfigs("Interface\\AddOns\\Details\\images\\bar_detalhes2", {1, 1, 1, 0.5}, 0, 0)
window.bg1_sec_texture:SetPoint("topleft", window.bg1, "topleft", 348, -86)
window.bg1_sec_texture:SetHeight(262)
@@ -1402,7 +1418,7 @@ local elvui_skin = function()
end
--seta configs dos 5 blocos da direita
info:SetDetailInfoConfigs ("Interface\\AddOns\\Details\\images\\bar_serenity", {1, 1, 1, 0.35}, -6 + 100, 0)
info:SetDetailInfoConfigs("Interface\\AddOns\\Details\\images\\bar_serenity", {1, 1, 1, 0.35}, -6 + 100, 0)
window.bg1_sec_texture:SetPoint("topleft", window.bg1, "topleft", 446, -86)
window.bg1_sec_texture:SetWidth(337)
@@ -1662,7 +1678,7 @@ function gump:CriaJanelaInfo()
este_gump.bg1:SetDrawLayer("BORDER", 1)
--boto de fechar
este_gump.close_button = _CreateFrame ("Button", nil, este_gump, "UIPanelCloseButton")
este_gump.close_button = CreateFrame("Button", nil, este_gump, "UIPanelCloseButton")
este_gump.close_button:SetWidth(32)
este_gump.close_button:SetHeight(32)
este_gump.close_button:SetPoint("TOPRIGHT", este_gump, "TOPRIGHT", 5, -8)
@@ -4398,7 +4414,7 @@ function gump:CriaJanelaInfo()
bar.index = index
bar:SetPoint("topleft", spellicon, "topright", 0, 0)
bar:SetPoint("topright", parent, "topright", -4, y)
bar:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_serenity]])
bar:SetStatusBarTexture([[Interface\AddOns\Details\images\bar_serenity]])
bar:SetStatusBarColor(.5, .5, .5, 1)
bar:SetAlpha(ALPHA_BLEND_AMOUNT)
@@ -4610,7 +4626,7 @@ function gump:CriaJanelaInfo()
bar.index = index
bar:SetPoint("topleft", spellicon, "topright", 0, 0)
bar:SetPoint("topright", parent, "topright", -1, y)
bar:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_serenity]])
bar:SetStatusBarTexture([[Interface\AddOns\Details\images\bar_serenity]])
bar:SetStatusBarColor(unpack(bar_color))
bar:SetMinMaxValues(0, 100)
bar:SetValue(0)
@@ -5864,7 +5880,7 @@ function gump:CriaNovaBarraInfo2(instancia, index)
local janela = info.container_alvos.gump
local esta_barra = _CreateFrame ("Button", "Details_infobox2_bar_"..index, info.container_alvos.gump, "BackdropTemplate")
local esta_barra = CreateFrame("Button", "Details_infobox2_bar_"..index, info.container_alvos.gump, "BackdropTemplate")
esta_barra:SetHeight(CONST_TARGET_HEIGHT)
local y = (index-1) * (CONST_TARGET_HEIGHT + 1)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

@@ -17,7 +17,7 @@ local IsInRaid = IsInRaid --wow api local
local IsInGroup = IsInGroup --wow api local
local _UnitAura = UnitAura --wow api local
local _GetSpellInfo = _detalhes.getspellinfo --wow api local
local _CreateFrame = CreateFrame --wow api local
local CreateFrame = CreateFrame --wow api local
local GetTime = GetTime --wow api local
local _GetCursorPosition = GetCursorPosition --wow api local
local _GameTooltip = GameTooltip --wow api local
@@ -1783,7 +1783,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
barra:SetScript("OnLeave", _OnHide)
barra:HookScript ("OnMouseDown", EncounterDetails.BossInfoRowClick)
local add_damage_done = _CreateFrame ("Button", nil, barra, "BackdropTemplate")
local add_damage_done = CreateFrame("Button", nil, barra, "BackdropTemplate")
barra.report_text = "Details! Tamage Taken of "
add_damage_done.report_text = "Details! Damage Done of "
add_damage_done.barra = barra
@@ -1807,7 +1807,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
add_damage_done:SetScript("OnClick", EncounterDetails.BossInfoRowClick)
barra.lineText1:SetPoint("left", add_damage_done, "right", 2, 0)
barra.textura:SetStatusBarTexture (nil)
barra.textura:SetStatusBarTexture(nil)
_detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE)
_detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE)
+1 -1
View File
@@ -185,7 +185,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
t:SetTexture(EncounterDetails.Frame.DefaultBarTexture)
row.t = t
row.textura:SetStatusBarTexture (t)
row.textura:SetStatusBarTexture(t)
row.textura:SetStatusBarColor(.5, .5, .5, 0)
row.textura:SetMinMaxValues(0,100)
@@ -585,7 +585,7 @@ local function CreatePluginFrames()
local statusbar_texture = statusbar:CreateTexture(nil, "border")
statusbar_texture:SetTexture(1, 1, 1, 0.15)
statusbar:SetStatusBarColor(0, 0, 0, 0)
statusbar:SetStatusBarTexture (statusbar_texture)
statusbar:SetStatusBarTexture(statusbar_texture)
statusbar:SetMinMaxValues(0, 100)
statusbar:SetValue(0)
local statusbar_spark = statusbar:CreateTexture(nil, "artwork")