From d8e35ff89248491d12cf700351bba3a1cafb7edc Mon Sep 17 00:00:00 2001 From: Mythi <67101689+mythi-inaro@users.noreply.github.com> Date: Wed, 26 Feb 2025 23:34:58 +0100 Subject: [PATCH] Fix a regression error when in combat (#90) --- TeleportMenu.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/TeleportMenu.lua b/TeleportMenu.lua index 0637e83..e95605a 100644 --- a/TeleportMenu.lua +++ b/TeleportMenu.lua @@ -778,9 +778,7 @@ function tpm:updateHearthstone() end local function createAnchors() - if InCombatLockdown() then - return - elseif TeleportMeButtonsFrame and not TeleportMeButtonsFrame.reload then + if TeleportMeButtonsFrame and not TeleportMeButtonsFrame.reload then if not db["Enabled"] then TeleportMeButtonsFrame:Hide() return @@ -886,6 +884,9 @@ local function createAnchors() end function tpm:ReloadFrames() + if InCombatLockdown() then + return + end if db["Button:Size"] then globalWidth = db["Button:Size"] globalHeight = db["Button:Size"] @@ -901,7 +902,9 @@ function tpm:ReloadFrames() secureButton:Recycle() end - TeleportMeButtonsFrame.reload = true + if TeleportMeButtonsFrame then + TeleportMeButtonsFrame.reload = true + end createAnchors() end @@ -978,7 +981,6 @@ function tpm:Setup() tpm:updateHearthstone() end - createAnchors() hooksecurefunc("ToggleGameMenu", tpm.ReloadFrames) end