From a50a49bf0b0eec014ee21cf5df35db9e0e3aa832 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Sun, 25 Oct 2020 20:51:04 -0300 Subject: [PATCH] Fixed customs --- Libs/DF/fw.lua | 2 +- Libs/DF/panel.lua | 3 +++ Libs/LibGraph-2.0/LibGraph-2.0.lua | 14 +++++++------- boot.lua | 4 ++-- classes/class_custom.lua | 11 +++++------ 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 8f284ce72..7b3fd14a6 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 212 +local dversion = 213 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary (major, minor) diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index 389cdf10d..8a6a936ef 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -3883,6 +3883,9 @@ DF.TabContainerFunctions.SelectIndex = function (self, fixedParam, menuIndex) end mainFrame.AllFrames[menuIndex]:Show() + if mainFrame.AllFrames[menuIndex].RefreshOptions then + mainFrame.AllFrames[menuIndex]:RefreshOptions() + end if (mainFrame.ButtonSelectedBorderColor) then mainFrame.AllButtons[menuIndex]:SetBackdropBorderColor (unpack (mainFrame.ButtonSelectedBorderColor)) end diff --git a/Libs/LibGraph-2.0/LibGraph-2.0.lua b/Libs/LibGraph-2.0/LibGraph-2.0.lua index f46585461..c981ef7b8 100644 --- a/Libs/LibGraph-2.0/LibGraph-2.0.lua +++ b/Libs/LibGraph-2.0/LibGraph-2.0.lua @@ -1,6 +1,6 @@ --[[ Name: LibGraph-2.0 -Revision: $Rev: 54 $ +Revision: $Rev: 56 $ Author(s): Cryect (cryect@gmail.com), Xinhuan Website: http://www.wowace.com/ Documentation: http://www.wowace.com/wiki/GraphLib @@ -11,7 +11,7 @@ Description: Allows for easy creation of graphs --Thanks to Nelson Minar for catching several errors where width was being used instead of height (damn copy and paste >_>) local major = "LibGraph-2.0" -local minor = 90000 + tonumber(("$Revision: 55 $"):match("(%d+)")) +local minor = 90000 + tonumber(("$Revision: 56 $"):match("(%d+)")) --Search for just Addon\\ at the front since the interface part often gets trimmed @@ -135,7 +135,7 @@ end function lib:CreateGraphRealtime(name, parent, relative, relativeTo, offsetX, offsetY, Width, Height) local graph local i - graph = CreateFrame("Frame", name, parent) + graph = CreateFrame("Frame", name, parent, BackdropTemplateMixin and "BackdropTemplate") Width = math_floor(Width) @@ -152,7 +152,7 @@ function lib:CreateGraphRealtime(name, parent, relative, relativeTo, offsetX, of graph.Height = Height for i = 1, Width do local bar - bar = CreateFrame("StatusBar", name.."Bar"..i, graph)--graph:CreateTexture(nil, "ARTWORK") + bar = CreateFrame("StatusBar", name.."Bar"..i, graph, BackdropTemplateMixin and "BackdropTemplate")--graph:CreateTexture(nil, "ARTWORK") bar:SetPoint("BOTTOMLEFT", graph, "BOTTOMLEFT", i - 1, 0) bar:SetHeight(Height) bar:SetWidth(1) @@ -267,7 +267,7 @@ end function lib:CreateGraphLine(name, parent, relative, relativeTo, offsetX, offsetY, Width, Height) local graph local i - graph = CreateFrame("Frame", name, parent) + graph = CreateFrame("Frame", name, parent, BackdropTemplateMixin and "BackdropTemplate") graph:SetPoint(relative, parent, relativeTo, offsetX, offsetY) @@ -357,7 +357,7 @@ end function lib:CreateGraphScatterPlot(name, parent, relative, relativeTo, offsetX, offsetY, Width, Height) local graph local i - graph = CreateFrame("Frame",name, parent) + graph = CreateFrame("Frame",name, parent, BackdropTemplateMixin and "BackdropTemplate") graph:SetPoint(relative, parent, relativeTo, offsetX, offsetY) @@ -425,7 +425,7 @@ end function lib:CreateGraphPieChart(name, parent, relative, relativeTo, offsetX, offsetY, Width, Height) local graph local i - graph = CreateFrame("Frame",name, parent) + graph = CreateFrame("Frame",name, parent, BackdropTemplateMixin and "BackdropTemplate") graph:SetPoint(relative, parent, relativeTo, offsetX, offsetY) diff --git a/boot.lua b/boot.lua index 495c0d152..5c6696f59 100644 --- a/boot.lua +++ b/boot.lua @@ -4,8 +4,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 7932 - _detalhes.alpha_build_counter = 7932 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 7933 + _detalhes.alpha_build_counter = 7933 --if this is higher than the regular counter, use it instead _detalhes.game_version = "v9.0.1" _detalhes.userversion = "v9.0.1." .. _detalhes.build_counter _detalhes.realversion = 143 --core version, this is used to check API version for scripts and plugins (see alias below) diff --git a/classes/class_custom.lua b/classes/class_custom.lua index ab212a7cd..2348e43cf 100644 --- a/classes/class_custom.lua +++ b/classes/class_custom.lua @@ -98,7 +98,7 @@ local total = 0 local top = 0 local amount = 0 - + --> check if is a custom script (if has .script) if (custom_object:IsScripted()) then @@ -155,15 +155,15 @@ _detalhes:EndRefresh (instance, 0, combat, combat [1]) end - local okey, total, top, amount = _pcall (func, combat, instance_container, instance) + local okey, _total, _top, _amount = _pcall (func, combat, instance_container, instance) if (not okey) then _detalhes:Msg ("|cFFFF9900error on custom display function|r:", total) return _detalhes:EndRefresh (instance, 0, combat, combat [1]) end - total = total or 0 - top = top or 0 - amount = amount or 0 + total = _total or 0 + top = _top or 0 + amount = _amount or 0 else --does not have a .script --> get the attribute @@ -178,7 +178,6 @@ --> build container total, top, amount = atributo_custom:BuildActorList (func, custom_object.source, custom_object.target, custom_object.spellid, combat, combat_container, container_index, instance_container, instance, custom_object) - end if (custom_object:IsSpellTarget()) then