Skip to content

Commit

Permalink
Fix a regression error when in combat (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
mythi-inaro authored Feb 26, 2025
1 parent 99daf3a commit d8e35ff
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions TeleportMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
Expand All @@ -901,7 +902,9 @@ function tpm:ReloadFrames()
secureButton:Recycle()
end

TeleportMeButtonsFrame.reload = true
if TeleportMeButtonsFrame then
TeleportMeButtonsFrame.reload = true
end

createAnchors()
end
Expand Down Expand Up @@ -978,7 +981,6 @@ function tpm:Setup()
tpm:updateHearthstone()
end

createAnchors()
hooksecurefunc("ToggleGameMenu", tpm.ReloadFrames)
end

Expand Down

0 comments on commit d8e35ff

Please sign in to comment.