mapreveal: keep all revealed zones by the gameclient

Only extend with missing unrevealed zones instead of overwriting
the entire map reveal logic of the game. This is required to not
break custom servers/clients that are shipping their own zones.
This commit is contained in:
shagu
2023-12-19 13:26:36 +01:00
parent 3113e9e49a
commit 622e017228
+14 -4
View File
@@ -215,10 +215,20 @@ pfUI:RegisterModule("mapreveal", "vanilla:tbc", function ()
end
end
end
for i = textureCount + 1, NUM_WORLDMAP_OVERLAYS do
_G[string.format("%s%s","WorldMapOverlay",i)]:Hide()
end
end
hooksecurefunc("WorldMapFrame_Update", pfWorldMapFrame_Update, true)
-- hook map reveal functions before and after the actual call
local pfHookWorldMapFrame_Update = _G.WorldMapFrame_Update
_G.WorldMapFrame_Update = function(self)
-- hide all previously set textures
for i = 1, NUM_WORLDMAP_OVERLAYS do
_G[string.format("%s%s","WorldMapOverlay",i)]:Hide()
end
-- let the game put its explored tiles on the map
pfHookWorldMapFrame_Update(self)
-- let the addon extend it with its own data
pfWorldMapFrame_Update()
end
end)