View Single Post
12/25/15, 04:16 AM   #28
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by SnowmanDK View Post
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:
  1. local function WorldMapStateChanged(oldState, newState)
  2.         if (newState == SCENE_FRAGMENT_SHOWING) then
  3.         elseif (newState == SCENE_FRAGMENT_SHOWN) then
  4.         end
  5. end
  6. WORLD_MAP_SCENE:RegisterCallback("StateChange", WorldMapStateChanged)
  Reply With Quote