Originally Posted by SnowmanDK
I can say that what you wrote above returns
worldMap
no matter what map I have showing. I tried while showing Tamriel, Coldharbour, Craglorn and Davon's Watch.
Edit: Now I am slow again
From your edit, then I assume I should make something like this on addon load?:
ZO_PreHookHandler("worldMap", "OnShow", myfunctiononshow)
or did I miss something?
|
Although I still don't understand, why not doing the count upon first tooltip, checking if the world map is shown or about to be shown can be done this way:
Lua Code:
local function WorldMapStateChanged(oldState, newState)
if (newState == SCENE_FRAGMENT_SHOWING) then
elseif (newState == SCENE_FRAGMENT_SHOWN) then
end
end
WORLD_MAP_SCENE:RegisterCallback("StateChange", WorldMapStateChanged)