- Added a macro section with useful macros.
- More polish done to the Encounter Details! window.
This commit is contained in:
@@ -487,6 +487,8 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
return
|
||||
end
|
||||
|
||||
frame.MyObject.background:Hide()
|
||||
|
||||
if (frame.MyObject.have_tooltip) then
|
||||
GameCooltip2:ShowMe (false)
|
||||
end
|
||||
|
||||
+1
-1
@@ -5606,7 +5606,7 @@ function DF:CreateLoadFilterParser (callback)
|
||||
DF.CurrentPlayerRole = assignedRole
|
||||
end
|
||||
|
||||
print ("Plater Script Update:", event, ...)
|
||||
--print ("Plater Script Update:", event, ...)
|
||||
|
||||
DF:QuickDispatch (callback, f.EncounterIDCached)
|
||||
end)
|
||||
|
||||
+15
-16
@@ -163,29 +163,28 @@
|
||||
return Loc ["STRING_UNKNOW"]
|
||||
end
|
||||
|
||||
DETAILS_SEGMENTID_OVERALL = -1
|
||||
DETAILS_SEGMENTID_CURRENT = 0
|
||||
--[[global]] DETAILS_SEGMENTID_OVERALL = -1
|
||||
--[[global]] DETAILS_SEGMENTID_CURRENT = 0
|
||||
|
||||
--enum segments type
|
||||
--[[global]] DETAILS_SEGMENTTYPE_GENERIC = 0
|
||||
|
||||
DETAILS_SEGMENTTYPE_GENERIC = 0
|
||||
--[[global]] DETAILS_SEGMENTTYPE_OVERALL = 1
|
||||
|
||||
DETAILS_SEGMENTTYPE_OVERALL = 1
|
||||
--[[global]] DETAILS_SEGMENTTYPE_DUNGEON_TRASH = 5
|
||||
--[[global]] DETAILS_SEGMENTTYPE_DUNGEON_BOSS = 6
|
||||
|
||||
DETAILS_SEGMENTTYPE_DUNGEON_TRASH = 5
|
||||
DETAILS_SEGMENTTYPE_DUNGEON_BOSS = 6
|
||||
--[[global]] DETAILS_SEGMENTTYPE_RAID_TRASH = 7
|
||||
--[[global]] DETAILS_SEGMENTTYPE_RAID_BOSS = 8
|
||||
|
||||
DETAILS_SEGMENTTYPE_RAID_TRASH = 7
|
||||
DETAILS_SEGMENTTYPE_RAID_BOSS = 8
|
||||
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_GENERIC = 10
|
||||
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASH = 11
|
||||
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL = 12
|
||||
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASHOVERALL = 13
|
||||
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_BOSS = 14
|
||||
|
||||
DETAILS_SEGMENTTYPE_MYTHICDUNGEON_GENERIC = 10
|
||||
DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASH = 11
|
||||
DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL = 12
|
||||
DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASHOVERALL = 13
|
||||
DETAILS_SEGMENTTYPE_MYTHICDUNGEON_BOSS = 14
|
||||
|
||||
DETAILS_SEGMENTTYPE_PVP_ARENA = 20
|
||||
DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND = 21
|
||||
--[[global]] DETAILS_SEGMENTTYPE_PVP_ARENA = 20
|
||||
--[[global]] DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND = 21
|
||||
|
||||
function combate:GetCombatType()
|
||||
--> mythic dungeon
|
||||
|
||||
@@ -1899,6 +1899,20 @@ function _detalhes:Resize (w, h)
|
||||
return true
|
||||
end
|
||||
|
||||
--/run Details:GetWindow(1):ToggleMaxSize()
|
||||
function _detalhes:ToggleMaxSize()
|
||||
if (self.is_in_max_size) then
|
||||
self.is_in_max_size = false
|
||||
self:SetSize (self.original_width, self.original_height)
|
||||
else
|
||||
local original_width, original_height = self:GetSize()
|
||||
self.original_width, self.original_height = original_width, original_height
|
||||
self.is_in_max_size = true
|
||||
self:SetSize (original_width, 450)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:PostponeSwitchToCurrent (instance)
|
||||
|
||||
+42
-13
@@ -86,6 +86,8 @@
|
||||
local raid_members_cache = setmetatable ({}, _detalhes.weaktable)
|
||||
--> tanks
|
||||
local tanks_members_cache = setmetatable ({}, _detalhes.weaktable)
|
||||
--> bitfield swap cache
|
||||
local bitfield_swap_cache = {}
|
||||
--> damage and heal last events
|
||||
local last_events_cache = {} --> initialize table (placeholder)
|
||||
--> pets
|
||||
@@ -164,6 +166,17 @@
|
||||
[280719] = 282449, --rogue Secret Technique
|
||||
}
|
||||
|
||||
local bitfield_debuffs_ids = _detalhes.BitfieldSwapDebuffsIDs
|
||||
local bitfield_debuffs = {}
|
||||
for _, spellid in ipairs (bitfield_debuffs_ids) do
|
||||
local spellname = GetSpellInfo (spellid)
|
||||
if (spellname) then
|
||||
bitfield_debuffs [spellname] = true
|
||||
else
|
||||
bitfield_debuffs [spellid] = true
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.OverridedSpellIds = override_spellId
|
||||
|
||||
--> ignore soul link (damage from the warlock on his pet - current to demonology only)
|
||||
@@ -659,18 +672,24 @@
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> firendly fire ~friendlyfire
|
||||
if (
|
||||
--removed deprecated friendly fire rules (25/09/2018)
|
||||
--general rules for friendly fire
|
||||
(
|
||||
(_bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (who_flags, REACTION_FRIENDLY) ~= 0) or
|
||||
(raid_members_cache [who_serial] and _bit_band (who_flags, OBJECT_TYPE_ENEMY) ~= 0 and _bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0)
|
||||
)
|
||||
) then
|
||||
|
||||
local is_friendly_fire = false
|
||||
if (bitfield_swap_cache [who_serial] or meu_dono and bitfield_swap_cache [meu_dono.serial]) then
|
||||
if (jogador_alvo.grupo or alvo_dono and alvo_dono.grupo) then
|
||||
is_friendly_fire = true
|
||||
end
|
||||
else
|
||||
if (bitfield_swap_cache [alvo_serial] or alvo_dono and bitfield_swap_cache [alvo_dono.serial]) then
|
||||
else
|
||||
if ((jogador_alvo.grupo or alvo_dono and alvo_dono.grupo) and (este_jogador.grupo or meu_dono and meu_dono.grupo)) then
|
||||
is_friendly_fire = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (is_friendly_fire) then
|
||||
if (este_jogador.grupo) then --> se tiver ele n�o adiciona o evento l� em cima
|
||||
local t = last_events_cache [alvo_name]
|
||||
|
||||
@@ -1770,6 +1789,10 @@
|
||||
if (cc_spell_list [spellid]) then
|
||||
parser:add_cc_done (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname)
|
||||
end
|
||||
|
||||
if (bitfield_debuffs [spellname] and raid_members_cache [alvo_serial]) then
|
||||
bitfield_swap_cache [alvo_serial] = true
|
||||
end
|
||||
|
||||
if (raid_members_cache [who_serial]) then
|
||||
--> call record debuffs uptime
|
||||
@@ -2014,7 +2037,7 @@
|
||||
parser:add_bad_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, "DEBUFF_UPTIME_REFRESH", amount)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (_recording_ability_with_buffs) then
|
||||
if (who_name == _detalhes.playername) then
|
||||
|
||||
@@ -2092,7 +2115,6 @@
|
||||
local damage_prevented = monk_guard_talent [who_serial] - (amount or 0)
|
||||
parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, damage_prevented, _math_ceil (amount or 0), 0, 0, true)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -2146,7 +2168,11 @@
|
||||
parser:add_bad_debuff_uptime (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, "DEBUFF_UPTIME_OUT")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (bitfield_debuffs [spellname] and alvo_serial) then
|
||||
bitfield_swap_cache [alvo_serial] = nil
|
||||
end
|
||||
|
||||
if (_recording_ability_with_buffs) then
|
||||
|
||||
if (who_name == _detalhes.playername) then
|
||||
@@ -4238,6 +4264,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes:CaptureSet (false, "spellcast", false, 10)
|
||||
end
|
||||
|
||||
_table_wipe (bitfield_swap_cache)
|
||||
|
||||
_detalhes:DispatchAutoRunCode ("on_leavecombat")
|
||||
end
|
||||
|
||||
@@ -4718,6 +4746,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
_table_wipe (raid_members_cache)
|
||||
_table_wipe (tanks_members_cache)
|
||||
_table_wipe (bitfield_swap_cache)
|
||||
|
||||
local roster = _detalhes.tabela_vigente.raid_roster
|
||||
|
||||
|
||||
+5
-4
@@ -562,10 +562,7 @@
|
||||
|
||||
--> show the plugin window
|
||||
if (pluginObject.RefreshWindow and callRefresh) then
|
||||
local okay, errortext = pcall (pluginObject.RefreshWindow)
|
||||
if (not okay) then
|
||||
f.DebugMsg (errortext)
|
||||
end
|
||||
DetailsFramework:QuickDispatch (pluginObject.RefreshWindow)
|
||||
end
|
||||
|
||||
--> highlight the plugin button on the menu
|
||||
@@ -708,6 +705,8 @@
|
||||
--]=]
|
||||
|
||||
function _detalhes:OpenPlugin (wildcard)
|
||||
local originalName = wildcard
|
||||
|
||||
if (type (wildcard) == "string") then
|
||||
|
||||
--> check if passed a plugin absolute name
|
||||
@@ -740,6 +739,8 @@
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
Details:Msg ("|cFFFF7700plugin not found|r:|cFFFFFF00", (originalName or wildcard), "|rcheck if it is enabled in the addons control panel.") --localize-me
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -3885,6 +3885,153 @@
|
||||
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- ~macros
|
||||
|
||||
function _detalhes:InitializeMacrosWindow()
|
||||
local DetailsMacrosPanel = gump:CreateSimplePanel (UIParent, 700, 480, "Details! Useful Macros", "DetailsMacrosPanel")
|
||||
DetailsMacrosPanel.Frame = DetailsMacrosPanel
|
||||
DetailsMacrosPanel.__name = "Macros"
|
||||
DetailsMacrosPanel.real_name = "DETAILS_MACROSWINDOW"
|
||||
DetailsMacrosPanel.__icon = [[Interface\MacroFrame\MacroFrame-Icon]]
|
||||
DetailsMacrosPanel.__iconcoords = {0, 1, 0, 1}
|
||||
DetailsMacrosPanel.__iconcolor = "white"
|
||||
DetailsPluginContainerWindow.EmbedPlugin (DetailsMacrosPanel, DetailsMacrosPanel, true)
|
||||
|
||||
function DetailsMacrosPanel.RefreshWindow()
|
||||
_detalhes.OpenMacrosWindow()
|
||||
end
|
||||
|
||||
DetailsMacrosPanel:Hide()
|
||||
end
|
||||
|
||||
function _detalhes.OpenMacrosWindow()
|
||||
|
||||
if (not DetailsMacrosPanel or not DetailsMacrosPanel.Initialized) then
|
||||
local DF = DetailsFramework
|
||||
|
||||
DetailsMacrosPanel.Initialized = true
|
||||
local f = DetailsMacrosPanel or gump:CreateSimplePanel (UIParent, 700, 480, "Details! Useful Macros", "DetailsMacrosPanel")
|
||||
|
||||
local scrollbox_line_backdrop_color = {0, 0, 0, 0.2}
|
||||
local scrollbox_line_backdrop_color_onenter = {.3, .3, .3, 0.5}
|
||||
local scrollbox_lines = 7
|
||||
local scrollbox_line_height = 79.5
|
||||
local scrollbox_size = {890, 563}
|
||||
|
||||
f.bg1 = f:CreateTexture (nil, "background")
|
||||
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1:SetAlpha (0.8)
|
||||
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
f.bg1:SetVertTile (true)
|
||||
f.bg1:SetHorizTile (true)
|
||||
f.bg1:SetSize (790, 454)
|
||||
f.bg1:SetAllPoints()
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (.5, .5, .5, .7)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
local macrosAvailable = _detalhes.MacroList
|
||||
|
||||
local OnEnterMacroButton = function (self)
|
||||
self:SetBackdropColor (unpack (scrollbox_line_backdrop_color_onenter))
|
||||
end
|
||||
|
||||
local onLeaveMacroButton = function (self)
|
||||
self:SetBackdropColor (unpack (scrollbox_line_backdrop_color))
|
||||
end
|
||||
|
||||
local updateMacroLine = function (self, index, title, desc, macroText)
|
||||
self.Title:SetText (title)
|
||||
self.Desc:SetText (desc)
|
||||
self.MacroTextEntry:SetText (macroText)
|
||||
end
|
||||
|
||||
local textEntryOnFocusGained = function (self)
|
||||
self:HighlightText()
|
||||
end
|
||||
|
||||
local textEntryOnFocusLost = function (self)
|
||||
self:HighlightText (0, 0)
|
||||
end
|
||||
|
||||
local refreshMacroScrollbox = function (self, data, offset, totalLines)
|
||||
for i = 1, totalLines do
|
||||
local index = i + offset
|
||||
local macro = macrosAvailable [index]
|
||||
if (macro) then
|
||||
local line = self:GetLine (i)
|
||||
line:UpdateLine (index, macro.Name, macro.Desc, macro.MacroText)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local macroListCreateLine = function (self, index)
|
||||
--create a new line
|
||||
local line = CreateFrame ("button", "$parentLine" .. index, self)
|
||||
|
||||
--set its parameters
|
||||
line:SetPoint ("topleft", self, "topleft", 0, -((index-1) * (scrollbox_line_height+1)))
|
||||
line:SetSize (scrollbox_size[1], scrollbox_line_height)
|
||||
line:SetScript ("OnEnter", OnEnterMacroButton)
|
||||
line:SetScript ("OnLeave", onLeaveMacroButton)
|
||||
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
line:SetBackdropColor (unpack (scrollbox_line_backdrop_color))
|
||||
line:SetBackdropBorderColor (0, 0, 0, 0.3)
|
||||
|
||||
local titleLabel = DF:CreateLabel (line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
titleLabel.textsize = 14
|
||||
titleLabel.textcolor = "yellow"
|
||||
local descLabel = DF:CreateLabel (line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
descLabel.textsize = 12
|
||||
|
||||
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
options_dropdown_template = DF.table.copy ({}, options_dropdown_template)
|
||||
options_dropdown_template.backdropcolor = {.51, .51, .51, .3}
|
||||
options_dropdown_template.onenterbordercolor = {.51, .51, .51, .2}
|
||||
|
||||
local textEntry = DF:CreateTextEntry (line, function()end, scrollbox_size[1] - 10, 40, "MacroTextEntry", _, _, options_dropdown_template)
|
||||
textEntry:SetHook ("OnEditFocusGained", textEntryOnFocusGained)
|
||||
textEntry:SetHook ("OnEditFocusLost", textEntryOnFocusLost)
|
||||
textEntry:SetJustifyH ("left")
|
||||
textEntry:SetTextInsets (8, 8, 0, 0)
|
||||
|
||||
titleLabel:SetPoint ("topleft", line, "topleft", 5, -5)
|
||||
descLabel:SetPoint ("topleft", titleLabel, "bottomleft", 0, -2)
|
||||
textEntry:SetPoint ("topleft", descLabel, "bottomleft", 0, -4)
|
||||
|
||||
line.Title = titleLabel
|
||||
line.Desc = descLabel
|
||||
line.MacroTextEntry = textEntry
|
||||
|
||||
line.UpdateLine = updateMacroLine
|
||||
line:Hide()
|
||||
|
||||
return line
|
||||
end
|
||||
|
||||
local macroScrollbox = DF:CreateScrollBox (f, "$parentMacroScrollbox", refreshMacroScrollbox, macrosAvailable, scrollbox_size[1], scrollbox_size[2], scrollbox_lines, scrollbox_line_height)
|
||||
macroScrollbox:SetPoint ("topleft", f, "topleft", 5, -30)
|
||||
macroScrollbox:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
macroScrollbox:SetBackdropColor (0, 0, 0, 0)
|
||||
macroScrollbox:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f.MacroScrollbox = macroScrollbox
|
||||
DF:ReskinSlider (macroScrollbox)
|
||||
|
||||
macroScrollbox.__background:Hide()
|
||||
|
||||
--create the scrollbox lines
|
||||
for i = 1, scrollbox_lines do
|
||||
macroScrollbox:CreateLine (macroListCreateLine)
|
||||
end
|
||||
end
|
||||
|
||||
DetailsPluginContainerWindow.OpenPlugin (DetailsMacrosPanel)
|
||||
DetailsMacrosPanel.MacroScrollbox:Refresh()
|
||||
DetailsMacrosPanel:Show()
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- ~plater
|
||||
|
||||
|
||||
@@ -2532,6 +2532,8 @@
|
||||
DetailsAuraPanel.IconSizeSlider:SetValue (DetailsAuraPanel.other_values.text_size)
|
||||
end
|
||||
|
||||
spellname = spellname or ""
|
||||
|
||||
DetailsAuraPanel.name.text = spellname .. " (d!)"
|
||||
DetailsAuraPanel.spellname.text = spellname
|
||||
DetailsAuraPanel.AuraSpellId.text = tostring (spellid)
|
||||
|
||||
@@ -21,6 +21,13 @@ local is_exception = {
|
||||
function _detalhes:SaveLocalInstanceConfig()
|
||||
|
||||
for index, instance in _detalhes:ListInstances() do
|
||||
--> check for the max size toggle, don't save it
|
||||
if (instance.is_in_max_size) then
|
||||
instance.is_in_max_size = false
|
||||
instance:SetSize (instance.original_width, instance.original_height)
|
||||
end
|
||||
|
||||
--> save local instance data
|
||||
local a1, a2 = instance:GetDisplay()
|
||||
|
||||
local t = {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -90,6 +90,7 @@ function _G._detalhes:Start()
|
||||
self:InitializeAPIWindow()
|
||||
self:InitializeRunCodeWindow()
|
||||
self:InitializePlaterIntegrationWindow()
|
||||
self:InitializeMacrosWindow()
|
||||
|
||||
--> bookmarks
|
||||
if (self.switch.InitSwitch) then
|
||||
|
||||
Reference in New Issue
Block a user