From 83afabf3c084f01d77415780db06ce8411e220b1 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 31 Oct 2022 10:44:31 +0100 Subject: [PATCH] map: restore scale and position when shown Set the scale to previous or 0.85 because the game default scripts set it to fullscreen scale each time. Additionaly, as the hook is now in place, it is no longer required to manually run the default functions when the map gets shown. --- modules/map.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/map.lua b/modules/map.lua index 8e690f8f..7b361b8f 100644 --- a/modules/map.lua +++ b/modules/map.lua @@ -48,16 +48,12 @@ pfUI:RegisterModule("map", "vanilla:tbc", function () this.hooked = true HookScript(WorldMapFrame, "OnShow", function() - -- default events - UpdateMicroButtons() - PlaySound("igQuestLogOpen") - CloseDropDownMenus() - SetMapToCurrentZone() - WorldMapFrame_PingPlayerPosition() - -- customize this:EnableKeyboard(false) this:EnableMouseWheel(1) + + -- set back to default scale + WorldMapFrame:SetScale(scale or .85) end) HookScript(WorldMapFrame, "OnMouseWheel", function()