From 2af5440d50c3496defd1d127a21d4b60b4482f5a Mon Sep 17 00:00:00 2001 From: Flamanis Date: Sat, 25 Feb 2023 13:35:04 -0600 Subject: [PATCH 1/3] Statusbar fixes and click showing hidden frame fix --- classes/class_instance.lua | 4 ++-- frames/window_main.lua | 1 + functions/profiles.lua | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/class_instance.lua b/classes/class_instance.lua index 244b2f85..40a15f79 100644 --- a/classes/class_instance.lua +++ b/classes/class_instance.lua @@ -1791,8 +1791,8 @@ local createStatusbarOptions = function(optionsTable) newTable.textColor = optionsTable.textColor newTable.textSize = optionsTable.textSize newTable.textFace = optionsTable.textFace - newTable.textXmod = optionsTable.textXmod - newTable.textYmod = optionsTable.textYmod + newTable.textXMod = optionsTable.textXMod + newTable.textYMod = optionsTable.textYMod newTable.isHidden = optionsTable.isHidden newTable.segmentType = optionsTable.segmentType newTable.textAlign = optionsTable.textAlign diff --git a/frames/window_main.lua b/frames/window_main.lua index 6cc5c9d0..1d55820d 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -803,6 +803,7 @@ local function move_janela(baseframe, iniciando, instancia, just_updating) instancia_alvo:SaveMainWindowPosition() instancia_alvo:RestoreMainWindowPosition() + instancia_alvo:ShutDown() Details.FadeHandler.Fader(instancia_alvo.baseframe, 1) Details.FadeHandler.Fader(instancia_alvo.rowframe, parseRowFrameAlpha(1)) Details.FadeHandler.Fader(instancia_alvo.baseframe.cabecalho.ball, 1) diff --git a/functions/profiles.lua b/functions/profiles.lua index 7bda246d..3bba9574 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -411,6 +411,10 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) instance:RestoreMainWindowPosition() instance:ReajustaGump() --instance:SaveMainWindowPosition() + --Load StatusBarSaved values and options. + instance.StatusBarSaved = instance.StatusBarSaved or {options = {}} + instance.StatusBar.options = instance.StatusBarSaved.options + _detalhes.StatusBar:UpdateChilds (instance) instance:ChangeSkin() else From 5584e2d3c6f67194bed4517b86d84a06eda272a0 Mon Sep 17 00:00:00 2001 From: Flamanis Date: Sat, 25 Feb 2023 13:54:21 -0600 Subject: [PATCH 2/3] Use skin for loading instead of default instance --- functions/profiles.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/profiles.lua b/functions/profiles.lua index 3bba9574..584611b1 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -412,7 +412,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) instance:ReajustaGump() --instance:SaveMainWindowPosition() --Load StatusBarSaved values and options. - instance.StatusBarSaved = instance.StatusBarSaved or {options = {}} + instance.StatusBarSaved = skin.StatusBarSaved or {options = {}} instance.StatusBar.options = instance.StatusBarSaved.options _detalhes.StatusBar:UpdateChilds (instance) instance:ChangeSkin() From 7f51fdf83a65c4c9555dded3040f417f911c0b0b Mon Sep 17 00:00:00 2001 From: Flamanis Date: Mon, 27 Feb 2023 16:53:10 -0600 Subject: [PATCH 3/3] Add Demonhunter and Evoker to DefensiveCooldownSpells. Use LibOpenRaid if possible --- functions/spells.lua | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/functions/spells.lua b/functions/spells.lua index 1d7e2b56..91abaedc 100644 --- a/functions/spells.lua +++ b/functions/spells.lua @@ -3061,11 +3061,31 @@ do } + local cooldownKeys = { --LIB_OPEN_RAID_COOLDOWNS_INFO types + [1] = true, + [2] = true, + [3] = true, + [4] = true, + [5] = true, + [6] = true, + [7] = true, + [8] = true, + } + local getCooldownsForClass = function(class) local result = {} - for spellId, spellInfo in pairs(_G.DetailsFramework.CooldownsInfo) do - if (class == spellInfo.class) then - result[#result+1] = spellId + --Use LibOpenRaid if possible. Otherwise fallback to DF. + if (LIB_OPEN_RAID_COOLDOWNS_INFO) then + for spellId, spellInfo in pairs(LIB_OPEN_RAID_COOLDOWNS_INFO) do + if (class == spellInfo.class and cooldownKeys[spellInfo.type]) then + result[#result+1] = spellId + end + end + else + for spellId, spellInfo in pairs(_G.DetailsFramework.CooldownsInfo) do + if (class == spellInfo.class) then + result[#result+1] = spellId + end end end return result @@ -3073,7 +3093,9 @@ do _detalhes.DefensiveCooldownSpells = { ["DEATHKNIGHT"] = getCooldownsForClass("DEATHKNIGHT"), + ["DEMONHUNTER"] = getCooldownsForClass("DEMONHUNTER"), ["DRUID"] = getCooldownsForClass("DRUID"), + ["EVOKER"] = getCooldownsForClass("EVOKER"), ["HUNTER"] = getCooldownsForClass("HUNTER"), ["MAGE"] = getCooldownsForClass("MAGE"), ["MONK"] = getCooldownsForClass("MONK"),