Originally Posted by LanceDH
Lua Code:
hooksecurefunc(WorldMapFrame, "OnMapChanged", function() local mapID = WorldMapFrame.mapID; end);
|
Well, that is indeed one option i will try
Originally Posted by Gello
I'm not comfortably fluent in the new map yet, but you could also create a data provider (which you may already have if you're putting stuff on the map):
Code:
-- mixin is at Interface\AddOns\Blizzard_MapCanvas_DataProviderBase.lua
dataProvider = CreateFromMixins(MapCanvasDataProviderMixin)
-- the RefreshAllData() method is called in the default implementation
function dataProvider:OnMapChanged()
print("OnMapChanged")
end
WorldMapFrame:AddDataProvider(dataProvider)
|
I did not even touch the blizz mixins at all, since i simply did not understand them. But it looks kinda easy. I'll give it a shot!
Thanks @ you both!