From cee46bf7fcbac002e91b5e9db284750c19af640e Mon Sep 17 00:00:00 2001 From: Matthijs Groot // Justwait Date: Sun, 25 Aug 2024 12:02:43 +0200 Subject: [PATCH] Increase the loading delay more and add Blizzard_Collections as dependency --- TeleportMenu.lua | 14 +++++++++----- TeleportMenu.toc | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/TeleportMenu.lua b/TeleportMenu.lua index 11c0f7e..0e80ef9 100644 --- a/TeleportMenu.lua +++ b/TeleportMenu.lua @@ -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 @@ -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 diff --git a/TeleportMenu.toc b/TeleportMenu.toc index c95779b..327c3b2 100644 --- a/TeleportMenu.toc +++ b/TeleportMenu.toc @@ -6,6 +6,7 @@ ## Author: Justwait ## Version: @project-version@ ## SavedVariables: TeleportMenuDB +## Dependencies: Blizzard_Collections ## X-Curse-Project-ID: 1087836