Details! v4.0
This commit is contained in:
+141
-7
@@ -401,8 +401,8 @@
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instance.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
local r, g, b = unpack (instance.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, g, b)
|
||||
|
||||
row1.icone_classe:SetTexture (instance.total_bar.icon)
|
||||
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
|
||||
@@ -437,8 +437,8 @@
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instance.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
local r, g, b = unpack (instance.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, g, b)
|
||||
|
||||
row1.icone_classe:SetTexture (instance.total_bar.icon)
|
||||
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
|
||||
@@ -1540,7 +1540,7 @@
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--doas
|
||||
local CC_Done = {
|
||||
name = "Crowd Control",
|
||||
name = Loc ["STRING_CUSTOM_CC_DONE"],
|
||||
icon = [[Interface\ICONS\Spell_Frost_FreezingBreath]],
|
||||
attribute = false,
|
||||
spellid = false,
|
||||
@@ -1620,7 +1620,7 @@
|
||||
|
||||
local have = false
|
||||
for _, custom in ipairs (self.custom) do
|
||||
if (custom.name == "Crowd Control" and (custom.script_version and custom.script_version >= CC_Done.script_version) ) then
|
||||
if (custom.name == Loc ["STRING_CUSTOM_CC_DONE"] and (custom.script_version and custom.script_version >= CC_Done.script_version) ) then
|
||||
have = true
|
||||
break
|
||||
end
|
||||
@@ -1630,7 +1630,7 @@
|
||||
CC_Done.__index = _detalhes.atributo_custom
|
||||
|
||||
for i, custom in ipairs (self.custom) do
|
||||
if (custom.name == "Crowd Control") then
|
||||
if (custom.name == Loc ["STRING_CUSTOM_CC_DONE"]) then
|
||||
table.remove (self.custom, i)
|
||||
tinsert (self.custom, i, CC_Done)
|
||||
have = true
|
||||
@@ -1643,6 +1643,140 @@
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local CC_Received = {
|
||||
name = Loc ["STRING_CUSTOM_CC_RECEIVED"],
|
||||
icon = [[Interface\ICONS\Spell_Mage_IceNova]],
|
||||
attribute = false,
|
||||
spellid = false,
|
||||
author = "Details!",
|
||||
desc = "Show the amount of crowd control received for each player.",
|
||||
source = false,
|
||||
target = false,
|
||||
script_version = 1,
|
||||
script = [[
|
||||
local combat, instance_container, instance = ...
|
||||
local total, top, amt = 0, 0, 0
|
||||
|
||||
local misc_actors = combat:GetActorList (DETAILS_ATTRIBUTE_MISC)
|
||||
DETAILS_CUSTOM_CC_RECEIVED_CACHE = DETAILS_CUSTOM_CC_RECEIVED_CACHE or {}
|
||||
wipe (DETAILS_CUSTOM_CC_RECEIVED_CACHE)
|
||||
|
||||
for index, character in ipairs (misc_actors) do
|
||||
if (character.cc_done and character:IsPlayer()) then
|
||||
|
||||
for player_name, amount in pairs (character.cc_done_targets) do
|
||||
local target = combat (1, player_name) or combat (2, player_name)
|
||||
if (target and target:IsPlayer()) then
|
||||
instance_container:AddValue (target, amount)
|
||||
total = total + amount
|
||||
if (amount > top) then
|
||||
top = amount
|
||||
end
|
||||
if (not DETAILS_CUSTOM_CC_RECEIVED_CACHE [player_name]) then
|
||||
DETAILS_CUSTOM_CC_RECEIVED_CACHE [player_name] = true
|
||||
amt = amt + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
return total, top, amt
|
||||
]],
|
||||
tooltip = [[
|
||||
local actor, combat, instance = ...
|
||||
local name = actor:name()
|
||||
local spells, from = {}, {}
|
||||
local misc_actors = combat:GetActorList (DETAILS_ATTRIBUTE_MISC)
|
||||
|
||||
for index, character in ipairs (misc_actors) do
|
||||
if (character.cc_done and character:IsPlayer()) then
|
||||
local on_actor = character.cc_done_targets [name]
|
||||
if (on_actor) then
|
||||
tinsert (from, {character:name(), on_actor})
|
||||
|
||||
for spellid, spell in pairs (character.cc_done_spells._ActorTable) do
|
||||
|
||||
local spell_on_actor = spell.targets [name]
|
||||
if (spell_on_actor) then
|
||||
local has_spell
|
||||
for index, spell_table in ipairs (spells) do
|
||||
if (spell_table [1] == spellid) then
|
||||
spell_table [2] = spell_table [2] + spell_on_actor
|
||||
has_spell = true
|
||||
end
|
||||
end
|
||||
if (not has_spell) then
|
||||
tinsert (spells, {spellid, spell_on_actor})
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
table.sort (from, _detalhes.Sort2)
|
||||
table.sort (spells, _detalhes.Sort2)
|
||||
|
||||
for index, spell in ipairs (spells) do
|
||||
local name, _, icon = GetSpellInfo (spell [1])
|
||||
GameCooltip:AddLine (name, spell [2])
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
|
||||
end
|
||||
|
||||
_detalhes:AddTooltipSpellHeaderText ("From", "yellow", #from)
|
||||
_detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.6)
|
||||
|
||||
for index, t in ipairs (from) do
|
||||
GameCooltip:AddLine (t[1], t[2])
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
|
||||
local class, _, _, _, _, r, g, b = _detalhes:GetClass (t [1])
|
||||
if (class and class ~= "UNKNOW") then
|
||||
local texture, l, r, t, b = _detalhes:GetClassIcon (class)
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small_alpha", 1, 1, 14, 14, l, r, t, b)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\GossipFrame\\IncompleteQuestIcon", 1, 1, 14, 14)
|
||||
end
|
||||
|
||||
end
|
||||
]],
|
||||
total_script = [[
|
||||
local value, top, total, combat, instance = ...
|
||||
return floor (value)
|
||||
]],
|
||||
}
|
||||
|
||||
-- /run _detalhes:AddDefaultCustomDisplays()
|
||||
|
||||
local have = false
|
||||
for _, custom in ipairs (self.custom) do
|
||||
if (custom.name == Loc ["STRING_CUSTOM_CC_RECEIVED"] and (custom.script_version and custom.script_version >= CC_Received.script_version) ) then
|
||||
have = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if (not have) then
|
||||
setmetatable (CC_Received, _detalhes.atributo_custom)
|
||||
CC_Received.__index = _detalhes.atributo_custom
|
||||
|
||||
for i, custom in ipairs (self.custom) do
|
||||
if (custom.name == Loc ["STRING_CUSTOM_CC_RECEIVED"]) then
|
||||
table.remove (self.custom, i)
|
||||
tinsert (self.custom, i, CC_Received)
|
||||
have = true
|
||||
end
|
||||
end
|
||||
if (not have) then
|
||||
self.custom [#self.custom+1] = CC_Received
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local MySpells = {
|
||||
name = Loc ["STRING_CUSTOM_MYSPELLS"],
|
||||
icon = [[Interface\ICONS\ABILITY_MAGE_ARCANEBARRAGE]],
|
||||
|
||||
+14
-14
@@ -2120,8 +2120,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
local r, g, b = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, g, b)
|
||||
|
||||
row1.icone_classe:SetTexture (instancia.total_bar.icon)
|
||||
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
|
||||
@@ -2184,8 +2184,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
local r, g, b = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, g, b)
|
||||
|
||||
row1.icone_classe:SetTexture (instancia.total_bar.icon)
|
||||
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
|
||||
@@ -2603,9 +2603,9 @@ end
|
||||
if (enemy) then
|
||||
if (arena_enemy) then
|
||||
if (UsingCustomLeftText) then
|
||||
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instance.showing))
|
||||
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t ", self, instance.showing))
|
||||
else
|
||||
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
|
||||
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t " .. self.displayName)
|
||||
end
|
||||
else
|
||||
if (_detalhes.faction_against == "Horde") then
|
||||
@@ -2625,9 +2625,9 @@ end
|
||||
else
|
||||
if (arena_ally) then
|
||||
if (UsingCustomLeftText) then
|
||||
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instance.showing))
|
||||
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t ", self, instance.showing))
|
||||
else
|
||||
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
|
||||
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t " .. self.displayName)
|
||||
end
|
||||
else
|
||||
if (UsingCustomLeftText) then
|
||||
@@ -2641,27 +2641,27 @@ end
|
||||
set_text_size (bar, instance)
|
||||
end
|
||||
|
||||
--[[ exported]] function _detalhes:SetBarColors (bar, instance, r, b, g, a)
|
||||
--[[ exported]] function _detalhes:SetBarColors (bar, instance, r, g, b, a)
|
||||
|
||||
a = a or 1
|
||||
|
||||
if (instance.row_info.texture_class_colors) then
|
||||
if (instance.bars_inverted) then
|
||||
bar.right_to_left_texture:SetVertexColor (r, b, g, a)
|
||||
bar.right_to_left_texture:SetVertexColor (r, g, b, a)
|
||||
else
|
||||
bar.textura:SetVertexColor (r, b, g, a)
|
||||
bar.textura:SetVertexColor (r, g, b, a)
|
||||
end
|
||||
end
|
||||
|
||||
if (instance.row_info.texture_background_class_color) then
|
||||
bar.background:SetVertexColor (r, b, g, a)
|
||||
bar.background:SetVertexColor (r, g, b, a)
|
||||
end
|
||||
|
||||
if (instance.row_info.textL_class_colors) then
|
||||
bar.texto_esquerdo:SetTextColor (r, b, g, a)
|
||||
bar.texto_esquerdo:SetTextColor (r, g, b, a)
|
||||
end
|
||||
if (instance.row_info.textR_class_colors) then
|
||||
bar.texto_direita:SetTextColor (r, b, g, a)
|
||||
bar.texto_direita:SetTextColor (r, g, b, a)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -468,8 +468,8 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
local r, g, b = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, g, b)
|
||||
|
||||
row1.icone_classe:SetTexture (instancia.total_bar.icon)
|
||||
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
|
||||
@@ -524,8 +524,8 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
local r, g, b = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, g, b)
|
||||
|
||||
row1.icone_classe:SetTexture (instancia.total_bar.icon)
|
||||
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
|
||||
|
||||
@@ -414,8 +414,8 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
local r, g, b = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, g, b)
|
||||
|
||||
row1.icone_classe:SetTexture (instancia.total_bar.icon)
|
||||
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
|
||||
@@ -478,8 +478,8 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
local r, g, b = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, g, b)
|
||||
|
||||
row1.icone_classe:SetTexture (instancia.total_bar.icon)
|
||||
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
|
||||
|
||||
@@ -2537,9 +2537,6 @@ function _detalhes:MontaAtributosOption (instancia, func)
|
||||
return menu_principal, sub_menus
|
||||
end
|
||||
|
||||
--> O Modo não vai afetar a tabela do SHOWING.
|
||||
-- o modo é apenas afetado na hora de mostrar o que na tabela
|
||||
|
||||
function _detalhes:ChangeIcon (icon)
|
||||
|
||||
local skin = _detalhes.skins [self.skin]
|
||||
|
||||
@@ -519,8 +519,8 @@ function atributo_misc:DeadAtualizarBarra (morte, qual_barra, colocacao, instanc
|
||||
end
|
||||
|
||||
local r, g, b, a = _unpack (_detalhes.class_colors [morte[4]])
|
||||
_detalhes:SetBarColors (esta_barra, instancia, r, b, g, a)
|
||||
|
||||
esta_barra.textura:SetVertexColor (r, g, b, 1)
|
||||
|
||||
if (instancia.row_info.use_spec_icons) then
|
||||
local nome = morte[3]
|
||||
local spec = instancia.showing (1, nome) and instancia.showing (1, nome).spec or (instancia.showing (2, nome) and instancia.showing (2, nome).spec)
|
||||
|
||||
+16
-2
@@ -994,7 +994,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
local myrole = UnitGroupRolesAssigned ("player")
|
||||
local mybest, onencounter = _detalhes.storage:GetBestFromPlayer (diff, encounter_id, myrole, _detalhes.playername)
|
||||
|
||||
print (myrole, mybest and mybest[1], mybest and mybest[2], mybest and mybest[3], onencounter and onencounter.date)
|
||||
--print (myrole, mybest and mybest[1], mybest and mybest[2], mybest and mybest[3], onencounter and onencounter.date)
|
||||
|
||||
if (mybest) then
|
||||
local d_one = 0
|
||||
@@ -1005,12 +1005,26 @@ function _detalhes:StoreEncounter (combat)
|
||||
end
|
||||
|
||||
if (mybest[1] > d_one) then
|
||||
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_NOTBEST"], _detalhes:comma_value (d_one), mybest[1], onencounter.date, mybest[2]))
|
||||
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_NOTBEST"], _detalhes:comma_value (d_one), _detalhes:comma_value (mybest[1]), onencounter.date, mybest[2]))
|
||||
else
|
||||
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_BEST"], _detalhes:comma_value (d_one)))
|
||||
end
|
||||
end
|
||||
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower_instance) then
|
||||
local instance = _detalhes:GetInstance (lower_instance)
|
||||
if (instance) then
|
||||
local my_role = UnitGroupRolesAssigned ("player")
|
||||
if (my_role == "TANK") then
|
||||
my_role = "DAMAGER"
|
||||
end
|
||||
local raid_name = GetInstanceInfo()
|
||||
local func = {_detalhes.OpenRaidHistoryWindow, _detalhes, raid_name, encounter_id, diff, my_role, guildName, 2, UnitName ("player")}
|
||||
local icon = {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}
|
||||
instance:InstanceAlert ("Boss Defeated, Open History! ", icon, 40, func)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+54
-7
@@ -1,8 +1,4 @@
|
||||
--File Revision: 1
|
||||
--Last Modification: 27/07/2013
|
||||
-- Change Log:
|
||||
-- 27/07/2013: Finished alpha version.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
@@ -35,6 +31,55 @@
|
||||
_detalhes.SoloTables.Attribute = SoloInstance.atributo
|
||||
end
|
||||
|
||||
function _detalhes:CreateSoloCloseButton()
|
||||
|
||||
local plugin, frame = self, self.Frame
|
||||
local button = CreateFrame ("Button", nil, frame, "UIPanelCloseButton")
|
||||
|
||||
button:SetScript ("OnClick", function()
|
||||
if (not button.close_confirmation) then
|
||||
button.close_confirmation = gump:CreateSimplePanel (button, 296, 60, "", plugin.real_name .. "CloseConfirmation")
|
||||
button.close_confirmation:SetPoint ("center", frame, 0, 0)
|
||||
_G [button.close_confirmation:GetName() .. "TitleBar"]:Hide()
|
||||
local fade_background = button.close_confirmation:CreateTexture (nil, "background")
|
||||
fade_background:SetPoint ("topleft", frame, 0, 0)
|
||||
fade_background:SetPoint ("bottomright", frame, 0, 0)
|
||||
fade_background:SetTexture (0, 0, 0, 0.7)
|
||||
|
||||
local close_func = function()
|
||||
local instance = plugin:GetPluginInstance()
|
||||
instance:ShutDown()
|
||||
button.close_confirmation:Hide()
|
||||
end
|
||||
local group_func = function()
|
||||
local instance = plugin:GetPluginInstance()
|
||||
instance:AlteraModo (instance, DETAILS_MODE_GROUP)
|
||||
button.close_confirmation:Hide()
|
||||
|
||||
instance.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instance.baseframe.cabecalho.modo_selecao)
|
||||
end
|
||||
|
||||
local close_window = gump:NewButton (button.close_confirmation, _, "$parentCloseWindowButton", "CloseWindowButton", 140, 20, close_func, nil, nil, nil, Loc ["STRING_MENU_CLOSE_INSTANCE"], 1, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
local back_to_group_and_raid = gump:NewButton (button.close_confirmation, _, "$parentBackToGroupButton", "BackToGroupButton", 140, 20, group_func, nil, nil, nil, Loc ["STRING_SWITCH_TO"] .. ": " .. Loc ["STRING_MODE_GROUP"], 2, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
close_window:SetIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], nil, nil, nil, {0.143125, 0.8653125, 0.1446875, 0.8653125}, nil, nil, 2)
|
||||
back_to_group_and_raid:SetIcon ([[Interface\AddOns\Details\images\modo_icones]], nil, nil, nil, {32/256, 32/256*2, 0, 1}, nil, nil, 2)
|
||||
|
||||
close_window:SetPoint ("topleft", 3, -4)
|
||||
close_window:SetPoint ("bottomright", -3, 31)
|
||||
back_to_group_and_raid:SetPoint ("topleft", 3, -31)
|
||||
back_to_group_and_raid:SetPoint ("bottomright", -3, 4)
|
||||
end
|
||||
|
||||
button.close_confirmation:Show()
|
||||
end)
|
||||
|
||||
button:SetWidth (20)
|
||||
button:SetHeight (20)
|
||||
--button:GetNormalTexture():SetDesaturated (true)
|
||||
return button
|
||||
end
|
||||
|
||||
--> enable and disable Solo Mode for an Instance
|
||||
function _detalhes:SoloMode (show)
|
||||
if (show) then
|
||||
@@ -153,7 +198,6 @@
|
||||
instance:SoloMode (true)
|
||||
|
||||
_detalhes.SoloTables:switch (nil, plugin_name)
|
||||
|
||||
end
|
||||
|
||||
--> Build Solo Mode Tables and Functions
|
||||
@@ -212,11 +256,14 @@
|
||||
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:Show()
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:SetPoint ("TOPLEFT",_detalhes.SoloTables.instancia.bgframe)
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:SetFrameLevel (20)
|
||||
|
||||
_detalhes.SoloTables.instancia:ChangeIcon (_detalhes.SoloTables.Menu [_detalhes.SoloTables.Mode] [2])
|
||||
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, _detalhes.SoloTables.instancia, _detalhes.SoloTables.instancia.atributo, _detalhes.SoloTables.instancia.sub_atributo)
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].instance_id = _detalhes.SoloTables.instancia:GetId()
|
||||
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, _detalhes.SoloTables.instancia, _detalhes.SoloTables.instancia.atributo, _detalhes.SoloTables.instancia.sub_atributo)
|
||||
|
||||
end
|
||||
|
||||
return true
|
||||
|
||||
+44
-8
@@ -1055,7 +1055,7 @@
|
||||
end
|
||||
|
||||
--> raid history window ~history
|
||||
function _detalhes:OpenRaidHistoryWindow()
|
||||
function _detalhes:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild, _player_base, _player_name)
|
||||
|
||||
if (not _G.DetailsRaidHistoryWindow) then
|
||||
|
||||
@@ -1396,18 +1396,20 @@
|
||||
|
||||
if (not index) then
|
||||
player = {playerName}
|
||||
for i = 2, encounterIndex-1 do
|
||||
for i = 1, amt_encounters-1 do
|
||||
tinsert (player, "")
|
||||
end
|
||||
tinsert (player, _detalhes:ToK2 (playerTable [1]))
|
||||
tinsert (player, _detalhes:ToK2 (playerTable [1] / encounter.elapsed))
|
||||
tinsert (players, player)
|
||||
players_index [playerName] = #players
|
||||
|
||||
--print ("not index", playerName, amt_encounters, date, 2, amt_encounters-1)
|
||||
else
|
||||
player = players [index]
|
||||
for i = #player+1, encounterIndex-1 do
|
||||
for i = #player+1, amt_encounters-1 do
|
||||
tinsert (player, "")
|
||||
end
|
||||
tinsert (player, _detalhes:ToK2 (playerTable [1]))
|
||||
tinsert (player, _detalhes:ToK2 (playerTable [1] / encounter.elapsed))
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1422,7 +1424,7 @@
|
||||
|
||||
--_detalhes:DumpTable (players, true)
|
||||
|
||||
table.sort (players, sort_alphabetical)
|
||||
--table.sort (players, sort_alphabetical)
|
||||
|
||||
fillpanel:SetFillFunction (function (index) return players [index] end)
|
||||
fillpanel:SetTotalFunction (function() return #players end)
|
||||
@@ -1433,7 +1435,7 @@
|
||||
|
||||
end
|
||||
|
||||
function f:Refresh()
|
||||
function f:Refresh (player_name)
|
||||
--> build the main table
|
||||
local diff = diff_dropdown.value
|
||||
local boss = boss_dropdown.value
|
||||
@@ -1465,7 +1467,11 @@
|
||||
player2_dropdown:Show()
|
||||
f.build_player2_data = {encounters, guild, role}
|
||||
player2_dropdown:Refresh()
|
||||
player2_dropdown:Select (1, true)
|
||||
if (player_name) then
|
||||
player2_dropdown:Select (player_name)
|
||||
else
|
||||
player2_dropdown:Select (1, true)
|
||||
end
|
||||
f:BuildPlayerTable (player2_dropdown.value)
|
||||
end
|
||||
else
|
||||
@@ -1499,6 +1505,36 @@
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
_G.DetailsRaidHistoryWindow:Show()
|
||||
|
||||
if (_raid) then
|
||||
DetailsRaidHistoryWindow.select_raid:Select (_raid)
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
end
|
||||
if (_boss) then
|
||||
DetailsRaidHistoryWindow.select_boss:Select (_boss)
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
end
|
||||
if (_difficulty) then
|
||||
DetailsRaidHistoryWindow.select_diff:Select (_difficulty)
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
end
|
||||
if (_role) then
|
||||
DetailsRaidHistoryWindow.select_role:Select (_role)
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
end
|
||||
if (_guild) then
|
||||
DetailsRaidHistoryWindow.select_guild:Select (_guild)
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
end
|
||||
if (_player_base) then
|
||||
DetailsRaidHistoryWindow.select_player:Select (_player_base)
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
end
|
||||
if (_player_name) then
|
||||
DetailsRaidHistoryWindow.select_player2:Refresh()
|
||||
DetailsRaidHistoryWindow.select_player2:Select (_player_name)
|
||||
_G.DetailsRaidHistoryWindow:Refresh (_player_name)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--> feedback window
|
||||
|
||||
+518
-218
@@ -23,9 +23,120 @@
|
||||
--[[global]] DETAILS_WA_TRIGGER_BW_TIMER = 10
|
||||
|
||||
--[[global]] DETAILS_WA_TRIGGER_INTERRUPT = 11
|
||||
--[[global]] DETAILS_WA_TRIGGER_DISPELL = 12
|
||||
|
||||
--weak auras
|
||||
|
||||
local text_dispell_prototype = {
|
||||
["outline"] = true,
|
||||
["fontSize"] = 24,
|
||||
["color"] = {1, 1, 1, 1},
|
||||
["displayText"] = "%c\n",
|
||||
["customText"] = "function()\n return aura_env.text\nend \n\n",
|
||||
["untrigger"] = {
|
||||
["custom"] = "function()\n return not InCombatLockdown()\nend",
|
||||
},
|
||||
["regionType"] = "text",
|
||||
["customTextUpdate"] = "event",
|
||||
["actions"] = {
|
||||
["start"] = {
|
||||
["do_custom"] = false,
|
||||
["custom"] = "",
|
||||
},
|
||||
["init"] = {
|
||||
["do_custom"] = true,
|
||||
["custom"] = "aura_env.text = \"\"\naura_env.success = 0\naura_env.dispelled = 0\naura_env.dispels_by = {}",
|
||||
},
|
||||
["finish"] = {
|
||||
},
|
||||
},
|
||||
["anchorPoint"] = "CENTER",
|
||||
["additional_triggers"] = {
|
||||
},
|
||||
["trigger"] = {
|
||||
["spellId"] = "",
|
||||
["message_operator"] = "==",
|
||||
["unit"] = "player",
|
||||
["debuffType"] = "HELPFUL",
|
||||
["custom_hide"] = "custom",
|
||||
["spellName"] = "",
|
||||
["type"] = "custom",
|
||||
["subeventSuffix"] = "_CAST_SUCCESS",
|
||||
["custom_type"] = "event",
|
||||
["unevent"] = "timed",
|
||||
["use_addon"] = false,
|
||||
["event"] = "Health",
|
||||
["events"] = "COMBAT_LOG_EVENT_UNFILTERED, ENCOUNTER_START",
|
||||
["use_spellName"] = false,
|
||||
["use_spellId"] = false,
|
||||
["custom"] = "function (event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n if (event == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if ((token == \"SPELL_DISPEL\" or token == \"SPELL_STOLEN\") and extraSpellID == 159947) then\n aura_env.dispelled = aura_env.dispelled + 1\n aura_env.dispels_by [who_name] = (aura_env.dispels_by [who_name] or 0) + 1\n \n aura_env.text = aura_env.text .. \"|cffd2e8ff\" .. who_name .. \" (\" .. aura_env.dispels_by [who_name] .. \") \".. \"|r\\n\"\n \n if (select (2, aura_env.text:gsub (\"\\n\", \"\")) == 9) then\n aura_env.text = aura_env.text:gsub (\".-\\n\", \"\", 1)\n end\n return true\n end \n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.dispelled = 0\n wipe (aura_env.dispels_by)\n return true \n end\nend",
|
||||
["spellIds"] = {
|
||||
},
|
||||
["use_message"] = true,
|
||||
["subeventPrefix"] = "SPELL",
|
||||
["use_unit"] = true,
|
||||
["names"] = {
|
||||
},
|
||||
},
|
||||
["justify"] = "LEFT",
|
||||
["selfPoint"] = "BOTTOM",
|
||||
["disjunctive"] = true,
|
||||
["frameStrata"] = 1,
|
||||
["width"] = 1.46286010742188,
|
||||
["animation"] = {
|
||||
["start"] = {
|
||||
["type"] = "none",
|
||||
["duration_type"] = "seconds",
|
||||
},
|
||||
["main"] = {
|
||||
["type"] = "none",
|
||||
["duration_type"] = "seconds",
|
||||
},
|
||||
["finish"] = {
|
||||
["type"] = "none",
|
||||
["duration_type"] = "seconds",
|
||||
},
|
||||
},
|
||||
["font"] = "Friz Quadrata TT",
|
||||
["numTriggers"] = 1,
|
||||
["xOffset"] = -403.999786376953,
|
||||
["height"] = 47.3586845397949,
|
||||
["displayIcon"] = "Interface\\Icons\\inv_misc_steelweaponchain",
|
||||
["load"] = {
|
||||
["talent"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["encounterid"] = "1721",
|
||||
["use_encounterid"] = true,
|
||||
["difficulty"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["role"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["class"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["race"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["spec"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["size"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
},
|
||||
["yOffset"] = 174.820495605469,
|
||||
}
|
||||
|
||||
local text_interrupt_prototype = {
|
||||
["outline"] = true,
|
||||
["fontSize"] = 12,
|
||||
@@ -294,11 +405,11 @@
|
||||
}
|
||||
|
||||
local bar_dbm_timerbar_prototype = {
|
||||
["sparkWidth"] = 10,
|
||||
["sparkWidth"] = 17,
|
||||
["stacksSize"] = 12,
|
||||
["xOffset"] = 0,
|
||||
["xOffset"] = -278.999633789063,
|
||||
["stacksFlags"] = "None",
|
||||
["yOffset"] = 239.568542480469,
|
||||
["yOffset"] = 182.37451171875,
|
||||
["anchorPoint"] = "CENTER",
|
||||
["borderColor"] = {1, 1, 1, 0.5},
|
||||
["rotateText"] = "NONE",
|
||||
@@ -306,9 +417,13 @@
|
||||
["fontFlags"] = "OUTLINE",
|
||||
["icon_color"] = {1, 1, 1, 1},
|
||||
["selfPoint"] = "CENTER",
|
||||
["barColor"] = {1, 0, 0, 1},
|
||||
["barColor"] = {
|
||||
0.996078431372549,
|
||||
1,
|
||||
0.976470588235294,
|
||||
1,
|
||||
},
|
||||
["desaturate"] = false,
|
||||
["progressPrecision"] = 1,
|
||||
["sparkOffsetY"] = 0,
|
||||
["load"] = {
|
||||
["difficulty"] = {
|
||||
@@ -346,13 +461,13 @@
|
||||
["texture"] = "Blizzard",
|
||||
["textFont"] = "Friz Quadrata TT",
|
||||
["zoom"] = 0,
|
||||
["spark"] = false,
|
||||
["spark"] = true,
|
||||
["timerFont"] = "Friz Quadrata TT",
|
||||
["alpha"] = 1,
|
||||
["borderInset"] = 11,
|
||||
["displayIcon"] = "Interface\\Icons\\Spell_Shadow_MindTwisting",
|
||||
["textColor"] = {1, 1, 1, 1},
|
||||
["borderBackdrop"] = "Blizzard Tooltip",
|
||||
["customText"] = "function (expire, duration)\n return format (\"%.1f\", duration)\nend \n\n",
|
||||
["barInFront"] = true,
|
||||
["sparkRotationMode"] = "AUTO",
|
||||
["displayTextLeft"] = "%n",
|
||||
@@ -371,19 +486,19 @@
|
||||
},
|
||||
},
|
||||
["trigger"] = {
|
||||
["type"] = "custom",
|
||||
["custom_hide"] = "timed",
|
||||
["type"] = "status",
|
||||
["use_id"] = true,
|
||||
["subeventSuffix"] = "_CAST_START",
|
||||
["custom_type"] = "status",
|
||||
["custom"] = "function()\n if (InCombatLockdown() and aura_env.trigger_at and aura_env.trigger_at <= GetTime() and aura_env.untrigger_at and aura_env.untrigger_at >= GetTime()) then\n return true\n else\n return false\n end\nend\n",
|
||||
["event"] = "Health",
|
||||
["id"] = "",
|
||||
["remaining_operator"] = "<=",
|
||||
["event"] = "DBM Timer",
|
||||
["unit"] = "player",
|
||||
["customDuration"] = "function()\n if (aura_env.trigger_at and aura_env.trigger_at <= GetTime() and aura_env.untrigger_at and aura_env.untrigger_at >= GetTime()) then\n return aura_env.untrigger_at - GetTime(), aura_env.countdown_at, true\n else\n return 0\n end\nend\n",
|
||||
["customName"] = "function()\n return aura_env.ability_text\nend",
|
||||
["use_remaining"] = true,
|
||||
["remaining"] = "6",
|
||||
["spellIds"] = {
|
||||
},
|
||||
["customIcon"] = "function()\n return aura_env.ability_icon \nend\n",
|
||||
["check"] = "update",
|
||||
["use_unit"] = true,
|
||||
["unevent"] = "auto",
|
||||
["subeventPrefix"] = "SPELL",
|
||||
["names"] = {
|
||||
},
|
||||
@@ -391,23 +506,24 @@
|
||||
},
|
||||
["text"] = true,
|
||||
["stickyDuration"] = false,
|
||||
["height"] = 40.115104675293,
|
||||
["height"] = 34.4247055053711,
|
||||
["timerFlags"] = "None",
|
||||
["sparkBlendMode"] = "ADD",
|
||||
["backdropColor"] = {1, 1, 1, 0.5},
|
||||
["untrigger"] = {
|
||||
["custom"] = "function()\n return true\nend",
|
||||
},
|
||||
["actions"] = {
|
||||
["start"] = {
|
||||
["do_custom"] = true,
|
||||
["custom"] = "aura_env.untrigger_at = GetTime() + aura_env.remaining_trigger",
|
||||
},
|
||||
["finish"] = {
|
||||
},
|
||||
["init"] = {
|
||||
["do_custom"] = true,
|
||||
["custom"] = "\n\n",
|
||||
["custom"] = "",
|
||||
},
|
||||
},
|
||||
["untrigger"] = {
|
||||
},
|
||||
["textFlags"] = "None",
|
||||
["border"] = false,
|
||||
["borderEdge"] = "None",
|
||||
@@ -415,68 +531,99 @@
|
||||
["borderSize"] = 16,
|
||||
["stacksFont"] = "Friz Quadrata TT",
|
||||
["icon_side"] = "LEFT",
|
||||
["inverse"] = false,
|
||||
["textSize"] = 14,
|
||||
["timer"] = true,
|
||||
["sparkHeight"] = 30,
|
||||
["sparkHeight"] = 55,
|
||||
["sparkRotation"] = 0,
|
||||
["displayTextRight"] = "%c",
|
||||
["customTextUpdate"] = "update",
|
||||
["stacksColor"] = {1, 1, 1, 1},
|
||||
["timerSize"] = 16,
|
||||
["displayTextRight"] = "%p",
|
||||
["icon"] = true,
|
||||
["textSize"] = 16,
|
||||
["inverse"] = false,
|
||||
["frameStrata"] = 1,
|
||||
["width"] = 370,
|
||||
["customTextUpdate"] = "event",
|
||||
["width"] = 371.000183105469,
|
||||
["sparkColor"] = {1, 1, 1, 1},
|
||||
["timerSize"] = 14,
|
||||
["numTriggers"] = 1,
|
||||
["sparkDesature"] = false,
|
||||
["orientation"] = "HORIZONTAL",
|
||||
["borderOffset"] = 5,
|
||||
["auto"] = true,
|
||||
["sparkTexture"] = "Interface\\CastingBar\\UI-CastingBar-Spark",
|
||||
["auto"] = false,
|
||||
["sparkTexture"] = "Interface\\CastingBar\\UI-CastingBar-Spark",
|
||||
}
|
||||
|
||||
local icon_dbm_timerbar_prototype = {
|
||||
["xOffset"] = -391.000030517578,
|
||||
["customText"] = "function (expire, duration)\n return \"\" .. aura_env.ability_text\nend \n\n",
|
||||
["yOffset"] = 300,
|
||||
["anchorPoint"] = "CENTER",
|
||||
["customTextUpdate"] = "event",
|
||||
["cooldown"] = true,
|
||||
["fontSize"] = 14,
|
||||
["displayStacks"] = "Proxima Abilidate Em:",
|
||||
["actions"] = {
|
||||
["start"] = {
|
||||
["do_custom"] = true,
|
||||
["custom"] = "aura_env.untrigger_at = GetTime() + aura_env.remaining_trigger",
|
||||
},
|
||||
["finish"] = {
|
||||
},
|
||||
["init"] = {
|
||||
["do_custom"] = true,
|
||||
["custom"] = "",
|
||||
},
|
||||
},
|
||||
["color"] = {1, 1, 1, 1},
|
||||
["width"] = 100,
|
||||
["untrigger"] = {
|
||||
},
|
||||
["yOffset"] = 230.935302734375,
|
||||
["anchorPoint"] = "CENTER",
|
||||
["animation"] = {
|
||||
["start"] = {
|
||||
["duration_type"] = "seconds",
|
||||
["type"] = "none",
|
||||
},
|
||||
["main"] = {
|
||||
["duration_type"] = "seconds",
|
||||
["type"] = "none",
|
||||
},
|
||||
["finish"] = {
|
||||
["duration_type"] = "seconds",
|
||||
["type"] = "none",
|
||||
},
|
||||
},
|
||||
["regionType"] = "icon",
|
||||
["stacksPoint"] = "BOTTOM",
|
||||
["customTextUpdate"] = "update",
|
||||
["icon"] = true,
|
||||
["fontFlags"] = "OUTLINE",
|
||||
["stacksContainment"] = "OUTSIDE",
|
||||
["zoom"] = 0,
|
||||
["auto"] = true,
|
||||
["selfPoint"] = "CENTER",
|
||||
["trigger"] = {
|
||||
["unevent"] = "auto",
|
||||
["type"] = "custom",
|
||||
["subeventPrefix"] = "SPELL",
|
||||
["custom_type"] = "status",
|
||||
["use_unit"] = true,
|
||||
["type"] = "status",
|
||||
["use_id"] = true,
|
||||
["subeventSuffix"] = "_CAST_START",
|
||||
["id"] = "",
|
||||
["remaining_operator"] = "<=",
|
||||
["event"] = "DBM Timer",
|
||||
["unit"] = "player",
|
||||
["use_remaining"] = true,
|
||||
["remaining"] = "6",
|
||||
["spellIds"] = {
|
||||
},
|
||||
["event"] = "Health",
|
||||
["unit"] = "player",
|
||||
["customDuration"] = "function()\n if (aura_env.trigger_at and aura_env.trigger_at <= GetTime() and aura_env.untrigger_at and aura_env.untrigger_at >= GetTime()) then\n return aura_env.untrigger_at - GetTime(), aura_env.countdown_at\n else\n return 0\n end\nend\n",
|
||||
["customName"] = "function()\n return aura_env.ability_name \nend\n",
|
||||
["custom"] = "function()\n if (InCombatLockdown() and aura_env.trigger_at and aura_env.trigger_at <= GetTime() and aura_env.untrigger_at and aura_env.untrigger_at >= GetTime()) then\n return true\n else\n return false\n end\nend\n",
|
||||
["customIcon"] = "function()\n return aura_env.ability_icon \nend\n",
|
||||
["check"] = "update",
|
||||
["use_unit"] = true,
|
||||
["unevent"] = "auto",
|
||||
["subeventPrefix"] = "SPELL",
|
||||
["names"] = {
|
||||
},
|
||||
["subeventSuffix"] = "_CAST_START",
|
||||
["debuffType"] = "HELPFUL",
|
||||
},
|
||||
["stickyDuration"] = false,
|
||||
["frameStrata"] = 1,
|
||||
["desaturate"] = false,
|
||||
["xOffset"] = -486.999969482422,
|
||||
["font"] = "Friz Quadrata TT",
|
||||
["height"] = 194.575485229492,
|
||||
["numTriggers"] = 1,
|
||||
["inverse"] = true,
|
||||
["height"] = 100,
|
||||
["load"] = {
|
||||
["difficulty"] = {
|
||||
["multi"] = {
|
||||
@@ -486,6 +633,7 @@
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["use_encounterid"] = true,
|
||||
["talent"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
@@ -507,86 +655,59 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
["fontSize"] = 20,
|
||||
["displayStacks"] = "%c ",
|
||||
["regionType"] = "icon",
|
||||
["stacksContainment"] = "OUTSIDE",
|
||||
["zoom"] = 0,
|
||||
["auto"] = true,
|
||||
["stacksPoint"] = "BOTTOM",
|
||||
["color"] = {1, 1, 1, 1},
|
||||
["frameStrata"] = 1,
|
||||
["width"] = 186.000091552734,
|
||||
["stickyDuration"] = false,
|
||||
["untrigger"] = {
|
||||
["custom"] = "function()\n return true\nend",
|
||||
},
|
||||
["inverse"] = false,
|
||||
["numTriggers"] = 1,
|
||||
["animation"] = {
|
||||
["start"] = {
|
||||
["type"] = "none",
|
||||
["duration_type"] = "seconds",
|
||||
},
|
||||
["main"] = {
|
||||
["type"] = "none",
|
||||
["duration_type"] = "seconds",
|
||||
},
|
||||
["finish"] = {
|
||||
["type"] = "none",
|
||||
["duration_type"] = "seconds",
|
||||
},
|
||||
},
|
||||
["icon"] = true,
|
||||
["cooldown"] = true,
|
||||
["textColor"] = {1, 1, 1, 1},
|
||||
["displayIcon"] = "",
|
||||
}
|
||||
|
||||
|
||||
local text_dbm_timerbar_prototype = {
|
||||
["outline"] = true,
|
||||
["fontSize"] = 72,
|
||||
["color"] = {1, 1, 1, 1},
|
||||
["displayText"] = "%c",
|
||||
["customText"] = "function()\n local at = aura_env.untrigger_at\n if (at) then\n return \"\" .. aura_env.ability_text .. \"\\n==> \" .. format (\"%.1f\", at - GetTime()) .. \" <==\"\n else\n return \"\"\n end \n \nend",
|
||||
["untrigger"] = {
|
||||
["custom"] = "function()\n return true\nend",
|
||||
},
|
||||
["regionType"] = "text",
|
||||
["fontSize"] = 60,
|
||||
["color"] = {0.8, 1, 0.8, 1},
|
||||
["displayText"] = "%c\n",
|
||||
["customText"] = "function()\n local at = aura_env.untrigger_at\n if (at) then\n return \"\" .. aura_env.ability_text .. \"\\n==> \" .. format (\"%.1f\", at - GetTime()) .. \" <==\"\n else\n return \"\"\n end \n \nend\n",
|
||||
["yOffset"] = 157.554321289063,
|
||||
["anchorPoint"] = "CENTER",
|
||||
["customTextUpdate"] = "update",
|
||||
["init_completed"] = 1,
|
||||
["actions"] = {
|
||||
["start"] = {
|
||||
["do_custom"] = true,
|
||||
["custom"] = "aura_env.untrigger_at = GetTime() + aura_env.remaining_trigger",
|
||||
},
|
||||
["finish"] = {
|
||||
},
|
||||
["init"] = {
|
||||
["do_custom"] = true,
|
||||
["custom"] = "aura_env.countdown_at = 4\naura_env.ability_name = \"Test Bar\"\naura_env.ability_icon = \"Interface\\\\ICONS\\\\Ability_Mage_FireStarter\"\naura_env.ability_text = \"** Next TEST BAR In **\"\naura_env.aura_global_name = \"Test Bar\"\n\nlocal details_aura_env = _G.DetailsAuraEnv\nlocal details_aura_func_cache = _G.DetailsAuraFuncCache\nif (not details_aura_env) then\n details_aura_env = {}\n _G.DetailsAuraEnv = details_aura_env\nend\nif (not details_aura_func_cache) then\n details_aura_func_cache = {}\n _G.DetailsAuraFuncCache = details_aura_func_cache\nend\n\ndetails_aura_env [aura_env.aura_global_name] = aura_env\n\naura_env.Calllback_func = function (event, timer_id, message, duration)\n if (timer_id:find (\"Test Bar\")) then\n duration = duration:gsub (DBM_CORE_SEC, \"\")\n duration = tonumber (duration)\n local aura_env = details_aura_env [\"Test Bar\"]\n aura_env.trigger_at = GetTime() + duration - aura_env.countdown_at\n aura_env.untrigger_at = GetTime() + duration\n end\nend\n\nlocal previous_func = details_aura_func_cache [aura_env.aura_global_name]\nif (previous_func and DBM:IsCallbackRegistered (\"DBM_TimerStart\", previous_func)) then\n DBM:UnregisterCallback (\"DBM_TimerStart\", previous_func)\nend\n\ndetails_aura_func_cache [aura_env.aura_global_name] = aura_env.Calllback_func\nDBM:RegisterCallback (\"DBM_TimerStart\", aura_env.Calllback_func)",
|
||||
["custom"] = "",
|
||||
},
|
||||
},
|
||||
["justify"] = "CENTER",
|
||||
["selfPoint"] = "CENTER",
|
||||
["selfPoint"] = "BOTTOM",
|
||||
["trigger"] = {
|
||||
["type"] = "custom",
|
||||
["remaining_operator"] = "<=",
|
||||
["message_operator"] = "find('%s')",
|
||||
["names"] = {},
|
||||
["remaining"] = "6",
|
||||
["debuffType"] = "HELPFUL",
|
||||
["use_id"] = true,
|
||||
["subeventSuffix"] = "_CAST_START",
|
||||
["custom_type"] = "status",
|
||||
["id"] = "Timer186333cd asd",
|
||||
["use_remaining"] = true,
|
||||
["event"] = "DBM Timer",
|
||||
["unevent"] = "auto",
|
||||
["message"] = "",
|
||||
["use_spellId"] = false,
|
||||
["spellIds"] = {
|
||||
},
|
||||
["event"] = "Health",
|
||||
["type"] = "status",
|
||||
["use_message"] = false,
|
||||
["unit"] = "player",
|
||||
["customDuration"] = "",
|
||||
["customName"] = "",
|
||||
["custom"] = "function()\n if (InCombatLockdown() and aura_env.trigger_at and aura_env.trigger_at <= GetTime() and aura_env.untrigger_at and aura_env.untrigger_at >= GetTime()) then\n return true\n else\n return false\n end\nend\n",
|
||||
["customIcon"] = "",
|
||||
["check"] = "update",
|
||||
["use_unit"] = true,
|
||||
["subeventPrefix"] = "SPELL",
|
||||
["names"] = {
|
||||
},
|
||||
["debuffType"] = "HELPFUL",
|
||||
},
|
||||
["yOffset"] = 251.43896484375,
|
||||
["untrigger"] = {
|
||||
},
|
||||
["frameStrata"] = 1,
|
||||
["width"] = 43.6800079345703,
|
||||
["width"] = 3.2914137840271,
|
||||
["animation"] = {
|
||||
["start"] = {
|
||||
["duration_type"] = "seconds",
|
||||
@@ -603,22 +724,21 @@
|
||||
},
|
||||
["font"] = "Friz Quadrata TT",
|
||||
["numTriggers"] = 1,
|
||||
["xOffset"] = 0.999847412109,
|
||||
["height"] = 71.9999771118164,
|
||||
["xOffset"] = -18.0000610351563,
|
||||
["height"] = 114.000053405762,
|
||||
["load"] = {
|
||||
["use_never"] = false,
|
||||
["talent"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["class"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["difficulty"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["race"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["talent"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["role"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
@@ -627,7 +747,7 @@
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
["race"] = {
|
||||
["class"] = {
|
||||
["multi"] = {
|
||||
},
|
||||
},
|
||||
@@ -636,7 +756,7 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
["anchorPoint"] = "CENTER",
|
||||
["regionType"] = "text",
|
||||
}
|
||||
|
||||
local text_prototype = {
|
||||
@@ -1113,7 +1233,46 @@
|
||||
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@spell_casted", icon_text)
|
||||
|
||||
--> size
|
||||
new_aura.fontSize = max (icon_size, 24)
|
||||
new_aura.fontSize = min (icon_size, 24)
|
||||
|
||||
elseif (target == 42) then -- dispell
|
||||
|
||||
chat = nil
|
||||
sound = nil
|
||||
icon_glow = nil
|
||||
group = nil
|
||||
|
||||
new_aura = _detalhes.table.copy ({}, text_dispell_prototype)
|
||||
|
||||
new_aura.trigger.custom = [[
|
||||
function (event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
|
||||
if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
|
||||
if ((token == "SPELL_DISPEL" or token == "SPELL_STOLEN") and extraSpellID == @spellid) then
|
||||
aura_env.dispelled = aura_env.dispelled + 1
|
||||
aura_env.dispels_by [who_name] = (aura_env.dispels_by [who_name] or 0) + 1
|
||||
aura_env.text = aura_env.text .. "|cffd2e8ff" .. who_name .. " (" .. aura_env.dispels_by [who_name] .. ") ".. "|r\n"
|
||||
|
||||
if (select (2, aura_env.text:gsub ("\n", "")) == 11) then
|
||||
aura_env.text = aura_env.text:gsub (".-\n", "", 2)
|
||||
aura_env.text = "@title\n" .. aura_env.text
|
||||
end
|
||||
return true
|
||||
end
|
||||
else
|
||||
aura_env.text = "@title\n"
|
||||
aura_env.success = 0
|
||||
aura_env.dispelled = 0
|
||||
wipe (aura_env.dispels_by)
|
||||
return true
|
||||
end
|
||||
end
|
||||
]]
|
||||
|
||||
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@spellid", spellid)
|
||||
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@title", icon_text)
|
||||
|
||||
--> size
|
||||
new_aura.fontSize = min (icon_size, 24)
|
||||
|
||||
elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then
|
||||
if (aura_type == "icon") then
|
||||
@@ -1124,106 +1283,59 @@
|
||||
new_aura = _detalhes.table.copy ({}, text_dbm_timerbar_prototype)
|
||||
end
|
||||
|
||||
new_aura.actions.init.custom = [[
|
||||
aura_env.dbm_timer_id = @dbm_timer_id
|
||||
aura_env.dbm_timer_id_str = "@dbm_timer_id"
|
||||
aura_env.bw_timer_id = "@bw_timer_id"
|
||||
|
||||
aura_env.countdown_at = @countdown
|
||||
aura_env.ability_name = "@name"
|
||||
aura_env.ability_icon = [=[@icon]=]
|
||||
aura_env.ability_text = "@text"
|
||||
aura_env.aura_global_name = "@gname"
|
||||
|
||||
local details_aura_env = _G.DetailsAuraEnv
|
||||
local details_aura_func_cache = _G.DetailsAuraFuncCache
|
||||
|
||||
if (not details_aura_env) then
|
||||
details_aura_env = {}
|
||||
_G.DetailsAuraEnv = details_aura_env
|
||||
end
|
||||
if (not details_aura_func_cache) then
|
||||
details_aura_func_cache = {}
|
||||
_G.DetailsAuraFuncCache = details_aura_func_cache
|
||||
end
|
||||
|
||||
if (BigWigs) then
|
||||
local old_aura_env = details_aura_env [aura_env.aura_global_name]
|
||||
if (old_aura_env and old_aura_env.UnregisterMessage) then
|
||||
old_aura_env:UnregisterMessage ("BigWigs_StartBar")
|
||||
end
|
||||
end
|
||||
if (_G.DBM) then
|
||||
local previous_func = details_aura_func_cache [aura_env.aura_global_name]
|
||||
if (previous_func and DBM:IsCallbackRegistered ("DBM_TimerStart", previous_func)) then
|
||||
DBM:UnregisterCallback ("DBM_TimerStart", previous_func)
|
||||
end
|
||||
end
|
||||
|
||||
details_aura_env [aura_env.aura_global_name] = aura_env
|
||||
|
||||
if (_G.DBM) then
|
||||
aura_env.Calllback_func = function (bar_type, id, msg, timer, icon, _, spellId, colorId, modid)
|
||||
local aura_env = DetailsAuraEnv ["@gname"]
|
||||
if ((type (id) == "string" and id:find (aura_env.dbm_timer_id)) or spellId == aura_env.dbm_timer_id or spellId == aura_env.dbm_timer_id_str) then
|
||||
local duration = timer
|
||||
aura_env.trigger_at = GetTime() + duration - aura_env.countdown_at
|
||||
aura_env.untrigger_at = GetTime() + duration
|
||||
end
|
||||
end
|
||||
details_aura_func_cache [aura_env.aura_global_name] = aura_env.Calllback_func
|
||||
DBM:RegisterCallback ("DBM_TimerStart", aura_env.Calllback_func)
|
||||
end
|
||||
if (BigWigs) then
|
||||
function aura_env:BigWigs_StartBar (event, module, spellid, bar_text, time, icon, ...)
|
||||
local aura_env = DetailsAuraEnv ["@gname"]
|
||||
if (tostring (spellid) == aura_env.bw_timer_id) then
|
||||
local duration = time
|
||||
aura_env.trigger_at = GetTime() + duration - aura_env.countdown_at
|
||||
aura_env.untrigger_at = GetTime() + duration
|
||||
end
|
||||
end
|
||||
BigWigs.RegisterMessage (aura_env, "BigWigs_StartBar")
|
||||
end
|
||||
]]
|
||||
|
||||
local c = new_aura.actions.init.custom
|
||||
|
||||
if (other_values.dbm_timer_id) then
|
||||
local dbm_tid = other_values.dbm_timer_id
|
||||
c = c:gsub ("@dbm_timer_id_str", dbm_tid)
|
||||
c = c:gsub ("@gname", "DetailsAura_" .. dbm_tid)
|
||||
dbm_tid = dbm_tid:gsub ("ej", "")
|
||||
c = c:gsub ("@dbm_timer_id", tonumber (dbm_tid))
|
||||
c = c:gsub ("@bw_timer_id", "Timer ID Not Set")
|
||||
|
||||
elseif (other_values.bw_timer_id) then
|
||||
local bw_tid = other_values.bw_timer_id
|
||||
c = c:gsub ("@bw_timer_id", bw_tid)
|
||||
c = c:gsub ("@dbm_timer_id", "Timer ID Not Set")
|
||||
c = c:gsub ("@gname", "DetailsAura_" .. bw_tid)
|
||||
end
|
||||
|
||||
if (aura_type == "aurabar") then
|
||||
icon_text = icon_text:gsub ("= ", "")
|
||||
icon_text = icon_text:gsub (" =", "")
|
||||
icon_text = icon_text:gsub ("=", "")
|
||||
new_aura.displayTextLeft = icon_text
|
||||
new_aura.displayIcon = icon_texture
|
||||
|
||||
elseif (aura_type == "icon") then
|
||||
new_aura.displayStacks = icon_text
|
||||
new_aura.displayIcon = icon_texture
|
||||
|
||||
end
|
||||
|
||||
c = c:gsub ("@text", icon_text)
|
||||
c = c:gsub ("@icon", icon_texture)
|
||||
c = c:gsub ("@name", spellname)
|
||||
c = c:gsub ("@countdown", floor (stacksize))
|
||||
local init_start = [[
|
||||
aura_env.ability_text = "@text"
|
||||
aura_env.remaining_trigger = @countdown
|
||||
]]
|
||||
|
||||
init_start = init_start:gsub ("@text", icon_text)
|
||||
init_start = init_start:gsub ("@countdown", floor (stacksize))
|
||||
new_aura.trigger.remaining = tostring (floor (stacksize))
|
||||
|
||||
new_aura.actions.init.custom = c
|
||||
new_aura.actions.init.custom = init_start
|
||||
|
||||
if (other_values.dbm_timer_id) then
|
||||
new_aura.trigger.event = "DBM Timer"
|
||||
local timerId = tostring (other_values.dbm_timer_id)
|
||||
if (timerId:find ("%s")) then
|
||||
new_aura.trigger.id = ""
|
||||
new_aura.trigger.use_id = false
|
||||
new_aura.trigger.spellId_operator = "=="
|
||||
new_aura.trigger.use_spellId = true
|
||||
new_aura.trigger.spellId = tostring (other_values.spellid)
|
||||
else
|
||||
new_aura.trigger.id = timerId
|
||||
end
|
||||
|
||||
elseif (other_values.bw_timer_id) then
|
||||
new_aura.trigger.id = ""
|
||||
new_aura.trigger.use_id = false
|
||||
new_aura.trigger.spellId_operator = "=="
|
||||
new_aura.trigger.use_spellId = true
|
||||
new_aura.trigger.spellId = tostring (other_values.bw_timer_id)
|
||||
new_aura.trigger.event = "BigWigs Timer"
|
||||
end
|
||||
|
||||
--> size
|
||||
if (aura_type == "icon") then
|
||||
new_aura.width = icon_size
|
||||
new_aura.height = icon_size
|
||||
elseif (aura_type == "aurabar") then
|
||||
new_aura.width = min (icon_size, 370)
|
||||
new_aura.height = 40
|
||||
new_aura.width = max (icon_size, 370)
|
||||
new_aura.height = 38
|
||||
elseif (aura_type == "text") then
|
||||
new_aura.fontSize = min (icon_size, 72)
|
||||
end
|
||||
@@ -1448,7 +1560,7 @@
|
||||
|
||||
local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent, "ButtonFrameTemplate")
|
||||
f:SetSize (600, 488)
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
f:SetPoint ("center", UIParent, "center", 0, 150)
|
||||
f:SetFrameStrata ("HIGH")
|
||||
f:SetToplevel (true)
|
||||
f:SetMovable (true)
|
||||
@@ -1559,6 +1671,7 @@
|
||||
{label = "BigWigs Time Bar", value = 32, icon = aura_on_icon, onclick = on_select_aura_trigger},
|
||||
|
||||
{label = "Spell Interrupt", value = 41, icon = aura_on_icon, onclick = on_select_aura_trigger},
|
||||
{label = "Spell Dispell", value = 42, icon = aura_on_icon, onclick = on_select_aura_trigger},
|
||||
}
|
||||
local aura_on_options = function()
|
||||
return aura_on_table
|
||||
@@ -1875,7 +1988,7 @@
|
||||
f.SpellName:Disable()
|
||||
f.UseSpellId:Disable()
|
||||
|
||||
elseif (trigger == 41) then --interrupt
|
||||
elseif (trigger == 41 or trigger == 42) then --interrupt or dispel
|
||||
f.StackSlider:Disable()
|
||||
f.SpellName:Disable()
|
||||
f.UseSpellId:Disable()
|
||||
@@ -1886,8 +1999,13 @@
|
||||
f.UseGlow:Disable()
|
||||
icon_size_label:SetText ("Text Size: ")
|
||||
f.IconSizeSlider:SetValue (11)
|
||||
f.AuraText:SetText ("=Not Interrupted!=")
|
||||
aura_text_label.text = "Not Interrupted: "
|
||||
if (trigger == 41) then
|
||||
f.AuraText:SetText ("=Not Interrupted!=")
|
||||
aura_text_label.text = "Not Interrupted: "
|
||||
elseif (trigger == 42) then
|
||||
f.AuraText:SetText (DetailsAuraPanel.name.text:gsub ("%(d!%)", "") .. "Dispells")
|
||||
aura_text_label.text = "Title Text: "
|
||||
end
|
||||
end
|
||||
|
||||
if (DetailsAuraPanel.other_values and DetailsAuraPanel.other_values.text) then
|
||||
@@ -2194,7 +2312,7 @@
|
||||
end
|
||||
|
||||
local all_players_module = {
|
||||
name = "All Players",
|
||||
name = "Players",
|
||||
desc = "Show a list of all player actors",
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeAllPlayersFilterPanel) then
|
||||
@@ -2257,7 +2375,7 @@
|
||||
|
||||
-----------------------------------------------
|
||||
local all_pets_module = {
|
||||
name = "All Pets",
|
||||
name = "Pets",
|
||||
desc = "Show a list of all pet actors",
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeAllPetsFilterPanel) then
|
||||
@@ -2341,7 +2459,7 @@
|
||||
-----------------------------------------------
|
||||
|
||||
local all_enemies_module = {
|
||||
name = "All Enemies",
|
||||
name = "Enemies",
|
||||
desc = "Show a list of all enemies actors",
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeAllEnemiesFilterPanel) then
|
||||
@@ -2405,10 +2523,17 @@
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
local spell_open_aura_creator = function (row)
|
||||
local data = all_modules [4].data [row]
|
||||
local spellid = data[1].id
|
||||
local spellname, _, spellicon = GetSpellInfo (spellid)
|
||||
_detalhes:OpenAuraPanel (spellid, spellname, spellicon, data[3])
|
||||
end
|
||||
|
||||
local EncounterSpellEvents = EncounterDetailsDB and EncounterDetailsDB.encounter_spells
|
||||
|
||||
local all_spells_module = {
|
||||
name = "All Spells",
|
||||
name = "Spells",
|
||||
desc = "Show a list of all spells used",
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeAllSpellsFilterPanel) then
|
||||
@@ -2463,7 +2588,11 @@
|
||||
end
|
||||
if (can_add and not spell_already_added [spellid]) then
|
||||
spell_already_added [spellid] = true
|
||||
tinsert (t, {spell, actor})
|
||||
local encounter_id
|
||||
if (actor:IsNeutralOrEnemy()) then
|
||||
encounter_id = combat.is_boss and combat.is_boss.id
|
||||
end
|
||||
tinsert (t, {spell, actor, encounter_id})
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2476,8 +2605,9 @@
|
||||
{name = "Name", width = 150, type = "entry", func = no_func},
|
||||
{name = "SpellID", width = 60, type = "entry", func = no_func},
|
||||
{name = "School", width = 60, type = "entry", func = no_func},
|
||||
{name = "Caster", width = 100, type = "entry", func = no_func},
|
||||
{name = "Event", width = 300, type = "entry", func = no_func},
|
||||
{name = "Caster", width = 80, type = "entry", func = no_func},
|
||||
{name = "Event", width = 260, type = "entry", func = no_func},
|
||||
{name = "Create Aura", width = 40, type = "button", func = spell_open_aura_creator, icon = [[Interface\Buttons\UI-CheckBox-Check-Disabled]], notext = true, iconalign = "center"},
|
||||
},
|
||||
fill_panel = false,
|
||||
fill_gettotal = function (self) return #self.module.data end,
|
||||
@@ -2510,6 +2640,176 @@
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
local dbm_open_aura_creator = function (row)
|
||||
local data = all_modules [5].data [row]
|
||||
|
||||
local spellname, spellicon, _
|
||||
if (type (data [7]) == "number") then
|
||||
spellname, _, spellicon = GetSpellInfo (data [7])
|
||||
else
|
||||
if (data [7]) then
|
||||
local spellid = data[7]:gsub ("ej", "")
|
||||
spellid = tonumber (spellid)
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (spellid)
|
||||
spellname, spellicon = title, abilityIcon
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:OpenAuraPanel (data[2], spellname, spellicon, data.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = data[2], text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
end
|
||||
|
||||
local dbm_timers_module = {
|
||||
name = "DBM Timers",
|
||||
desc = "Show a list of Dbm timers",
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeDBMBarsFilterPanel) then
|
||||
local w = CreateFrame ("frame", "DetailsForgeDBMBarsFilterPanel", f)
|
||||
w:SetSize (600, 20)
|
||||
w:SetPoint ("topleft", f, "topleft", 120, -40)
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText ("Bar Text: ")
|
||||
label:SetPoint ("left", w, "left", 5, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeDBMBarsTextFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
end
|
||||
return DetailsForgeDBMBarsFilterPanel
|
||||
end,
|
||||
search = function()
|
||||
local t = {}
|
||||
local filter = DetailsForgeDBMBarsTextFilter:GetText()
|
||||
local source = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"] and _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"].encounter_timers_dbm or {}
|
||||
for key, timer in pairs (source) do
|
||||
if (filter ~= "") then
|
||||
filter = lower (filter)
|
||||
local bar_text = lower (timer [3])
|
||||
if (bar_text:find (filter)) then
|
||||
t [#t+1] = timer
|
||||
end
|
||||
else
|
||||
t [#t+1] = timer
|
||||
end
|
||||
end
|
||||
return t
|
||||
end,
|
||||
header = {
|
||||
{name = "Index", width = 40, type = "text", func = no_func},
|
||||
{name = "Bar Text", width = 160, type = "entry", func = no_func},
|
||||
{name = "Id", width = 140, type = "entry", func = no_func},
|
||||
{name = "Spell Id", width = 50, type = "entry", func = no_func},
|
||||
{name = "Timer", width = 40, type = "entry", func = no_func},
|
||||
{name = "Encounter Id", width = 100, type = "entry", func = no_func},
|
||||
{name = "Create Aura", width = 120, type = "button", func = dbm_open_aura_creator, icon = [[Interface\Buttons\UI-CheckBox-Check-Disabled]], notext = true, iconalign = "center"},
|
||||
},
|
||||
fill_panel = false,
|
||||
fill_gettotal = function (self) return #self.module.data end,
|
||||
fill_fillrows = function (index, self)
|
||||
local data = self.module.data [index]
|
||||
if (data) then
|
||||
local encounter_id = data.id
|
||||
return {
|
||||
index,
|
||||
data[3] or "",
|
||||
data[2] or "",
|
||||
data[7] or "",
|
||||
data[4] or "0",
|
||||
tostring (encounter_id) or "0"
|
||||
}
|
||||
else
|
||||
return nothing_to_show
|
||||
end
|
||||
end,
|
||||
fill_name = "DetailsForgeDBMBarsFillPanel",
|
||||
}
|
||||
f:InstallModule (dbm_timers_module)
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
local bw_open_aura_creator = function (row)
|
||||
|
||||
local data = all_modules [6].data [row]
|
||||
|
||||
local spellname, spellicon, _
|
||||
local spellid = tonumber (data [2])
|
||||
|
||||
if (type (spellid) == "number") then
|
||||
if (spellid < 0) then
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (abs (spellid))
|
||||
spellname, spellicon = title, abilityIcon
|
||||
else
|
||||
spellname, _, spellicon = GetSpellInfo (spellid)
|
||||
end
|
||||
_detalhes:OpenAuraPanel (data [2], spellname, spellicon, data.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = data [2], text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
end
|
||||
end
|
||||
|
||||
local bigwigs_timers_module = {
|
||||
name = "BigWigs Timers",
|
||||
desc = "Show a list of BigWigs timers",
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeBigWigsBarsFilterPanel) then
|
||||
local w = CreateFrame ("frame", "DetailsForgeBigWigsBarsFilterPanel", f)
|
||||
w:SetSize (600, 20)
|
||||
w:SetPoint ("topleft", f, "topleft", 120, -40)
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText ("Bar Text: ")
|
||||
label:SetPoint ("left", w, "left", 5, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeBigWigsBarsTextFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
end
|
||||
return DetailsForgeBigWigsBarsFilterPanel
|
||||
end,
|
||||
search = function()
|
||||
local t = {}
|
||||
local filter = DetailsForgeBigWigsBarsTextFilter:GetText()
|
||||
local source = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"] and _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"].encounter_timers_bw or {}
|
||||
for key, timer in pairs (source) do
|
||||
if (filter ~= "") then
|
||||
filter = lower (filter)
|
||||
local bar_text = lower (timer [3])
|
||||
if (bar_text:find (filter)) then
|
||||
t [#t+1] = timer
|
||||
end
|
||||
else
|
||||
t [#t+1] = timer
|
||||
end
|
||||
end
|
||||
return t
|
||||
end,
|
||||
header = {
|
||||
{name = "Index", width = 40, type = "text", func = no_func},
|
||||
{name = "Bar Text", width = 160, type = "entry", func = no_func},
|
||||
{name = "Spell Id", width = 50, type = "entry", func = no_func},
|
||||
{name = "Timer", width = 40, type = "entry", func = no_func},
|
||||
{name = "Encounter Id", width = 100, type = "entry", func = no_func},
|
||||
{name = "Create Aura", width = 120, type = "button", func = bw_open_aura_creator, icon = [[Interface\Buttons\UI-CheckBox-Check-Disabled]], notext = true, iconalign = "center"},
|
||||
},
|
||||
fill_panel = false,
|
||||
fill_gettotal = function (self) return #self.module.data end,
|
||||
fill_fillrows = function (index, self)
|
||||
local data = self.module.data [index]
|
||||
if (data) then
|
||||
local encounter_id = data.id
|
||||
return {
|
||||
index,
|
||||
data[3] or "",
|
||||
data[2] or "",
|
||||
data[4] or "",
|
||||
tostring (encounter_id) or "0"
|
||||
}
|
||||
else
|
||||
return nothing_to_show
|
||||
end
|
||||
end,
|
||||
fill_name = "DetailsForgeBigWigsBarsFillPanel",
|
||||
}
|
||||
f:InstallModule (bigwigs_timers_module)
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
local select_module = function (a, b, module_number)
|
||||
|
||||
if (current_module ~= module_number) then
|
||||
|
||||
+18
-7
@@ -592,13 +592,6 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (msg == "alert") then
|
||||
|
||||
local instancia = _detalhes.tabela_instancias [1]
|
||||
local f = function() print ("teste") end
|
||||
instancia:InstanceAlert (Loc ["STRING_PLEASE_WAIT"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, 5, {f, "param1", "param2"})
|
||||
|
||||
|
||||
elseif (msg == "comm") then
|
||||
|
||||
local test_plugin = TESTPLUGIN
|
||||
@@ -1066,6 +1059,24 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
print ("item:", item)
|
||||
get_ilvl (item)
|
||||
|
||||
elseif (msg == "score") then
|
||||
|
||||
_detalhes:OpenRaidHistoryWindow ("Hellfire Citadel", 1800, 15, "DAMAGER", "Rock Lobster", 2, "Keyspell")
|
||||
|
||||
elseif (msg == "alert") then
|
||||
--local instancia = _detalhes.tabela_instancias [1]
|
||||
local f = function (a, b, c, d, e, f, g) print (a, b, c, d, e, f, g) end
|
||||
--instancia:InstanceAlert (Loc ["STRING_PLEASE_WAIT"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, 5, {f, 1, 2, 3, 4, 5})
|
||||
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower_instance) then
|
||||
local instance = _detalhes:GetInstance (lower_instance)
|
||||
if (instance) then
|
||||
local func = {_detalhes.OpenRaidHistoryWindow, _detalhes, "Hellfire Citadel", 1800, 15, "DAMAGER", "Rock Lobster", 2, "Keyspell"}
|
||||
instance:InstanceAlert ("Boss Defeated, Open History! ", {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}, 40, func)
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
--if (_detalhes.opened_windows < 1) then
|
||||
|
||||
@@ -265,6 +265,15 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen, section)
|
||||
local desc_background = g:NewImage (window, [[Interface\AddOns\Details\images\options_window]], 253, 198, "artwork", {0.3193359375, 0.56640625, 0.685546875, 0.87890625}, "descBackgroundImage", "$parentDescBackgroundImage") -- 327 702 580 900
|
||||
desc_background:SetPoint ("topleft", info_text, "topleft", 0, 0)
|
||||
|
||||
--> forge and history buttons
|
||||
local forge_button = g:NewButton (window, _, "$parentForgeButton", "ForgeButton", 90, 20, function() _detalhes:OpenForge(); window:Hide() end, nil, nil, nil, "Open Forge", 1) --, g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
forge_button:SetIcon ([[Interface\AddOns\Details\images\icons]], nil, nil, nil, {396/512, 428/512, 243/512, 273/512}, nil, nil, 2)
|
||||
forge_button:SetPoint ("topleft", 80, -61)
|
||||
|
||||
local history_button = g:NewButton (window, _, "$parentHistoryButton", "HistoryButton", 90, 20, function() _detalhes:OpenRaidHistoryWindow(); window:Hide() end, nil, nil, nil, "Open History", 1) --, g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
history_button:SetIcon ([[Interface\AddOns\Details\images\icons]], nil, nil, nil, {434/512, 466/512, 243/512, 273/512}, nil, nil, 2)
|
||||
history_button:SetPoint ("topleft", 180, -61)
|
||||
|
||||
--> select instance dropbox
|
||||
local onSelectInstance = function (_, _, instance)
|
||||
|
||||
|
||||
@@ -1033,10 +1033,14 @@ local BGFrame_scripts_onmousedown = function (self, button)
|
||||
end
|
||||
end
|
||||
elseif (button == "RightButton") then
|
||||
if (_detalhes.switch.current_instancia and _detalhes.switch.current_instancia == self._instance) then
|
||||
_detalhes.switch:CloseMe()
|
||||
if (self.is_toolbar) then
|
||||
self._instance:ShowAllSwitch()
|
||||
else
|
||||
_detalhes.switch:ShowMe (self._instance)
|
||||
if (_detalhes.switch.current_instancia and _detalhes.switch.current_instancia == self._instance) then
|
||||
_detalhes.switch:CloseMe()
|
||||
else
|
||||
_detalhes.switch:ShowMe (self._instance)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2951,10 +2955,12 @@ function _detalhes:InstanceAlert (msg, icon, time, clickfunc)
|
||||
self.alert.icon:SetTexture (nil)
|
||||
end
|
||||
|
||||
self.alert.button.func = nil
|
||||
wipe (self.alert.button.func_param)
|
||||
|
||||
if (clickfunc) then
|
||||
self.alert.button:SetClickFunction (unpack (clickfunc))
|
||||
else
|
||||
self.alert.button:SetClickFunction (hide_click_func)
|
||||
self.alert.button.func = clickfunc[1]
|
||||
self.alert.button.func_param = {unpack (clickfunc, 2)}
|
||||
end
|
||||
|
||||
time = time or 15
|
||||
@@ -2969,6 +2975,16 @@ function _detalhes:InstanceAlert (msg, icon, time, clickfunc)
|
||||
self.alert:Play()
|
||||
end
|
||||
|
||||
local alert_on_click = function (self, button)
|
||||
if (self.func) then
|
||||
local okey, errortext = pcall (self.func, unpack (self.func_param))
|
||||
if (not okey) then
|
||||
_detalhes:Msg ("error on alert function:", errortext)
|
||||
end
|
||||
end
|
||||
self:GetParent():Hide()
|
||||
end
|
||||
|
||||
function CreateAlertFrame (baseframe, instancia)
|
||||
|
||||
local frame_upper = CreateFrame ("scrollframe", "DetailsAlertFrameScroll" .. instancia.meu_id, baseframe)
|
||||
@@ -3021,10 +3037,14 @@ function CreateAlertFrame (baseframe, instancia)
|
||||
icon:SetWidth (14)
|
||||
icon:SetHeight (14)
|
||||
|
||||
local button = gump:NewButton (alert_bg, nil, "DetailsInstance"..instancia.meu_id.."AlertButton", nil, 1, 1)
|
||||
local button = CreateFrame ("button", "DetailsInstance"..instancia.meu_id.."AlertButton", alert_bg)
|
||||
button:SetAllPoints()
|
||||
button:SetHook ("OnMouseUp", function() alert_bg:Hide() end)
|
||||
button:SetFrameStrata ("FULLSCREEN")
|
||||
button:SetScript ("OnClick", alert_on_click)
|
||||
button._instance = instancia
|
||||
button.func_param = {}
|
||||
|
||||
--local button = gump:NewButton (alert_bg, nil, "DetailsInstance"..instancia.meu_id.."AlertButton", nil, 1, 1)
|
||||
|
||||
local RotateAnimGroup = rotate_frame:CreateAnimationGroup()
|
||||
local rotate = RotateAnimGroup:CreateAnimation ("Rotation")
|
||||
|
||||
+287
-27
@@ -30,20 +30,22 @@ do
|
||||
frame:SetFrameLevel (16)
|
||||
|
||||
frame.background = frame:CreateTexture (nil, "background")
|
||||
frame.background:SetTexture ([[Interface\Store\Store-Splash]])
|
||||
frame.background:SetTexCoord (16/1024, 561/1024, 8/1024, 263/1024)
|
||||
--frame.background:SetTexture ("Interface\\AddOns\\Details\\images\\background")
|
||||
frame.background:SetTexture ([[Interface\SPELLBOOK\Spellbook-Page-1]])
|
||||
frame.background:SetTexCoord (331/512, 63/512, 109/512, 143/512)
|
||||
frame.background:SetAllPoints()
|
||||
frame.background:SetDesaturated (true)
|
||||
frame.background:SetVertexColor (.5, .5, .5, .85)
|
||||
--frame.background:SetVertexColor (1, 1, 1, 0.1)
|
||||
frame.background:SetVertexColor (.8, .8, .8, 0.8)
|
||||
|
||||
frame.topbg = frame:CreateTexture (nil, "background")
|
||||
frame.topbg:SetTexture ([[Interface\Scenarios\ScenariosParts]])
|
||||
frame.topbg:SetTexCoord (100/512, 267/512, 143/512, 202/512)
|
||||
frame.topbg:SetTexture ("Interface\\AddOns\\Details\\images\\background")
|
||||
--frame.topbg:SetTexCoord (100/512, 267/512, 143/512, 202/512)
|
||||
frame.topbg:SetPoint ("bottomleft", frame, "topleft")
|
||||
frame.topbg:SetPoint ("bottomright", frame, "topright")
|
||||
frame.topbg:SetHeight (20)
|
||||
frame.topbg:SetDesaturated (true)
|
||||
frame.topbg:SetVertexColor (.3, .3, .3, 1)
|
||||
frame.topbg:SetVertexColor (0, 0, 0, 1)
|
||||
|
||||
frame.topbg_frame = CreateFrame ("frame", nil, frame)
|
||||
frame.topbg_frame:SetPoint ("bottomleft", frame, "topleft")
|
||||
@@ -60,10 +62,10 @@ do
|
||||
frame.star:SetTexture ([[Interface\Glues\CharacterSelect\Glues-AddOn-Icons]])
|
||||
frame.star:SetTexCoord (0.75, 1, 0, 1)
|
||||
frame.star:SetSize (16, 16)
|
||||
frame.star:SetPoint ("bottomleft", frame, "topleft", 4, 0)
|
||||
frame.star:SetPoint ("bottomleft", frame, "topleft", 4, 1)
|
||||
|
||||
frame.title_label = frame:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
frame.title_label:SetPoint ("left", frame.star, "right", 4, -1)
|
||||
frame.title_label:SetPoint ("left", frame.star, "right", 4, 0)
|
||||
frame.title_label:SetText ("Bookmark")
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -108,7 +110,7 @@ do
|
||||
window_color:SetPoint ("bottomright", frame, "topright", -3, 2)
|
||||
|
||||
local window_color_texture = gump:CreateImage (window_color, [[Interface\AddOns\Details\images\icons]], 14, 14, "artwork", {434/512, 466/512, 277/512, 307/512})
|
||||
window_color_texture:SetAlpha (0.35)
|
||||
window_color_texture:SetAlpha (0.55)
|
||||
window_color_texture:SetAllPoints()
|
||||
|
||||
window_color:SetHook ("OnEnter", function()
|
||||
@@ -122,12 +124,240 @@ do
|
||||
GameCooltip:Show()
|
||||
end)
|
||||
window_color:SetHook ("OnLeave", function()
|
||||
window_color_texture:SetAlpha (0.35)
|
||||
window_color_texture:SetAlpha (0.55)
|
||||
GameCooltip:Hide()
|
||||
end)
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local all_switch = CreateFrame ("frame", "DetailsAllAttributesFrame", UIParent)
|
||||
all_switch:SetFrameStrata ("tooltip")
|
||||
all_switch:Hide()
|
||||
all_switch:SetSize (400, 150)
|
||||
all_switch:SetClampedToScreen (true)
|
||||
all_switch:SetBackdrop ({bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16 })
|
||||
all_switch:SetBackdropColor (0.05, 0.05, 0.05, 0.3)
|
||||
all_switch.buttons = {}
|
||||
|
||||
all_switch:SetScript ("OnMouseDown", function (self, button)
|
||||
if (button == "RightButton") then
|
||||
self:Hide()
|
||||
end
|
||||
end)
|
||||
all_switch:SetScript ("OnEnter", function (self, button)
|
||||
all_switch.interacting = true
|
||||
all_switch.last_up = GetTime()
|
||||
end)
|
||||
all_switch:SetScript ("OnLeave", function (self, button)
|
||||
all_switch.interacting = false
|
||||
all_switch.last_up = GetTime()
|
||||
end)
|
||||
|
||||
local on_update_all_switch = function (self, elapsed)
|
||||
if (not self.interacting) then
|
||||
if (GetTime() > all_switch.last_up+2) then
|
||||
local cursor_x, cursor_y = GetCursorPosition()
|
||||
cursor_x, cursor_y = floor (cursor_x), floor (cursor_y)
|
||||
if (all_switch.cursor_x ~= cursor_x or all_switch.cursor_y ~= cursor_y) then
|
||||
self:Hide()
|
||||
else
|
||||
all_switch.last_up = GetTime()-1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
all_switch:SetScript ("OnHide", function (self)
|
||||
all_switch:SetScript ("OnUpdate", nil)
|
||||
end)
|
||||
|
||||
DetailsSwitchPanel.all_switch = all_switch
|
||||
|
||||
function _detalhes:ShowAllSwitch()
|
||||
if (all_switch:IsShown()) then
|
||||
return all_switch:Hide()
|
||||
end
|
||||
all_switch.instance = self
|
||||
GameTooltip:Hide()
|
||||
GameCooltip:Hide()
|
||||
all_switch:ClearAllPoints()
|
||||
all_switch:SetPoint ("bottom", self.baseframe.UPFrame, "top", 4)
|
||||
all_switch:Show()
|
||||
|
||||
if (_detalhes.switch.frame:IsShown()) then
|
||||
_detalhes.switch:CloseMe()
|
||||
end
|
||||
end
|
||||
|
||||
local on_click_all_switch_button = function (self, button)
|
||||
if (button == "LeftButton") then
|
||||
local attribute = self.attribute
|
||||
local sub_attribute = self.sub_attribute
|
||||
local instance = all_switch.instance
|
||||
|
||||
if (instance.modo == _detalhes._detalhes_props["MODO_ALONE"] or instance.modo == _detalhes._detalhes_props["MODO_RAID"]) then
|
||||
instance:AlteraModo (instance, 2)
|
||||
end
|
||||
instance:TrocaTabela (instance, true, attribute, sub_attribute)
|
||||
all_switch:Hide()
|
||||
|
||||
elseif (button == "RightButton") then
|
||||
all_switch:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
local on_enter_all_switch_button = function (self)
|
||||
_detalhes:SetFontColor (self.text, "orange")
|
||||
self.texture:SetBlendMode ("ADD")
|
||||
all_switch.interacting = true
|
||||
all_switch.last_up = GetTime()
|
||||
end
|
||||
|
||||
local on_leave_all_switch_button = function (self)
|
||||
_detalhes:SetFontColor (self.text, "white")
|
||||
self.texture:SetBlendMode ("BLEND")
|
||||
all_switch.interacting = false
|
||||
all_switch.last_up = GetTime()
|
||||
end
|
||||
|
||||
all_switch.check_text_size = function (font_string)
|
||||
local text_width = font_string:GetStringWidth()
|
||||
while (text_width > 104) do
|
||||
local text = font_string:GetText()
|
||||
text = strsub (text, 1, #text-1)
|
||||
font_string:SetText (text)
|
||||
text_width = font_string:GetStringWidth()
|
||||
end
|
||||
end
|
||||
|
||||
local create_all_switch_button = function (attribute, sub_attribute, x, y)
|
||||
local button = CreateFrame ("button", "DetailsAllAttributesFrame" .. attribute .. sub_attribute, all_switch)
|
||||
button:SetSize (100, 16)
|
||||
button.texture = button:CreateTexture (nil, "overlay")
|
||||
button.texture:SetPoint ("left", 0, 0)
|
||||
button.texture:SetSize (16, 16)
|
||||
button.text = button:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
button.text:SetPoint ("left", button.texture, "right", 2, 0)
|
||||
button.attribute = attribute
|
||||
button.sub_attribute = sub_attribute
|
||||
button:SetPoint ("topleft", x, y)
|
||||
_detalhes:SetFontSize (button.text, 10)
|
||||
_detalhes:SetFontColor (button.text, "white")
|
||||
|
||||
button:SetScript ("OnClick", on_click_all_switch_button)
|
||||
button:SetScript ("OnEnter", on_enter_all_switch_button)
|
||||
button:SetScript ("OnLeave", on_leave_all_switch_button)
|
||||
|
||||
button:RegisterForClicks ("LeftButtonDown", "RightButtonDown")
|
||||
|
||||
return button
|
||||
end
|
||||
|
||||
all_switch:SetScript ("OnShow", function()
|
||||
|
||||
if (not all_switch.already_built) then
|
||||
local x, y = 5, -5
|
||||
all_switch.higher_counter = 0
|
||||
|
||||
for attribute = 1, _detalhes.atributos[0] do
|
||||
--> localized attribute name
|
||||
local loc_attribute_name = _detalhes.atributos.lista [attribute]
|
||||
|
||||
local title_icon = all_switch:CreateTexture (nil, "overlay")
|
||||
title_icon:SetPoint ("topleft", x, y)
|
||||
local texture, l, r, t, b = _detalhes:GetAttributeIcon (attribute)
|
||||
title_icon:SetTexture (texture)
|
||||
title_icon:SetTexCoord (l, r, t, b)
|
||||
title_icon:SetSize (18, 18)
|
||||
local title_str = all_switch:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
title_str:SetPoint ("left", title_icon, "right", 2, 0)
|
||||
title_str:SetText (loc_attribute_name)
|
||||
|
||||
y = y - 20
|
||||
|
||||
all_switch.buttons [attribute] = {}
|
||||
for i = 1, #_detalhes.sub_atributos [attribute].lista do
|
||||
--> localized sub attribute name
|
||||
local loc_sub_attribute_name = _detalhes.sub_atributos [attribute].lista [i]
|
||||
local button = create_all_switch_button (attribute, i, x, y)
|
||||
button.text:SetText (loc_sub_attribute_name)
|
||||
all_switch.check_text_size (button.text)
|
||||
button.texture:SetTexture (_detalhes.sub_atributos [attribute].icones [i] [1])
|
||||
button.texture:SetTexCoord (unpack (_detalhes.sub_atributos [attribute].icones [i] [2]))
|
||||
tinsert (all_switch.buttons [attribute], button)
|
||||
y = y - 17
|
||||
end
|
||||
|
||||
if (#_detalhes.sub_atributos [attribute].lista > all_switch.higher_counter) then
|
||||
all_switch.higher_counter = #_detalhes.sub_atributos [attribute].lista
|
||||
end
|
||||
|
||||
x = x + 130
|
||||
y = -5
|
||||
end
|
||||
|
||||
--> prepare for customs
|
||||
all_switch.x = x
|
||||
all_switch.y = -5
|
||||
all_switch.buttons [_detalhes.atributos[0]+1] = {}
|
||||
|
||||
local title_icon = all_switch:CreateTexture (nil, "overlay")
|
||||
local texture, l, r, t, b = _detalhes:GetAttributeIcon (_detalhes.atributos[0]+1)
|
||||
title_icon:SetTexture (texture)
|
||||
title_icon:SetTexCoord (l, r, t, b)
|
||||
title_icon:SetSize (18, 18)
|
||||
local title_str = all_switch:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
title_str:SetPoint ("left", title_icon, "right", 2, 0)
|
||||
title_str:SetText (_detalhes.atributos.lista [_detalhes.atributos[0]+1])
|
||||
|
||||
title_icon:SetPoint ("topleft", all_switch.x, all_switch.y)
|
||||
all_switch.y = all_switch.y - 20
|
||||
all_switch.title_custom = title_icon
|
||||
|
||||
all_switch.already_built = true
|
||||
end
|
||||
|
||||
--> update customs
|
||||
local custom_index = _detalhes.atributos[0]+1
|
||||
for _, button in ipairs (all_switch.buttons [custom_index]) do
|
||||
button:Hide()
|
||||
end
|
||||
|
||||
local button_index = 1
|
||||
for i = #_detalhes.custom, 1, -1 do
|
||||
local button = all_switch.buttons [custom_index] [button_index]
|
||||
if (not button) then
|
||||
button = create_all_switch_button (custom_index, i, all_switch.x, all_switch.y)
|
||||
tinsert (all_switch.buttons [custom_index], button)
|
||||
all_switch.y = all_switch.y - 17
|
||||
end
|
||||
|
||||
local custom = _detalhes.custom [i]
|
||||
button.text:SetText (custom.name)
|
||||
all_switch.check_text_size (button.text)
|
||||
button.texture:SetTexture (custom.icon)
|
||||
button.texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875)
|
||||
button:Show()
|
||||
|
||||
button_index = button_index + 1
|
||||
end
|
||||
|
||||
if (#_detalhes.custom > all_switch.higher_counter) then
|
||||
all_switch.higher_counter = #_detalhes.custom
|
||||
end
|
||||
|
||||
all_switch:SetHeight ((all_switch.higher_counter * 17) + 20 + 10)
|
||||
all_switch:SetWidth ((120 * 5) + (5 * 2) + (12*4))
|
||||
|
||||
all_switch.last_up = GetTime()
|
||||
local cursor_x, cursor_y = GetCursorPosition()
|
||||
all_switch.cursor_x, all_switch.cursor_y = floor (cursor_x), floor (cursor_y)
|
||||
all_switch:SetScript ("OnUpdate", on_update_all_switch)
|
||||
|
||||
end)
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local open_options = function()
|
||||
_detalhes:OpenOptionsWindow (_detalhes.switch.current_instancia)
|
||||
_detalhes.switch:CloseMe()
|
||||
@@ -136,7 +366,7 @@ do
|
||||
options_button:SetPoint ("right", window_color, "left", -2, 0)
|
||||
|
||||
local options_button_texture = gump:CreateImage (options_button, [[Interface\AddOns\Details\images\icons]], 14, 14, "artwork", {396/512, 428/512, 277/512, 307/512})
|
||||
options_button_texture:SetAlpha (0.35)
|
||||
options_button_texture:SetAlpha (0.55)
|
||||
options_button_texture:SetAllPoints()
|
||||
|
||||
options_button:SetHook ("OnEnter", function()
|
||||
@@ -150,7 +380,7 @@ do
|
||||
GameCooltip:Show()
|
||||
end)
|
||||
options_button:SetHook ("OnLeave", function()
|
||||
options_button_texture:SetAlpha (0.35)
|
||||
options_button_texture:SetAlpha (0.55)
|
||||
GameCooltip:Hide()
|
||||
end)
|
||||
|
||||
@@ -158,12 +388,13 @@ do
|
||||
|
||||
local open_forge = function()
|
||||
_detalhes:OpenForge()
|
||||
_detalhes.switch:CloseMe()
|
||||
end
|
||||
local forge_button = gump:CreateButton (frame.topbg_frame, open_forge, 14, 14, open_forge)
|
||||
forge_button:SetPoint ("right", options_button, "left", -2, 0)
|
||||
|
||||
local forge_button_texture = gump:CreateImage (forge_button, [[Interface\AddOns\Details\images\icons]], 14, 14, "artwork", {396/512, 428/512, 243/512, 273/512})
|
||||
forge_button_texture:SetAlpha (0.35)
|
||||
forge_button_texture:SetAlpha (0.55)
|
||||
forge_button_texture:SetAllPoints()
|
||||
|
||||
forge_button:SetHook ("OnEnter", function()
|
||||
@@ -177,7 +408,7 @@ do
|
||||
GameCooltip:Show()
|
||||
end)
|
||||
forge_button:SetHook ("OnLeave", function()
|
||||
forge_button_texture:SetAlpha (0.35)
|
||||
forge_button_texture:SetAlpha (0.55)
|
||||
GameCooltip:Hide()
|
||||
end)
|
||||
|
||||
@@ -185,12 +416,13 @@ do
|
||||
|
||||
local open_history = function()
|
||||
_detalhes:OpenRaidHistoryWindow()
|
||||
_detalhes.switch:CloseMe()
|
||||
end
|
||||
local history_button = gump:CreateButton (frame.topbg_frame, open_history, 14, 14, open_history)
|
||||
history_button:SetPoint ("right", forge_button, "left", -2, 0)
|
||||
|
||||
local history_button_texture = gump:CreateImage (history_button, [[Interface\AddOns\Details\images\icons]], 14, 14, "artwork", {434/512, 466/512, 243/512, 273/512})
|
||||
history_button_texture:SetAlpha (0.35)
|
||||
history_button_texture:SetAlpha (0.55)
|
||||
history_button_texture:SetAllPoints()
|
||||
|
||||
history_button:SetHook ("OnEnter", function()
|
||||
@@ -204,7 +436,7 @@ do
|
||||
GameCooltip:Show()
|
||||
end)
|
||||
history_button:SetHook ("OnLeave", function()
|
||||
history_button_texture:SetAlpha (0.35)
|
||||
history_button_texture:SetAlpha (0.55)
|
||||
GameCooltip:Hide()
|
||||
end)
|
||||
|
||||
@@ -603,6 +835,11 @@ function _detalhes.switch:ShowMe (instancia)
|
||||
|
||||
_detalhes.switch:Resize (precisa_mostrar)
|
||||
--instancia:StatusBarAlert (right_click_text, right_click_texture) --icon, color, time
|
||||
|
||||
if (DetailsSwitchPanel.all_switch:IsShown()) then
|
||||
return DetailsSwitchPanel.all_switch:Hide()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes.switch:Config (_,_, atributo, sub_atributo)
|
||||
@@ -796,8 +1033,20 @@ function _detalhes.switch:Update()
|
||||
button:Show()
|
||||
button.button2:Show()
|
||||
button.fundo:Show()
|
||||
|
||||
|
||||
local width, height = button.button2.texto:GetSize()
|
||||
button.button2.texto:SetWidth (300)
|
||||
button.button2.texto:SetText (name)
|
||||
local text_width = button.button2.texto:GetStringWidth()
|
||||
while (text_width > _detalhes.switch.text_size) do
|
||||
_detalhes:SetFontSize (button.button2.texto, 9)
|
||||
local text = button.button2.texto:GetText()
|
||||
text = strsub (text, 1, #text-1)
|
||||
button.button2.texto:SetText (text)
|
||||
text_width = button.button2.texto:GetStringWidth()
|
||||
end
|
||||
|
||||
button.button2.texto:SetSize (width, height)
|
||||
|
||||
button.textureNormal:SetTexture (icone, true)
|
||||
button.textureNormal:SetTexCoord (_unpack (coords))
|
||||
@@ -819,9 +1068,11 @@ function _detalhes.switch:Update()
|
||||
if (name == Loc ["STRING_SWITCH_CLICKME"]) then
|
||||
--button.button2.texto:SetTextColor (.3, .3, .3, 1)
|
||||
button:SetAlpha (0.3)
|
||||
button.button2.texto:SetPoint ("left", button, "right", 5, -1)
|
||||
else
|
||||
--button.button2.texto:SetTextColor (.8, .8, .8, 1)
|
||||
button:SetAlpha (1)
|
||||
button.button2.texto:SetPoint ("left", button, "right", 3, -1)
|
||||
end
|
||||
|
||||
if (jump) then
|
||||
@@ -849,7 +1100,7 @@ function _detalhes.switch:Resize (precisa_mostrar)
|
||||
|
||||
local x, x_original = 5, 5
|
||||
local y = 5
|
||||
local y_increment = 20
|
||||
local y_increment = 18
|
||||
|
||||
local window_width, window_height = _detalhes.switch.current_instancia:GetSize()
|
||||
|
||||
@@ -874,6 +1125,8 @@ function _detalhes.switch:Resize (precisa_mostrar)
|
||||
_detalhes.switch.vertical_amt = vertical_amt
|
||||
_detalhes.switch.horizontal_amt = horizontal_amt
|
||||
|
||||
_detalhes.switch.text_size = size - 30
|
||||
|
||||
local i = 1
|
||||
for vertical = 1, vertical_amt do
|
||||
x = x_original
|
||||
@@ -978,10 +1231,9 @@ local onenter = function (self)
|
||||
else
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
|
||||
self.texto:SetTextColor (1, 1, 1, 1)
|
||||
|
||||
_detalhes:SetFontColor (self.texto, "orange")
|
||||
self.border:SetBlendMode ("ADD")
|
||||
|
||||
self.button1_icon:SetBlendMode ("ADD")
|
||||
|
||||
end
|
||||
@@ -990,7 +1242,7 @@ local onleave = function (self)
|
||||
if (GameCooltip:IsTooltip()) then
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
self.texto:SetTextColor (.8, .8, .8, 1)
|
||||
self.texto:SetTextColor (.9, .9, .9, .9)
|
||||
self.border:SetBlendMode ("BLEND")
|
||||
self.button1_icon:SetBlendMode ("BLEND")
|
||||
end
|
||||
@@ -1016,6 +1268,8 @@ local oniconenter = function (self)
|
||||
|
||||
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color)
|
||||
|
||||
_detalhes:SetFontColor (self.texto, "orange")
|
||||
|
||||
GameCooltip:Show()
|
||||
end
|
||||
|
||||
@@ -1023,6 +1277,8 @@ local oniconleave = function (self)
|
||||
if (GameCooltip:IsTooltip()) then
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
|
||||
self.texto:SetTextColor (.9, .9, .9, .9)
|
||||
end
|
||||
|
||||
local left_box_on_click = function (self, button)
|
||||
@@ -1095,7 +1351,7 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
local fundo_x = -3
|
||||
local fundo_y = -5
|
||||
button.line = button:CreateTexture (nil, "background")
|
||||
button.line:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
|
||||
-- button.line:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
|
||||
button.line:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750)
|
||||
button.line:SetWidth (85)
|
||||
button.line:SetPoint ("topleft", button, "topright", fundo_x-14, 0)
|
||||
@@ -1104,7 +1360,7 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
|
||||
--fundo marrom 2
|
||||
button.line2 = button:CreateTexture (nil, "background")
|
||||
button.line2:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
|
||||
-- button.line2:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
|
||||
button.line2:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750)
|
||||
button.line2:SetWidth (85)
|
||||
button.line2:SetPoint ("topleft", button, "topright", fundo_x, 0)
|
||||
@@ -1135,10 +1391,13 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
button.textureH:SetAllPoints (button)
|
||||
|
||||
--texto do atributo
|
||||
gump:NewLabel (button2, button2, nil, "texto", "", "GameFontHighlightSmall")
|
||||
gump:NewLabel (button2, button2, nil, "texto", "", "GameFontNormal")
|
||||
button2.texto:SetPoint ("left", button, "right", 5, -1)
|
||||
button2.texto:SetNonSpaceWrap (true)
|
||||
button2.texto:SetTextColor (.8, .8, .8, 1)
|
||||
button2.texto:SetTextColor (.9, .9, .9, .9)
|
||||
|
||||
_detalhes:SetFontSize (button2.texto, 10)
|
||||
|
||||
button.texto = button2.texto
|
||||
|
||||
button2.button1_icon = button.textureNormal
|
||||
button2.button1_icon2 = button.texturePushed
|
||||
@@ -1152,3 +1411,4 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
|
||||
return button
|
||||
end
|
||||
--doa
|
||||
@@ -56,6 +56,10 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
|
||||
local close_button = DmgRank:CreateSoloCloseButton()
|
||||
close_button:SetPoint ("TOPRIGHT", DmgRankFrame, "TOPRIGHT", 3, 5)
|
||||
close_button:SetSize (24, 24)
|
||||
|
||||
------------- Build Ranking ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> damage goal table
|
||||
|
||||
@@ -127,6 +127,10 @@ local function CreatePluginFrames()
|
||||
end
|
||||
end
|
||||
|
||||
local close_button = DpsTuningPlugin:CreateSoloCloseButton()
|
||||
close_button:SetPoint ("TOPRIGHT", SDF, "TOPRIGHT", -15, 5)
|
||||
close_button:SetSize (24, 24)
|
||||
|
||||
function DpsTuningPlugin.GetActivityTime (thisspell, time)
|
||||
if (thisspell.tempo_end) then --> o tempo do jogador esta trancado
|
||||
local t = thisspell.tempo_end - thisspell.start
|
||||
|
||||
@@ -249,22 +249,26 @@ local function CreatePluginFrames (data)
|
||||
|
||||
elseif (event == "ENCOUNTER_END" or event == "PLAYER_REGEN_ENABLED") then
|
||||
if (current_encounter) then
|
||||
|
||||
if (_G.DBM) then
|
||||
local db = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]
|
||||
for spell, timer_table in pairs (current_table_dbm) do
|
||||
if (not EncounterDetails.db.encounter_timers_dbm [timer_table[1]] and timer_table[1]:find ("Timer")) then
|
||||
if (not db.encounter_timers_dbm [timer_table[1]]) then
|
||||
timer_table.id = current_encounter
|
||||
EncounterDetails.db.encounter_timers_dbm [timer_table[1]] = timer_table
|
||||
db.encounter_timers_dbm [timer_table[1]] = timer_table
|
||||
end
|
||||
end
|
||||
end
|
||||
if (BigWigs) then
|
||||
local db = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]
|
||||
for timer_id, timer_table in pairs (current_table_bigwigs) do
|
||||
if (not EncounterDetails.db.encounter_timers_bw [timer_id]) then
|
||||
if (not db.encounter_timers_bw [timer_id]) then
|
||||
timer_table.id = current_encounter
|
||||
EncounterDetails.db.encounter_timers_bw [timer_id] = timer_table
|
||||
db.encounter_timers_bw [timer_id] = timer_table
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
current_encounter = false
|
||||
@@ -276,13 +280,16 @@ local function CreatePluginFrames (data)
|
||||
event_frame:RegisterEvent ("ENCOUNTER_END")
|
||||
event_frame:RegisterEvent ("PLAYER_REGEN_ENABLED")
|
||||
|
||||
--EncounterDetails.DBM_timers
|
||||
--DBM_TimerStart Timer183828cdcount 2 Death Brand CD (2) 42.5 Interface\Icons\warlock_summon_doomguard cdcount 183828 1 1438
|
||||
--DBM_TimerStart Timer183828cdcount 3 Death Brand CD (3) 42.5 Interface\Icons\warlock_summon_doomguard cdcount 183828 1 1438
|
||||
|
||||
--EncounterDetails.DBM_timers
|
||||
if (_G.DBM) then
|
||||
local dbm_timer_callback = function (event, timer_id, message, duration)
|
||||
local spell = tonumber (timer_id:match ("(%d+)"))
|
||||
local dbm_timer_callback = function (bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
|
||||
--print (bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
|
||||
local spell = tostring (spellId)
|
||||
if (spell and not current_table_dbm [spell]) then
|
||||
current_table_dbm [spell] = {timer_id, message, duration}
|
||||
current_table_dbm [spell] = {spell, id, msg, timer, icon, bartype, spellId, colorId, modid}
|
||||
end
|
||||
end
|
||||
DBM:RegisterCallback ("DBM_TimerStart", dbm_timer_callback)
|
||||
@@ -291,9 +298,10 @@ local function CreatePluginFrames (data)
|
||||
if (BigWigs) then
|
||||
BigWigs:Enable()
|
||||
function EncounterDetails:BigWigs_StartBar (event, module, spellid, bar_text, time, icon, ...)
|
||||
--print (event, module, spellid, bar_text, time, icon, ...)
|
||||
spellid = tostring (spellid)
|
||||
if (not current_table_bigwigs [spellid]) then
|
||||
current_table_bigwigs [spellid] = {spellid, bar_text, time, icon}
|
||||
current_table_bigwigs [spellid] = {(type (module) == "string" and module) or (module and module.moduleName) or "", spellid or "", bar_text or "", time or 0, icon or ""}
|
||||
end
|
||||
end
|
||||
BigWigs.RegisterMessage (EncounterDetails, "BigWigs_StartBar")
|
||||
@@ -1836,6 +1844,11 @@ function EncounterDetails:OnEvent (_, event, ...)
|
||||
|
||||
EncounterDetails.boss_emotes_table = EncounterDetails.charsaved.emotes
|
||||
|
||||
--> build a table on global saved variables
|
||||
if (not _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]) then
|
||||
_detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"] = {encounter_timers_dbm = {}, encounter_timers_bw= {}}
|
||||
end
|
||||
|
||||
--> Register needed events
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "COMBAT_PLAYER_ENTER")
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "COMBAT_PLAYER_LEAVE")
|
||||
|
||||
@@ -1933,55 +1933,42 @@ do
|
||||
BossFrame.label_dbm_bars = label_dbm_bars
|
||||
BossFrame.label_bw_bars = label_bw_bars
|
||||
|
||||
local on_select_dbm_bar = function (_, _, timer_id)
|
||||
local timer_table = EncounterDetails.db.encounter_timers_dbm [timer_id]
|
||||
local spell = tonumber (timer_id:match ("(%d+)"))
|
||||
|
||||
if (spell > 30000) then
|
||||
local spellname, _, spellicon = _GetSpellInfo (spell)
|
||||
EncounterDetails:OpenAuraPanel (spell, spellname, spellicon, timer_table.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = timer_id, text = "== Next " .. spellname .. " In ==", text_size = 72})
|
||||
else
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (spell)
|
||||
EncounterDetails:OpenAuraPanel (spell, title, abilityIcon, timer_table.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = timer_id, text = "== Next " .. title .. " In ==", text_size = 72})
|
||||
end
|
||||
local on_select_dbm_bar = function (_, _, value)
|
||||
local timer_id, spellname, spellicon, encounterid, spellid = unpack (value)
|
||||
EncounterDetails:OpenAuraPanel (timer_id, spellname, spellicon, encounterid, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = timer_id, spellid = spellid, text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
end
|
||||
|
||||
local on_select_bw_bar = function (_, _, timer_id)
|
||||
local timer_table = EncounterDetails.db.encounter_timers_bw [timer_id]
|
||||
local spell = timer_id
|
||||
local int_spell = tonumber (spell)
|
||||
|
||||
if (not int_spell) then
|
||||
local spellname = timer_table [2]:gsub (" %(.%)", "")
|
||||
EncounterDetails:OpenAuraPanel (spell, spellname, timer_table [4], timer_table.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "== Next " .. spellname .. " In ==", text_size = 72})
|
||||
elseif (int_spell < 0) then
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (abs (int_spell))
|
||||
EncounterDetails:OpenAuraPanel (spell, title, abilityIcon, timer_table.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "== Next " .. title .. " In ==", text_size = 72})
|
||||
else
|
||||
local spellname, _, spellicon = _GetSpellInfo (int_spell)
|
||||
EncounterDetails:OpenAuraPanel (spell, spellname, spellicon, timer_table.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "== Next " .. spellname .. " In ==", text_size = 72})
|
||||
end
|
||||
local on_select_bw_bar = function (_, _, value)
|
||||
local timer_id, spellname, spellicon, encounterid = unpack (value)
|
||||
EncounterDetails:OpenAuraPanel (timer_id, spellname, spellicon, encounterid, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
end
|
||||
|
||||
local already_added = {}
|
||||
local build_dbm_bars = function()
|
||||
local t = {}
|
||||
if (EncounterDetails.db) then
|
||||
local db = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]
|
||||
if (db) then
|
||||
wipe (already_added)
|
||||
local encounter_id = EncounterDetails_SpellAurasScroll.encounter_id
|
||||
|
||||
for timer_id, timer_table in pairs (EncounterDetails.db.encounter_timers_dbm) do
|
||||
if (timer_id:find ("Timer") and timer_table.id == encounter_id) then
|
||||
local spell = tonumber (timer_id:match ("(%d+)"))
|
||||
for timer_id, timer_table in pairs (db.encounter_timers_dbm) do
|
||||
if (timer_table.id == encounter_id) then
|
||||
local spellId = timer_table [7]
|
||||
local spellIcon = timer_table [5]
|
||||
local spellName
|
||||
|
||||
local spell = timer_id
|
||||
spell = spell:gsub ("ej", "")
|
||||
spell = tonumber (spell)
|
||||
|
||||
if (spell and not already_added [spell]) then
|
||||
if (spell > 30000) then
|
||||
local spellname, _, spellicon = _GetSpellInfo (spell)
|
||||
tinsert (t, {label = spellname, value = timer_id, icon = spellicon, onclick = on_select_dbm_bar})
|
||||
tinsert (t, {label = spellname, value = {timer_table [2], spellname, spellIcon or spellicon, timer_table.id, timer_table [7]}, icon = spellIcon or spellicon, onclick = on_select_dbm_bar})
|
||||
else
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (spell)
|
||||
tinsert (t, {label = title, value = timer_id, icon = abilityIcon, onclick = on_select_dbm_bar})
|
||||
tinsert (t, {label = title, value = {timer_table [2], title, spellIcon or abilityIcon, timer_table.id, timer_table [7]}, icon = spellIcon or abilityIcon, onclick = on_select_dbm_bar})
|
||||
end
|
||||
|
||||
already_added [spell] = true
|
||||
end
|
||||
end
|
||||
@@ -1992,24 +1979,25 @@ do
|
||||
|
||||
local build_bigwigs_bars = function()
|
||||
local t = {}
|
||||
if (EncounterDetails.db) then
|
||||
local db = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]
|
||||
if (db) then
|
||||
wipe (already_added)
|
||||
local encounter_id = EncounterDetails_SpellAurasScroll.encounter_id
|
||||
|
||||
for timer_id, timer_table in pairs (EncounterDetails.db.encounter_timers_bw) do
|
||||
for timer_id, timer_table in pairs (db.encounter_timers_bw) do
|
||||
if (timer_table.id == encounter_id) then
|
||||
local spell = timer_id
|
||||
if (spell and not already_added [spell]) then
|
||||
local int_spell = tonumber (spell)
|
||||
if (not int_spell) then
|
||||
local spellname = timer_table [2]:gsub (" %(.%)", "")
|
||||
tinsert (t, {label = spellname, value = timer_id, icon = timer_table [4], onclick = on_select_bw_bar})
|
||||
tinsert (t, {label = spellname, value = {timer_table [2], spellname, timer_table [5], timer_table.id}, icon = timer_table [5], onclick = on_select_bw_bar})
|
||||
elseif (int_spell < 0) then
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (abs (int_spell))
|
||||
tinsert (t, {label = title, value = timer_id, icon = abilityIcon, onclick = on_select_bw_bar})
|
||||
tinsert (t, {label = title, value = {timer_table [2], title, timer_table [5] or abilityIcon, timer_table.id}, icon = timer_table [5] or abilityIcon, onclick = on_select_bw_bar})
|
||||
else
|
||||
local spellname, _, spellicon = _GetSpellInfo (int_spell)
|
||||
tinsert (t, {label = spellname, value = timer_id, icon = spellicon, onclick = on_select_bw_bar})
|
||||
tinsert (t, {label = spellname, value = {timer_table [2], spellname, timer_table [5] or spellicon, timer_table.id}, icon = timer_table [5] or spellicon, onclick = on_select_bw_bar})
|
||||
end
|
||||
|
||||
already_added [spell] = true
|
||||
|
||||
@@ -50,6 +50,8 @@ local food_list = {
|
||||
[180759] = true, --125 versa
|
||||
[180762] = true, --125 mastery
|
||||
[180760] = true, --187 stam
|
||||
|
||||
[188534] = true, --Felmouth Frenzy
|
||||
}
|
||||
|
||||
local best_food = {
|
||||
|
||||
@@ -59,6 +59,10 @@ local function CreatePluginFrames()
|
||||
TimeAttackFrame:SetWidth (300) --> need to be 300x300 to fit details window
|
||||
TimeAttackFrame:SetHeight (300) --> need to be 300x300 to fit details window
|
||||
|
||||
local close_button = TimeAttack:CreateSoloCloseButton()
|
||||
close_button:SetPoint ("TOPRIGHT", TimeAttackFrame, "TOPRIGHT", -68, 3)
|
||||
close_button:SetSize (24, 24)
|
||||
|
||||
--> default background picture, will hold the actor spec background, like old school talent frame
|
||||
local background = TimeAttackFrame:CreateTexture (nil, "background")
|
||||
|
||||
|
||||
@@ -365,6 +365,13 @@ function _G._detalhes:Start()
|
||||
_detalhes:AddDefaultCustomDisplays()
|
||||
|
||||
--> erase the custom for damage taken by spell
|
||||
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 75 and enable_reset_warning) then
|
||||
if (_detalhes.global_plugin_database and _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]) then
|
||||
wipe (_detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"].encounter_timers_dbm)
|
||||
wipe (_detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"].encounter_timers_bw)
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 74 and enable_reset_warning) then
|
||||
function _detalhes:FixMonkSpecIcons()
|
||||
local m269 = _detalhes.class_specs_coords [269]
|
||||
|
||||
Reference in New Issue
Block a user