Posted by Katae on Mon 23 Nov 01:49
report abuse | download | new post
- local cf, coordX, coordY, Coords
- if modules.Coords.enabled or modules.Location.enabled then
- cf, coordX, coordY = CreateFrame'frame', 0, 0
- cf:RegisterEvent'ZONE_CHANGED_NEW_AREA'
- cf:SetScript("OnUpdate", function() coordX, coordY = GetPlayerMapPosition'player' end)
- cf:SetScript("OnEvent", function(self, event, ...) if not WorldMapFrame:IsShown() then SetMapToCurrentZone() end end)
- WorldMapFrame:HookScript("OnHide", SetMapToCurrentZone)
- function Coords() return format(modules.Coords.fmt or "%d,%d", coordX*100, coordY*100) end
- end
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.