Hello
I use Zonemap scaled at 0.9 cause it fits perfectly into my UI that way. The problem is, everytime I log in and after every reload, it resets to 1.0 reason why I made a macro of that set scale command to hit everytime, but it’s getting a bit annoying.
/run BattlefieldMapFrame:SetScale(0.9)
A few weeks ago, while searching how to solve another issue I had then with Zonemap, I found this topic providing the solution with a script/addon that runs the above commands (resets the position of zonemap) automatically when logging in
/run BattlefieldMapFrame:ClearAllPoints()
/run BattlefieldMapFrame:SetPoint("CENTER", UIParent, -200, 200)
reset Zonemap to centre script
open SPOILER
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(self, event, addon)
if addon == "Blizzard_BattlefieldMap" then
self:UnregisterAllEvents()
hooksecurefunc(BattlefieldMapTab, "SetPoint", function(self)
if self.OnHook then
self.OnHook = nil
return
end
self.OnHook = true
self:ClearAllPoints()
self:SetPoint("CENTER", UIParent, -200, 200)
end)
end
end)
This script/addon adapted for SetScale would be THE solution but… I have no such skills, I can barely guess by reading the code, compare to the commands and try do some puzzle copy-paste work and hope it’s not too far away from how it should be… something like
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(self, event, addon)
if addon == "Blizzard_BattlefieldMap" then
self:SetScale(0.9)
end)
So I was hoping somoene could help me out write it down correctly? Thankyouverymuch