Skip to content

Commit

Permalink
TeleportMenu: Prevent creating buttons on login if you're in combat
Browse files Browse the repository at this point in the history
  • Loading branch information
Justw8 committed Aug 21, 2024
1 parent a817d74 commit 0f7c539
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TeleportMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -276,6 +277,7 @@ local function OnEvent(self, event, addOnName)
TeleportMenuDB.hearthstone = nil
end
createAnchors()
hooksecurefunc("ToggleGameMenu", createAnchors)
end
end

Expand Down

0 comments on commit 0f7c539

Please sign in to comment.