From ca47795c1d683b8e8b6d7bfa16952c141e2680f4 Mon Sep 17 00:00:00 2001 From: Sattva Date: Fri, 23 Feb 2024 20:51:43 +0300 Subject: [PATCH] ManageBuffs - fix WeaponEnchants buff not moving / conflicting --- Changelog and Notes.txt | 8 ++++++++ Leatrix_Plus.lua | 25 ++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Changelog and Notes.txt b/Changelog and Notes.txt index cea810b..1a53a5d 100644 --- a/Changelog and Notes.txt +++ b/Changelog and Notes.txt @@ -14,6 +14,8 @@ IsMoviePlayable() Minimap - MoveCombinedFrame - after reload became too small and un-clickable... +Minimap - Hide POI ARROWS Tweak. + -------------------------------------------------------------------------------- -- What needs to be tested: @@ -178,6 +180,12 @@ AutoGossip - Add https://wowhead.com/wotlk/search?q=Surristrasz to ignore the di MediaPlayer - resolve videos issue, they are not playing. +UnitFrames - make them movable with Shift+Ctrl held. + +UnitFrames - make them auto-hidden while not in combat (but full mana or health, conditions) + +Chat - Clear Chat button / dropdown. + -------------------------------------------------------------------------------- ---- Things to include in presentation -------------------------------------------------------------------------------- diff --git a/Leatrix_Plus.lua b/Leatrix_Plus.lua index 22ad36c..e67f2c7 100644 --- a/Leatrix_Plus.lua +++ b/Leatrix_Plus.lua @@ -4305,7 +4305,7 @@ if LeaPlusLC["CombineAddonButtons"] == "On" then LeaPlusLC:MakeTx(SideMinimap, "Minimap buttons scale", 356, -212) - LeaPlusLC:MakeSL(SideMinimap, "MiniAddonPanelScale", "Drag to adjust scale of the Minimap Combined Addons button frame.", 0, 2, 0.1, 356, -232, "%.2f") + LeaPlusLC:MakeSL(SideMinimap, "MiniAddonPanelScale", "Drag to adjust scale of the Minimap Combined Addons button frame.", 0, 2, 0.01, 356, -232, "%.2f") end @@ -10938,9 +10938,18 @@ BuffFrame:SetDontSavePosition(true) BuffFrame:SetClampedToScreen(true) + TemporaryEnchantFrame:SetMovable(true) + TemporaryEnchantFrame:SetUserPlaced(true) + TemporaryEnchantFrame:SetDontSavePosition(true) + TemporaryEnchantFrame:SetClampedToScreen(true) + -- Set buff frame position at startup BuffFrame:ClearAllPoints() + TemporaryEnchantFrame:ClearAllPoints() + BuffFrame:SetPoint(LeaPlusLC["BuffFrameA"], UIParent, LeaPlusLC["BuffFrameR"], LeaPlusLC["BuffFrameX"], LeaPlusLC["BuffFrameY"]) + TemporaryEnchantFrame:SetPoint(LeaPlusLC["BuffFrameA"], UIParent, LeaPlusLC["BuffFrameR"], LeaPlusLC["BuffFrameX"], LeaPlusLC["BuffFrameY"]) + BuffFrame:SetScale(LeaPlusLC["BuffFrameScale"]) TemporaryEnchantFrame:SetScale(LeaPlusLC["BuffFrameScale"]) ConsolidatedBuffs:SetScale(LeaPlusLC["BuffFrameScale"]) @@ -10966,17 +10975,26 @@ local isBuffFrameMoving = false local buffFrameSetPoint = BuffFrame.SetPoint + local tempEnchSetPoint = TemporaryEnchantFrame.SetPoint BuffFrame.SetPoint = function(self, ...) if not InCombatLockdown() and not isBuffFrameMoving then buffFrameSetPoint(self, LeaPlusLC["BuffFrameA"], UIParent, LeaPlusLC["BuffFrameR"], LeaPlusLC["BuffFrameX"], LeaPlusLC["BuffFrameY"]) end end + + TemporaryEnchantFrame.SetPoint = function(self, ...) + if not InCombatLockdown() and not isBuffFrameMoving then + tempEnchSetPoint(self, LeaPlusLC["BuffFrameA"], UIParent, LeaPlusLC["BuffFrameR"], LeaPlusLC["BuffFrameX"], LeaPlusLC["BuffFrameY"]) + end + end + dragframe:SetScript("OnMouseDown", function(self, btn) -- Start dragging if left clicked if btn == "LeftButton" then isBuffFrameMoving = true BuffFrame:StartMoving() + TemporaryEnchantFrame:StartMoving() end end) @@ -10988,6 +11006,11 @@ BuffFrame:SetMovable(true) BuffFrame:ClearAllPoints() BuffFrame:SetPoint(LeaPlusLC["BuffFrameA"], UIParent, LeaPlusLC["BuffFrameR"], LeaPlusLC["BuffFrameX"], LeaPlusLC["BuffFrameY"]) + + TemporaryEnchantFrame:StopMovingOrSizing() + TemporaryEnchantFrame:SetMovable(true) + TemporaryEnchantFrame:ClearAllPoints() + TemporaryEnchantFrame:SetPoint(LeaPlusLC["BuffFrameA"], UIParent, LeaPlusLC["BuffFrameR"], LeaPlusLC["BuffFrameX"], LeaPlusLC["BuffFrameY"]) end) ---- Snap-to-grid