Commit 4b6cb63f authored by Robin Schoonover's avatar Robin Schoonover

In 8.x, fix map ID display on world map

parent 8145f6db
......@@ -202,12 +202,16 @@ end)
-- World Map
--
hooksecurefunc("WorldMapFrame_UpdateMap", function()
local frame = WorldMapDetailFrame
local display = frame._alltheid_display
if not frame._alltheid_display then
display = frame:CreateFontString(nil, "OVERLAY")
frame._alltheid_display = display
hooksecurefunc(WorldMapFrame, "OnMapChanged", function(self)
local display = self._alltheid_display
if not self._alltheid_display then
-- create a frame that sits on top of map
local displayFrame = CreateFrame("FRAME", nil, WorldMapFrame.ScrollContainer)
displayFrame:SetAllPoints()
-- create text
display = displayFrame:CreateFontString(nil, "OVERLAY")
self._alltheid_display = display
display:SetFontObject(GameFontHighlightLeft)
display:SetJustifyH("LEFT")
display:SetHeight(24)
......@@ -215,5 +219,5 @@ hooksecurefunc("WorldMapFrame_UpdateMap", function()
display:SetPoint("BOTTOMLEFT")
end
display:SetText(addon:IDLine("Map", GetCurrentMapAreaID(), "Continent", GetCurrentMapContinent()))
display:SetText(addon:IDLine("Map", self:GetMapID()))
end)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment