Skip to content

Commit

Permalink
Increase the loading delay more and add Blizzard_Collections as depen…
Browse files Browse the repository at this point in the history
…dency
  • Loading branch information
Justw8 committed Aug 25, 2024
1 parent 858c03a commit cee46bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
14 changes: 9 additions & 5 deletions TeleportMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,13 @@ SlashCmdList["TPMENU"] = function(msg)
end
end

function tpm:Setup()
tpm:updateAvailableHearthstones()
tpm:updateAvailableWormholes()
createAnchors()
hooksecurefunc("ToggleGameMenu", createAnchors)
end

-- Loading
local function OnEvent(self, event, addOnName)
if addOnName == "TeleportMenu" then
Expand All @@ -554,11 +561,8 @@ local function OnEvent(self, event, addOnName)
end
end)
elseif event == "PLAYER_LOGIN" then
C_Timer.After(0.5, function() -- Delay so things can load?
tpm:updateAvailableHearthstones()
tpm:updateAvailableWormholes()
createAnchors()
hooksecurefunc("ToggleGameMenu", createAnchors)
C_Timer.After(3, function() -- Delay so things can load?
tpm:Setup()
end)
end
end
Expand Down
1 change: 1 addition & 0 deletions TeleportMenu.toc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
## Author: Justwait
## Version: @project-version@
## SavedVariables: TeleportMenuDB
## Dependencies: Blizzard_Collections

## X-Curse-Project-ID: 1087836

Expand Down

0 comments on commit cee46bf

Please sign in to comment.