From 0f7c5393e0c01afe95dc76754c03038497ebb4ac Mon Sep 17 00:00:00 2001 From: Matthijs Groot Date: Wed, 21 Aug 2024 10:19:38 +0200 Subject: [PATCH] TeleportMenu: Prevent creating buttons on login if you're in combat --- TeleportMenu.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TeleportMenu.lua b/TeleportMenu.lua index 34bfd69..a42714f 100644 --- a/TeleportMenu.lua +++ b/TeleportMenu.lua @@ -94,6 +94,7 @@ local function createCooldownFrame(frame) end local function createAnchors() + if InCombatLockdown() or TeleportMeButtonsFrame then return end local buttonsFrame = CreateFrame("Frame", "TeleportMeButtonsFrame", GameMenuFrame) buttonsFrame:SetSize(1, 1) buttonsFrame:SetPoint("TOPLEFT", GameMenuFrame, "TOPRIGHT", 0, 0) @@ -276,6 +277,7 @@ local function OnEvent(self, event, addOnName) TeleportMenuDB.hearthstone = nil end createAnchors() + hooksecurefunc("ToggleGameMenu", createAnchors) end end