From eba3036d02db0ce3688c4a49c8890c29ef1d79e7 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 17 May 2021 18:37:25 -0300 Subject: [PATCH] Fixes for the latest release --- classes/class_custom.lua | 4 ++-- classes/class_damage.lua | 4 ++-- classes/class_heal.lua | 2 +- classes/class_instance.lua | 5 ----- classes/class_resources.lua | 4 ++-- classes/class_utility.lua | 2 +- frames/window_currentdps.lua | 18 ++++++++++++++++++ plugins/Details_Streamer/Details_Streamer.lua | 3 +-- .../Details_TinyThreat/Details_TinyThreat.lua | 19 ++++++++++++++++++- 9 files changed, 45 insertions(+), 16 deletions(-) diff --git a/classes/class_custom.lua b/classes/class_custom.lua index bdf41cd03..f95fd4b2b 100644 --- a/classes/class_custom.lua +++ b/classes/class_custom.lua @@ -190,7 +190,7 @@ if (force) then if (instance:IsGroupMode()) then for i = 1, instance.rows_fit_in_window do - Details.FadeHandler.Fader (instance.barras [i], "in", 0.3) + Details.FadeHandler.Fader (instance.barras [i], "in", Details.fade_speed) end end end @@ -483,7 +483,7 @@ if (force) then if (instance:IsGroupMode()) then for i = whichRowLine, instance.rows_fit_in_window do - Details.FadeHandler.Fader (instance.barras [i], "in", 0.3) + Details.FadeHandler.Fader (instance.barras [i], "in", Details.fade_speed) end end end diff --git a/classes/class_damage.lua b/classes/class_damage.lua index bc0a1ca8b..6e45fdc6b 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -2136,7 +2136,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex if (forcar) then if (instancia.modo == 2) then --> group for i = 1, instancia.rows_fit_in_window do - Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3) + Details.FadeHandler.Fader (instancia.barras [i], "in", Details.fade_speed) end end end @@ -2370,7 +2370,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex if (forcar) then if (instancia.modo == 2) then --> group for i = whichRowLine, instancia.rows_fit_in_window do - Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3) + Details.FadeHandler.Fader (instancia.barras [i], "in", Details.fade_speed) end end end diff --git a/classes/class_heal.lua b/classes/class_heal.lua index 14d482442..b033edabe 100644 --- a/classes/class_heal.lua +++ b/classes/class_heal.lua @@ -579,7 +579,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo if (forcar) then if (instancia.modo == 2) then --> group for i = whichRowLine, instancia.rows_fit_in_window do - Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3) + Details.FadeHandler.Fader (instancia.barras [i], "in", Details.fade_speed) end end end diff --git a/classes/class_instance.lua b/classes/class_instance.lua index b16ab7ac6..d677d53c7 100644 --- a/classes/class_instance.lua +++ b/classes/class_instance.lua @@ -408,11 +408,6 @@ end self:ResetaGump() - --Details.FadeHandler.Fader (self.baseframe.cabecalho.atributo_icon, _unpack (_detalhes.windows_fade_in)) - --Details.FadeHandler.Fader (self.baseframe.cabecalho.ball, _unpack (_detalhes.windows_fade_in)) - --Details.FadeHandler.Fader (self.baseframe, _unpack (_detalhes.windows_fade_in)) - --Details.FadeHandler.Fader (self.rowframe, _unpack (_detalhes.windows_fade_in)) - Details.FadeHandler.Fader (self.baseframe.cabecalho.ball, 1) Details.FadeHandler.Fader (self.baseframe, 1) Details.FadeHandler.Fader (self.rowframe, 1) diff --git a/classes/class_resources.lua b/classes/class_resources.lua index c35abae56..be4042da0 100644 --- a/classes/class_resources.lua +++ b/classes/class_resources.lua @@ -353,7 +353,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex if (forcar) then if (instancia.modo == 2) then --> group for i = whichRowLine, instancia.rows_fit_in_window do - Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3) + Details.FadeHandler.Fader (instancia.barras [i], "in", Details.fade_speed) end end end @@ -639,7 +639,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex if (forcar) then if (instancia.modo == 2) then --> group for i = whichRowLine, instancia.rows_fit_in_window do - Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3) + Details.FadeHandler.Fader (instancia.barras [i], "in", Details.fade_speed) end end end diff --git a/classes/class_utility.lua b/classes/class_utility.lua index 8254d31ba..114a678c8 100644 --- a/classes/class_utility.lua +++ b/classes/class_utility.lua @@ -864,7 +864,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo if (forcar) then if (instancia.modo == 2) then --> group for i = whichRowLine, instancia.rows_fit_in_window do - Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3) + Details.FadeHandler.Fader (instancia.barras [i], "in", Details.fade_speed) end end end diff --git a/frames/window_currentdps.lua b/frames/window_currentdps.lua index 0b74b18f4..e1490766e 100644 --- a/frames/window_currentdps.lua +++ b/frames/window_currentdps.lua @@ -136,6 +136,21 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel) values = function() return strataTable end, name = "Frame Strata" }, + --speed + { + type = "range", + get = function() return Details.current_dps_meter.sample_size end, + set = function (self, fixedparam, value) + Details.current_dps_meter.sample_size = value + Details:UpdateTheRealCurrentDPSFrame(testUsing) + end, + min = 1, + max = 6, + step = 1, + name = "Speed", + desc = "Low is faster", + text_template = options_text_template, + }, --width { type = "range", @@ -441,6 +456,9 @@ function Details:CreateCurrentDpsFrame(parent, name) --> where the player are if (scenario == "arena") then + + f.SampleSize = _detalhes.current_dps_meter.sample_size + labelPlayerTeam_DPS:Show() labelYellowTeam_DPS:Show() diff --git a/plugins/Details_Streamer/Details_Streamer.lua b/plugins/Details_Streamer/Details_Streamer.lua index 0dc4ac348..d49b9bc62 100644 --- a/plugins/Details_Streamer/Details_Streamer.lua +++ b/plugins/Details_Streamer/Details_Streamer.lua @@ -62,8 +62,7 @@ local default_attack_icon = [[Interface\CURSOR\UnableAttack]] local function CreatePluginFrames() --> shortcut for details fade function - local fader = StreamOverlay.gump.Fade - + local fader = Details.FadeHandler.Fader function StreamOverlay:OnDetailsEvent (event, ...) if (event == "HIDE") then --> plugin hidded, disabled diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.lua b/plugins/Details_TinyThreat/Details_TinyThreat.lua index 134b26504..eb56b2a54 100644 --- a/plugins/Details_TinyThreat/Details_TinyThreat.lua +++ b/plugins/Details_TinyThreat/Details_TinyThreat.lua @@ -5,7 +5,6 @@ local _GetNumSubgroupMembers = GetNumSubgroupMembers --> wow api local _GetNumGroupMembers = GetNumGroupMembers --> wow api local _UnitIsFriend = UnitIsFriend --> wow api local _UnitName = UnitName --> wow api -local _UnitDetailedThreatSituation = UnitDetailedThreatSituation local _IsInRaid = IsInRaid --> wow api local _IsInGroup = IsInGroup --> wow api local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned --> wow api @@ -28,6 +27,23 @@ ThreatMeter:SetPluginDescription ("Small tool for track the threat you and other local _ +local UnitDetailedThreatSituation = UnitDetailedThreatSituation +local _UnitDetailedThreatSituation + +if (DetailsFramework.IsTimewalkWoW()) then + _UnitDetailedThreatSituation = function(source, target) + local isTanking, status, threatpct, rawthreatpct, threatvalue = UnitDetailedThreatSituation(source, target) + + if (threatvalue) then + threatvalue = floor(threatvalue / 100) + end + + return isTanking, status, threatpct, rawthreatpct, threatvalue + end +else + _UnitDetailedThreatSituation = UnitDetailedThreatSituation +end + local function CreatePluginFrames (data) --> catch Details! main object @@ -374,6 +390,7 @@ local function CreatePluginFrames (data) local topThreat = ThreatMeter.player_list_indexes [1] local aggro = topThreat [6] * (CheckInteractDistance ("target", 3) and 1.1 or 1.3) + aggro = max(aggro, 0.001) pullRow:SetLeftText ("Pull Aggro At") local realPercent = _math_floor (aggro / max (topThreat [6], 0.01) * 100)