diff --git a/modules/map.lua b/modules/map.lua index 44bea54b..2f6d0c4b 100644 --- a/modules/map.lua +++ b/modules/map.lua @@ -33,6 +33,10 @@ pfUI:RegisterModule("map", function () local alpha = C.position["WorldMapFrame"].alpha local scale = C.position["WorldMapFrame"].scale + -- the hooks go on once, however often the loader runs: turtle-wow.lua also + -- calls it, outside of an event + local hooked + local pfMapLoader = CreateFrame("Frame") pfMapLoader:RegisterEvent("PLAYER_ENTERING_WORLD") pfMapLoader:SetScript("OnEvent", function() @@ -46,9 +50,8 @@ pfUI:RegisterModule("map", function () WorldMapFrame:EnableMouse(true) WorldMapFrame:RegisterForDrag("LeftButton") - -- make sure the hooks get only applied once - if not this.hooked then - this.hooked = true + if not hooked then + hooked = true WorldMapFrame:HookScript("OnShow", function() -- customize diff --git a/modules/turtle-wow.lua b/modules/turtle-wow.lua index d2cf0eb1..1d1adc74 100644 --- a/modules/turtle-wow.lua +++ b/modules/turtle-wow.lua @@ -78,10 +78,7 @@ pfUI:RegisterModule("turtle-wow", function () end) end - local delay = CreateFrame("Frame") - delay:SetScript("OnUpdate", function() - this:Hide() - + RunNextFrame(function() -- correct positions of new game menu layout if GameMenuButtonShop and (GameMenuButtonPFUI or GameMenuButtonPFUIAddOns) then -- calculate new offset for the shop button