- Added a macro section with useful macros.
- More polish done to the Encounter Details! window.
This commit is contained in:
@@ -33,6 +33,9 @@ local EncounterDetails = _detalhes:NewPluginObject ("Details_EncounterDetails",
|
||||
tinsert (UISpecialFrames, "Details_EncounterDetails")
|
||||
--> Main Frame
|
||||
local EncounterDetailsFrame = EncounterDetails.Frame
|
||||
EncounterDetailsFrame.DefaultBarHeight = 20
|
||||
EncounterDetailsFrame.CooltipStatusbarAlpha = .65
|
||||
EncounterDetailsFrame.DefaultBarTexture = "Interface\\AddOns\\Details\\images\\bar_serenity"
|
||||
|
||||
EncounterDetails:SetPluginDescription ("Raid encounters summary, show basic stuff like dispels, interrupts and also graphic charts, boss emotes and the Weakaura Creation Tool.")
|
||||
|
||||
@@ -49,6 +52,20 @@ local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
|
||||
EncounterDetails.name = "Encounter Details"
|
||||
EncounterDetails.debugmode = false
|
||||
|
||||
function EncounterDetails:FormatCooltipSettings()
|
||||
GameCooltip:SetType ("tooltip")
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_serenity]])
|
||||
GameCooltip:SetOption ("StatusBarHeightMod", 0)
|
||||
GameCooltip:SetOption ("FixedWidth", 280)
|
||||
GameCooltip:SetOption ("TextSize", 11)
|
||||
GameCooltip:SetOption ("LeftBorderSize", -4)
|
||||
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||
GameCooltip:SetOption ("ButtonsYMod", 0)
|
||||
GameCooltip:SetOption ("YSpacingMod", -1)
|
||||
end
|
||||
|
||||
EncounterDetails.CooltipLineHeight = 18
|
||||
|
||||
local ability_type_table = {
|
||||
[0x1] = "|cFF00FF00"..Loc ["STRING_HEAL"].."|r",
|
||||
[0x2] = "|cFF710000"..Loc ["STRING_LOWDPS"].."|r",
|
||||
@@ -615,28 +632,6 @@ local function CreatePluginFrames (data)
|
||||
|
||||
end
|
||||
|
||||
local IsShiftKeyDown = IsShiftKeyDown
|
||||
|
||||
local shift_monitor = function (self)
|
||||
if (IsShiftKeyDown()) then
|
||||
local spellname = GetSpellInfo (self.spellid)
|
||||
if (spellname) then
|
||||
if (GameCooltip) then
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
|
||||
GameTooltip:SetSpellByID (self.spellid)
|
||||
GameTooltip:Show()
|
||||
self.showing_spelldesc = true
|
||||
end
|
||||
else
|
||||
if (self.showing_spelldesc) then
|
||||
self:GetScript ("OnEnter") (self)
|
||||
self.showing_spelldesc = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local sort_damage_from = function (a, b)
|
||||
if (a[3] ~= "PET" and b[3] ~= "PET") then
|
||||
return a[2] > b[2]
|
||||
@@ -766,13 +761,13 @@ end
|
||||
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
end
|
||||
|
||||
--death log cooltip settings
|
||||
GameCooltip:SetOption ("StatusBarHeightMod", -6)
|
||||
GameCooltip:SetOption ("FixedWidth", 300)
|
||||
GameCooltip:SetOption ("TextSize", 9)
|
||||
GameCooltip:SetOption ("LeftBorderSize", -4)
|
||||
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_serenity]])
|
||||
--GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true)
|
||||
GameCooltip:SetBackdrop (1, _detalhes.cooltip_preset2_backdrop, bgColor, borderColor)
|
||||
|
||||
GameCooltip:ShowCooltip()
|
||||
@@ -793,11 +788,18 @@ local function DispellInfo (dispell, barra)
|
||||
for index, tabela in _ipairs (tabela_jogadores) do
|
||||
local coords = EncounterDetails.class_coords [tabela[3]]
|
||||
if (not coords) then
|
||||
GameCooltip:AddLine (tabela[1], tabela[2], 1, "white", "orange")
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]), tabela[2], 1, "white", "orange")
|
||||
GameCooltip:AddIcon ("Interface\\GossipFrame\\DailyActiveQuestIcon")
|
||||
else
|
||||
GameCooltip:AddLine (tabela[1], tabela[2], 1, "white", "orange")
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, 1, 14, 14, (coords[1]), (coords[2]), (coords[3]), (coords[4]))
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]), tabela[2], 1, "white", "orange")
|
||||
|
||||
local specID = Details:GetSpec (tabela[1])
|
||||
if (specID) then
|
||||
local texture, l, r, t, b = Details:GetSpecIcon (specID, false)
|
||||
GameCooltip:AddIcon (texture, 1, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, l, r, t, b)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, (coords[1]), (coords[2]), (coords[3]), (coords[4]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -826,13 +828,21 @@ local function KickBy (magia, barra)
|
||||
local spellName, _, spellIcon = GetSpellInfo (barra.texto_esquerdo:GetText())
|
||||
GameCooltip:AddLine (barra.texto_esquerdo:GetText())
|
||||
if (spellIcon) then
|
||||
GameCooltip:AddIcon (spellIcon, nil, 1, 14, 14, 5/64, 59/64, 5/64, 59/64)
|
||||
GameCooltip:AddIcon (spellIcon, nil, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, 5/64, 59/64, 5/64, 59/64)
|
||||
end
|
||||
|
||||
for index, tabela in _ipairs (tabela_jogadores) do
|
||||
local coords = EncounterDetails.class_coords [tabela[3]]
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]) .. ": ", tabela[2], 1, "white")
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, 1, 14, 14, (coords[1]), (coords[2]), (coords[3]), (coords[4]))
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]), tabela[2], 1, "white")
|
||||
|
||||
local specID = Details:GetSpec (tabela[1])
|
||||
if (specID) then
|
||||
local texture, l, r, t, b = Details:GetSpecIcon (specID, false)
|
||||
GameCooltip:AddIcon (texture, 1, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, l, r, t, b)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, (coords[1]), (coords[2]), (coords[3]), (coords[4]))
|
||||
end
|
||||
|
||||
GameCooltip:AddStatusBar (100, 1, .3, .3, .3, .3, false, false, false)
|
||||
end
|
||||
|
||||
@@ -872,12 +882,25 @@ local function EnemySkills (habilidade, barra)
|
||||
for index, tabela in _ipairs (tabela_jogadores) do
|
||||
local coords = EncounterDetails.class_coords [tabela[3]]
|
||||
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]) .. ": ", ToK (_, tabela[2]) .. " (" .. format ("%.1f", tabela[2] / total * 100) .. "%)", 1, "white")
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]), ToK (_, tabela[2]) .. " (" .. format ("%.1f", tabela[2] / total * 100) .. "%)", 1, "white")
|
||||
local r, g, b, a = unpack (_detalhes.tooltip.background)
|
||||
GameCooltip:AddStatusBar (tabela[2] / topValue * 100, 1, r, g, b, a, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
|
||||
if (coords) then
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, 1, 14, 14, (coords[1]), (coords[2]), (coords[3]), (coords[4]))
|
||||
local actorClass = Details:GetClass (tabela[1])
|
||||
if (actorClass) then
|
||||
local r, g, b = Details:GetClassColor (actorClass)
|
||||
GameCooltip:AddStatusBar (tabela[2] / topValue * 100, 1, r, g, b, EncounterDetailsFrame.CooltipStatusbarAlpha, false, {value = 100, color = {.21, .21, .21, 0.5}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
else
|
||||
GameCooltip:AddStatusBar (tabela[2] / topValue * 100, 1, r, g, b, a, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
end
|
||||
|
||||
local specID = Details:GetSpec (tabela[1])
|
||||
if (specID) then
|
||||
local texture, l, r, t, b = Details:GetSpecIcon (specID, false)
|
||||
GameCooltip:AddIcon (texture, 1, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, l, r, t, b)
|
||||
else
|
||||
if (coords) then
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, (coords[1]), (coords[2]), (coords[3]), (coords[4]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -885,7 +908,7 @@ local function EnemySkills (habilidade, barra)
|
||||
if (spellname) then
|
||||
GameTooltip:SetOwner (GameCooltipFrame1, "ANCHOR_NONE")
|
||||
GameTooltip:SetSpellByID (barra.spellid)
|
||||
GameTooltip:SetPoint ("topright", GameCooltipFrame1, "topleft", -2, 0)
|
||||
GameTooltip:SetPoint ("right", barra, "left", -2, 0)
|
||||
GameTooltip:Show()
|
||||
end
|
||||
|
||||
@@ -907,7 +930,6 @@ local function DamageTakenDetails (jogador, barra)
|
||||
if (este_agressor) then --> checagem por causa do total e do garbage collector que não limpa os nomes que deram dano
|
||||
local habilidades = este_agressor.spells._ActorTable
|
||||
for id, habilidade in _pairs (habilidades) do
|
||||
--print ("oi - " .. este_agressor.nome)
|
||||
local alvos = habilidade.targets
|
||||
for target_name, amount in _pairs (alvos) do
|
||||
if (target_name == jogador.nome) then
|
||||
@@ -940,10 +962,10 @@ local function DamageTakenDetails (jogador, barra)
|
||||
teve_melee = true
|
||||
end
|
||||
|
||||
GameCooltip:AddLine (nome_magia..": ", ToK (_, meus_agressores[i][2]) .. " (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", 1, "white")
|
||||
GameCooltip:AddStatusBar (meus_agressores[i][2] / topDamage * 100, 1, .3, .3, .3, .3, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
GameCooltip:AddLine (nome_magia, ToK (_, meus_agressores[i][2]) .. " (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", 1, "white")
|
||||
GameCooltip:AddStatusBar (meus_agressores[i][2] / topDamage * 100, 1, .3, .3, .3, .6, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
|
||||
GameCooltip:AddIcon (icone_magia, nil, 1, 14, 14)
|
||||
GameCooltip:AddIcon (icone_magia, nil, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, .1, .9, .1, .9)
|
||||
end
|
||||
|
||||
if (teve_melee) then
|
||||
@@ -1062,23 +1084,15 @@ function EncounterDetails:SetRowScripts (barra, index, container)
|
||||
|
||||
self.mouse_over = true
|
||||
|
||||
self:SetHeight (17)
|
||||
self:SetAlpha(1)
|
||||
self:SetHeight (EncounterDetails.Frame.DefaultBarHeight + 1)
|
||||
self:SetAlpha (1)
|
||||
|
||||
EncounterDetails.SetBarBackdrop_OnEnter (self)
|
||||
|
||||
--GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
|
||||
GameCooltip:Preset (2)
|
||||
GameCooltip:SetOwner (self)
|
||||
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background]])
|
||||
GameCooltip:SetOption ("StatusBarHeightMod", 0)
|
||||
GameCooltip:SetOption ("FixedWidth", 280)
|
||||
GameCooltip:SetOption ("TextSize", 10)
|
||||
GameCooltip:SetOption ("LeftBorderSize", -4)
|
||||
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||
GameCooltip:SetOption ("ButtonsYMod", 0)
|
||||
GameCooltip:SetOption ("YSpacingMod", -1)
|
||||
EncounterDetails:FormatCooltipSettings()
|
||||
|
||||
if (not self.TTT) then --> tool tip type
|
||||
return
|
||||
@@ -1086,8 +1100,6 @@ function EncounterDetails:SetRowScripts (barra, index, container)
|
||||
|
||||
if (self.TTT == "damage_taken") then --> damage taken
|
||||
DamageTakenDetails (self.jogador, barra)
|
||||
|
||||
elseif (self.TTT == "adds_container") then
|
||||
|
||||
elseif (self.TTT == "habilidades_inimigas") then --> enemy abilytes
|
||||
self.spellid = self.jogador [4]
|
||||
@@ -1104,8 +1116,6 @@ function EncounterDetails:SetRowScripts (barra, index, container)
|
||||
elseif (self.TTT == "morte") then --> deaths
|
||||
KillInfo (self.jogador, self) --> aqui 2
|
||||
end
|
||||
|
||||
--GameTooltip:Show()
|
||||
|
||||
GameCooltip:Show()
|
||||
end)
|
||||
@@ -1119,7 +1129,7 @@ function EncounterDetails:SetRowScripts (barra, index, container)
|
||||
return
|
||||
end
|
||||
|
||||
self:SetHeight (16)
|
||||
self:SetHeight (EncounterDetails.Frame.DefaultBarHeight)
|
||||
self:SetAlpha (0.9)
|
||||
|
||||
EncounterDetails.SetBarBackdrop_OnLeave (self)
|
||||
@@ -1295,11 +1305,18 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
barra.textura:SetValue (jogador.damage_taken/dano_do_primeiro *100)
|
||||
end
|
||||
|
||||
barra.icone:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small")
|
||||
if (EncounterDetails.class_coords [jogador.classe]) then
|
||||
barra.icone:SetTexCoord (_unpack (EncounterDetails.class_coords [jogador.classe]))
|
||||
local specID = Details:GetSpec (jogador.nome)
|
||||
if (specID) then
|
||||
local texture, l, r, t, b = Details:GetSpecIcon (specID, false)
|
||||
barra.icone:SetTexture (texture)
|
||||
barra.icone:SetTexCoord (l, r, t, b)
|
||||
else
|
||||
barra.icone:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small")
|
||||
if (EncounterDetails.class_coords [jogador.classe]) then
|
||||
barra.icone:SetTexCoord (_unpack (EncounterDetails.class_coords [jogador.classe]))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
barra:Show()
|
||||
quantidade = quantidade + 1
|
||||
end
|
||||
@@ -1322,6 +1339,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local habilidades_poll = {}
|
||||
|
||||
--> pega as magias contínuas presentes em todas as fases
|
||||
--deprecated
|
||||
if (boss_info and boss_info.continuo) then
|
||||
for index, spellid in _ipairs (boss_info.continuo) do
|
||||
habilidades_poll [spellid] = true
|
||||
@@ -1329,6 +1347,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
end
|
||||
|
||||
--> pega as habilidades que pertence especificamente a cada fase
|
||||
--deprecated
|
||||
if (boss_info and boss_info.phases) then
|
||||
for fase_id, fase in _ipairs (boss_info.phases) do
|
||||
if (fase.spells) then
|
||||
@@ -1370,7 +1389,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
--> adiciona ao [1] total de dano que esta habilidade causou
|
||||
esta_habilidade[1] = esta_habilidade[1] + habilidade.total
|
||||
|
||||
--> adiciona ao [3] total do jogador que castou
|
||||
--> adiciona ao [3] total do jogador que castou
|
||||
if (not esta_habilidade[3][jogador.nome]) then
|
||||
esta_habilidade[3][jogador.nome] = 0
|
||||
end
|
||||
@@ -1603,7 +1622,6 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
--> montou a tabela, agora precisa mostrar no painel
|
||||
|
||||
local function _DanoFeito (self)
|
||||
|
||||
self.textura:SetBlendMode ("ADD")
|
||||
|
||||
local barra = self:GetParent()
|
||||
@@ -1613,15 +1631,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
GameCooltip:Preset (2)
|
||||
GameCooltip:SetOwner (self)
|
||||
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background]])
|
||||
GameCooltip:SetOption ("StatusBarHeightMod", 0)
|
||||
GameCooltip:SetOption ("FixedWidth", 280)
|
||||
GameCooltip:SetOption ("TextSize", 10)
|
||||
GameCooltip:SetOption ("LeftBorderSize", -4)
|
||||
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||
GameCooltip:SetOption ("ButtonsYMod", 0)
|
||||
GameCooltip:SetOption ("YSpacingMod", -1)
|
||||
GameCooltip:SetType ("tooltip")
|
||||
EncounterDetails:FormatCooltipSettings()
|
||||
|
||||
GameCooltip:AddLine (barra.texto_esquerdo:GetText().." ".. "Damage Done")
|
||||
|
||||
@@ -1630,10 +1640,23 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local dano_em_total = tabela.dano_em_total
|
||||
for _, esta_tabela in _pairs (dano_em) do
|
||||
local coords = EncounterDetails.class_coords [esta_tabela[3]]
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (esta_tabela[1]), _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/dano_em_total*100) .."%)", 1, "white", "orange")
|
||||
|
||||
GameCooltip:AddLine (esta_tabela[1]..": ", _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/dano_em_total*100) .."%)", 1, "white", "orange")
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, (coords[1]), (coords[2]), (coords[3]), (coords[4]))
|
||||
GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, .3, .3, .3, .3, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
local specID = Details:GetSpec (esta_tabela[1])
|
||||
if (specID) then
|
||||
local texture, l, r, t, b = Details:GetSpecIcon (specID, false)
|
||||
GameCooltip:AddIcon (texture, 1, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, l, r, t, b)
|
||||
else
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, (coords[1]), (coords[2]), (coords[3]), (coords[4]))
|
||||
end
|
||||
|
||||
local actorClass = Details:GetClass (esta_tabela[1])
|
||||
if (actorClass) then
|
||||
local r, g, b = Details:GetClassColor (actorClass)
|
||||
GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, r, g, b, EncounterDetailsFrame.CooltipStatusbarAlpha, false, {value = 100, color = {.21, .21, .21, 0.5}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
else
|
||||
GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, .3, .3, .3, .3, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
end
|
||||
end
|
||||
|
||||
GameCooltip:AddLine (" ")
|
||||
@@ -1650,15 +1673,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
GameCooltip:Preset (2)
|
||||
GameCooltip:SetOwner (self)
|
||||
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background]])
|
||||
GameCooltip:SetOption ("StatusBarHeightMod", 0)
|
||||
GameCooltip:SetOption ("FixedWidth", 280)
|
||||
GameCooltip:SetOption ("TextSize", 10)
|
||||
GameCooltip:SetOption ("LeftBorderSize", -4)
|
||||
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||
GameCooltip:SetOption ("ButtonsYMod", 0)
|
||||
GameCooltip:SetOption ("YSpacingMod", -1)
|
||||
GameCooltip:SetType ("tooltip")
|
||||
EncounterDetails:FormatCooltipSettings()
|
||||
|
||||
GameCooltip:AddLine (barra.texto_esquerdo:GetText().." "..Loc ["STRING_DAMAGE_TAKEN"])
|
||||
|
||||
@@ -1669,12 +1684,25 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
|
||||
local coords = EncounterDetails.class_coords [esta_tabela[3]]
|
||||
if (coords) then
|
||||
GameCooltip:AddLine (esta_tabela[1]..": ", _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)", 1, "white", "orange")
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, (coords[1]), (coords[2]), (coords[3]), (coords[4]))
|
||||
GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, .3, .3, .3, .3, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
GameCooltip:AddLine (EncounterDetails:GetOnlyName (esta_tabela[1]), _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)", 1, "white", "orange", nil, nil, "MONOCHRONE")
|
||||
|
||||
local specID = Details:GetSpec (esta_tabela[1])
|
||||
if (specID) then
|
||||
local texture, l, r, t, b = Details:GetSpecIcon (specID, false)
|
||||
GameCooltip:AddIcon (texture, 1, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, l, r, t, b)
|
||||
else
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, (coords[1]), (coords[2]), (coords[3]), (coords[4]))
|
||||
end
|
||||
|
||||
local actorClass = Details:GetClass (esta_tabela[1])
|
||||
if (actorClass) then
|
||||
local r, g, b = Details:GetClassColor (actorClass)
|
||||
GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, r, g, b, EncounterDetailsFrame.CooltipStatusbarAlpha, false, {value = 100, color = {.21, .21, .21, 0.5}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
else
|
||||
GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, .3, .3, .3, .3, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
end
|
||||
else
|
||||
GameCooltip:AddLine (esta_tabela[1]..": ", _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)")
|
||||
GameCooltip:AddLine (esta_tabela[1], _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)")
|
||||
GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, .3, .3, .3, .3, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
end
|
||||
end
|
||||
@@ -1717,8 +1745,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
barra.report_text = "Details! Tamage Taken of "
|
||||
add_damage_done.report_text = "Details! Damage Done of "
|
||||
add_damage_done.barra = barra
|
||||
add_damage_done:SetWidth (16)
|
||||
add_damage_done:SetHeight (16)
|
||||
add_damage_done:SetWidth (EncounterDetails.CooltipLineHeight)
|
||||
add_damage_done:SetHeight (EncounterDetails.CooltipLineHeight)
|
||||
add_damage_done:EnableMouse (true)
|
||||
add_damage_done:SetResizable (false)
|
||||
add_damage_done:SetPoint ("left", barra, "left", 0, 0)
|
||||
@@ -1863,7 +1891,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
end
|
||||
|
||||
barra.icone:SetTexture (icone_magia)
|
||||
--barra.icone:SetTexCoord (_unpack (EncounterDetails.class_coords [jogador.classe]))
|
||||
barra.icone:SetTexCoord (.1, .9, .1, .9)
|
||||
|
||||
barra:Show()
|
||||
|
||||
@@ -1966,7 +1994,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
end
|
||||
|
||||
barra.icone:SetTexture (icone_magia)
|
||||
--barra.icone:SetTexCoord (_unpack (EncounterDetails.class_coords [jogador.classe]))
|
||||
barra.icone:SetTexCoord (.1, .9, .1, .9)
|
||||
|
||||
barra:Show()
|
||||
|
||||
|
||||
@@ -182,12 +182,12 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
row.textura = CreateFrame ("StatusBar", nil, row)
|
||||
row.textura:SetAllPoints (row)
|
||||
local t = row.textura:CreateTexture (nil, "overlay")
|
||||
t:SetTexture ("Interface\\AddOns\\Details\\images\\bar_serenity")
|
||||
--t:SetTexture ("Interface\\AddOns\\Details\\images\\bar_skyline")
|
||||
t:SetTexture (EncounterDetails.Frame.DefaultBarTexture)
|
||||
|
||||
row.t = t
|
||||
row.textura:SetStatusBarTexture (t)
|
||||
row.textura:SetStatusBarColor(.5, .5, .5, 0)
|
||||
row.textura:SetMinMaxValues(0,100)
|
||||
row.textura:SetStatusBarColor (.5, .5, .5, 0)
|
||||
row.textura:SetMinMaxValues (0,100)
|
||||
|
||||
row.texto_esquerdo = row.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
row.texto_esquerdo:SetPoint ("LEFT", row.textura, "LEFT", 22, -1)
|
||||
@@ -209,10 +209,12 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
x_mod = x_mod or 0
|
||||
width_mod = width_mod or 0
|
||||
|
||||
barra:SetWidth (200+width_mod) --> tamanho da barra de acordo com o tamanho da janela
|
||||
barra:SetHeight (16) --> altura determinada pela instância
|
||||
local default_height = EncounterDetails.Frame.DefaultBarHeight
|
||||
|
||||
local y = (index-1)*17
|
||||
barra:SetWidth (200 + width_mod) --> tamanho da barra de acordo com o tamanho da janela
|
||||
barra:SetHeight (default_height) --> altura determinada pela instância
|
||||
|
||||
local y = (index-1)*(default_height + 1)
|
||||
y_mod = y_mod or 0
|
||||
y = y + y_mod
|
||||
y = y*-1 --> baixo
|
||||
@@ -232,9 +234,9 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
|
||||
--> icone
|
||||
barra.icone = barra.textura:CreateTexture (nil, "OVERLAY")
|
||||
barra.icone:SetWidth (16)
|
||||
barra.icone:SetHeight (16)
|
||||
barra.icone:SetPoint ("RIGHT", barra.textura, "LEFT", 0+20, 0)
|
||||
barra.icone:SetWidth (default_height)
|
||||
barra.icone:SetHeight (default_height)
|
||||
barra.icone:SetPoint ("RIGHT", barra.textura, "LEFT", 20, 0)
|
||||
|
||||
barra:SetAlpha (0.9)
|
||||
barra.icone:SetAlpha (0.8)
|
||||
@@ -1366,9 +1368,16 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
BossFrame.buttonSwitchNormal:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"))
|
||||
BossFrame.buttonSwitchNormal:SetWidth (BUTTON_WIDTH)
|
||||
|
||||
--phases
|
||||
BossFrame.buttonSwitchPhases = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Phases", "phases")
|
||||
BossFrame.buttonSwitchPhases:SetPoint ("left", BossFrame.buttonSwitchNormal, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchPhases:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {151/256, 176/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchPhases:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchPhases:SetWidth (BUTTON_WIDTH)
|
||||
|
||||
--chart
|
||||
BossFrame.buttonSwitchGraphic = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Charts", "graph")
|
||||
BossFrame.buttonSwitchGraphic:SetPoint ("left", BossFrame.buttonSwitchNormal, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchGraphic:SetPoint ("left", BossFrame.buttonSwitchPhases, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchGraphic:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {0.1271875, 0.21875, 0, 0.505625})
|
||||
BossFrame.buttonSwitchGraphic:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchGraphic:SetWidth (BUTTON_WIDTH)
|
||||
@@ -1386,14 +1395,6 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
BossFrame.buttonSwitchSpellsAuras:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {121/256, 146/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchSpellsAuras:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchSpellsAuras:SetWidth (BUTTON_WIDTH)
|
||||
|
||||
--phases
|
||||
BossFrame.buttonSwitchPhases = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Phases", "phases")
|
||||
BossFrame.buttonSwitchPhases:SetPoint ("left", BossFrame.buttonSwitchSpellsAuras, "right", HEADER_MENUBUTTONS_SPACEMENT, 0)
|
||||
BossFrame.buttonSwitchPhases:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {151/256, 176/256, 0, 0.505625})
|
||||
BossFrame.buttonSwitchPhases:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
BossFrame.buttonSwitchPhases:SetWidth (BUTTON_WIDTH)
|
||||
|
||||
|
||||
BossFrame.AllButtons = {BossFrame.buttonSwitchNormal, BossFrame.buttonSwitchGraphic, BossFrame.buttonSwitchBossEmotes, BossFrame.buttonSwitchSpellsAuras, BossFrame.buttonSwitchPhases}
|
||||
|
||||
@@ -2155,7 +2156,7 @@ PhaseFrame.CurrentSegment = {}
|
||||
PhaseFrame.PhaseButtons = {}
|
||||
EncounterDetailsPhaseFrame:Hide()
|
||||
|
||||
local ScrollWidth, ScrollHeight, ScrollLineAmount, ScrollLineHeight = 250, 410, 20, 20
|
||||
local ScrollWidth, ScrollHeight, ScrollLineAmount, ScrollLineHeight = 250, 420, 20, 20
|
||||
local PhasesY = -88
|
||||
local AnchorY = -120
|
||||
|
||||
@@ -2233,6 +2234,7 @@ function PhaseFrame.OnSelectPhase (phaseSelected)
|
||||
tinsert (PhaseFrame.DamageTable, {charName, amount})
|
||||
end
|
||||
table.sort (PhaseFrame.DamageTable, function(a, b) return a[2] > b[2] end)
|
||||
|
||||
table.wipe (PhaseFrame.HealingTable)
|
||||
for charName, amount in pairs (phaseData.heal [phaseSelected]) do
|
||||
tinsert (PhaseFrame.HealingTable, {charName, amount})
|
||||
@@ -2249,7 +2251,7 @@ end
|
||||
local PhaseSelectLabel = _detalhes.gump:CreateLabel (PhaseFrame, "Select Phase:", 12, "orange")
|
||||
local DamageLabel = _detalhes.gump:CreateLabel (PhaseFrame, "Damage Done")
|
||||
local HealLabel = _detalhes.gump:CreateLabel (PhaseFrame, "Healing Done")
|
||||
local PhaseTimersLabel = _detalhes.gump:CreateLabel (PhaseFrame, "Phase Timers")
|
||||
local PhaseTimersLabel = _detalhes.gump:CreateLabel (PhaseFrame, "Time Spent on Each Phase")
|
||||
|
||||
local report_damage = function (IsCurrent, IsReverse, AmtLines)
|
||||
local result = {}
|
||||
@@ -2314,8 +2316,11 @@ for i = 1, 10 do
|
||||
end
|
||||
|
||||
local ScrollRefresh = function (self, data, offset, total_lines)
|
||||
local ToK = _detalhes.ToKFunctions [_detalhes.ps_abbreviation]
|
||||
local RemoveRealm = _detalhes.GetOnlyName
|
||||
local formatToK = Details:GetCurrentToKFunction()
|
||||
local removeRealm = _detalhes.GetOnlyName
|
||||
|
||||
local topValue = data [1] and data [1][2]
|
||||
|
||||
for i = 1, ScrollLineAmount do
|
||||
local index = i + offset
|
||||
local player = data [index]
|
||||
@@ -2325,8 +2330,15 @@ local ScrollRefresh = function (self, data, offset, total_lines)
|
||||
|
||||
line.icon:SetTexture (texture)
|
||||
line.icon:SetTexCoord (L, R, T, B)
|
||||
line.name:SetText (RemoveRealm (_, player[1]))
|
||||
line.done:SetText (ToK (_, player[2]))
|
||||
line.name:SetText (index .. ". " .. removeRealm (_, player[1]))
|
||||
line.done:SetText (formatToK (_, player[2]) .. " (" .. format ("%.1f", player[2] / topValue * 100) .. "%)")
|
||||
line.statusbar:SetValue (player[2] / topValue * 100)
|
||||
local actorClass = Details:GetClass (player[1])
|
||||
if (actorClass) then
|
||||
line.statusbar:SetColor (actorClass)
|
||||
else
|
||||
line.statusbar:SetColor ("silver")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2339,7 +2351,6 @@ local line_onleave = function (self)
|
||||
self:SetBackdropColor (unpack (BGColorDefault))
|
||||
end
|
||||
|
||||
|
||||
local ScrollCreateLine = function (self, index)
|
||||
local line = CreateFrame ("button", "$parentLine" .. index, self)
|
||||
line:SetPoint ("topleft", self, "topleft", 0, -((index-1)*(ScrollLineHeight+1)))
|
||||
@@ -2350,20 +2361,30 @@ local ScrollCreateLine = function (self, index)
|
||||
|
||||
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor (unpack (BGColorDefault))
|
||||
|
||||
local statusBar = DetailsFrameWork:CreateBar (line, EncounterDetails.Frame.DefaultBarTexture, 1, 1, 100)
|
||||
statusBar:SetAllPoints (line)
|
||||
statusBar.backgroundtexture = EncounterDetails.Frame.DefaultBarTexture
|
||||
statusBar.backgroundcolor = {.3, .3, .3, .3}
|
||||
|
||||
local icon = line:CreateTexture ("$parentIcon", "overlay")
|
||||
local icon = statusBar:CreateTexture ("$parentIcon", "overlay")
|
||||
icon:SetSize (ScrollLineHeight, ScrollLineHeight)
|
||||
local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
|
||||
_detalhes.gump:SetFontSize (name, 9)
|
||||
|
||||
local name = statusBar:CreateFontString ("$parentName", "overlay", "GameFontNormal")
|
||||
_detalhes.gump:SetFontSize (name, 10)
|
||||
icon:SetPoint ("left", line, "left", 2, 0)
|
||||
name:SetPoint ("left", icon, "right", 2, 0)
|
||||
_detalhes.gump:SetFontColor (name, "white")
|
||||
local done = line:CreateFontString ("$parentDone", "overlay", "GameFontNormal")
|
||||
_detalhes.gump:SetFontSize (done, 9)
|
||||
|
||||
local done = statusBar:CreateFontString ("$parentDone", "overlay", "GameFontNormal")
|
||||
_detalhes.gump:SetFontSize (done, 10)
|
||||
_detalhes.gump:SetFontColor (done, "white")
|
||||
done:SetPoint ("right", line, "right", -2, 0)
|
||||
|
||||
line.icon = icon
|
||||
line.name = name
|
||||
line.done = done
|
||||
line.statusbar = statusBar
|
||||
name:SetHeight (10)
|
||||
name:SetJustifyH ("left")
|
||||
return line
|
||||
@@ -2410,10 +2431,11 @@ local PhaseBarOnClick = function (self)
|
||||
--report
|
||||
end
|
||||
|
||||
--cria as linhas mostrando o tempo decorride de cada phase
|
||||
for i = 1, 10 do
|
||||
local line = CreateFrame ("button", "$parentPhaseBar" .. i, PhaseFrame)
|
||||
line:SetPoint ("topleft", PhaseTimersLabel.widget, "bottomleft", 0, -((i-1)*(31)) - 4)
|
||||
line:SetSize (ScrollWidth, 30)
|
||||
line:SetSize (175, 30)
|
||||
line:SetScript ("OnEnter", PhaseBarOnEnter)
|
||||
line:SetScript ("OnLeave", PhaseBarOnLeave)
|
||||
line:SetScript ("OnClick", PhaseBarOnClick)
|
||||
@@ -2431,7 +2453,7 @@ for i = 1, 10 do
|
||||
|
||||
icon:SetPoint ("left", line, "left", 2, 0)
|
||||
name:SetPoint ("left", icon, "right", 2, 0)
|
||||
done:SetPoint ("right", line, "right", -2, 0)
|
||||
done:SetPoint ("right", line, "right", -3, 0)
|
||||
|
||||
line.icon = icon
|
||||
line.name = name
|
||||
@@ -2442,12 +2464,12 @@ for i = 1, 10 do
|
||||
tinsert (PhaseFrame.PhasesBars, line)
|
||||
end
|
||||
|
||||
--cria a linha do segmento para a compara ção, é o que fica na parte direita da tela
|
||||
--cria a linha do segmento para a comparação, é o que fica na parte direita da tela
|
||||
--ele é acessado para mostrar quando passar o mouse sobre uma das barras de phase
|
||||
for i = 1, 20 do
|
||||
local line = CreateFrame ("button", "$parentSegmentCompareBar" .. i, PhaseFrame)
|
||||
line:SetPoint ("topleft", PhaseTimersLabel.widget, "bottomleft", ScrollWidth+10, -((i-1)*(ScrollLineHeight+1)) - 4)
|
||||
line:SetSize (ScrollWidth, ScrollLineHeight)
|
||||
line:SetPoint ("topleft", PhaseTimersLabel.widget, "bottomleft", 175+10, -((i-1)*(ScrollLineHeight+1)) - 4)
|
||||
line:SetSize (150, ScrollLineHeight)
|
||||
|
||||
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor (unpack (BGColorDefault))
|
||||
@@ -2701,7 +2723,6 @@ end
|
||||
container_habilidades_frame.barras = {}
|
||||
|
||||
--label titulo % background
|
||||
|
||||
local habilidades_inimigas_bg = CreateFrame ("Frame", nil, frame)
|
||||
habilidades_inimigas_bg:SetWidth (BOX_WIDTH)
|
||||
habilidades_inimigas_bg:SetHeight (16)
|
||||
|
||||
Reference in New Issue
Block a user