TomTom

60 - "Enable automatic quest objective waypoints" breaks SetMapZoom()

What steps will reproduce the problem?
1. Deselect the option "Enable automatic quest objective waypoints" and /reload.
2. Run this lua snippet:

/run for k,v in pairs({GetMapContinents()}) do SetMapZoom(k);print(v);print(GetCurrentMapAreaID());print((GetMapInfo())) end

3. Result:
Kalimdor (continent name)
13 (mapID)
Kalimdor (mapfilename)
Eastern Kingdoms
14
Azeroth
Outland
466
Expansion01
Northrend
485
Northrend
The Maelstrom
751
TheMaelstromContinent
4. Select the option "Enable automatic quest objective waypoints".
5. Make sure you have a tracked quest on the current continent that would set an automatic waypoint.
6. /reload
7. Run the lua snippet again

/run for k,v in pairs({GetMapContinents()}) do SetMapZoom(k);print(v);print(GetCurrentMapAreaID());print((GetMapInfo())) end

8. Result:
Kalimdor (continent name)
13 (mapID)
Kalimdor (mapfilename)
Eastern Kingdoms
301
Stormwind
Outland
466
Expansion01
Northrend
485
Northrend
The Maelstrom
751
TheMaelstromContinent

What is the expected output? What do you see instead?
I expect consistent results from the map functions, instead TomTom resets SetMapZoom(x) to the current zone making the following map functions return mismatched results.

What version of the product are you using?
v40300-1.4.4

Do you have an error log of what happened?
There are no lua errors.

Please provide any additional information below.
I came across this behavior while trying to debug issues with Archy's map info caching function.
After a lot back and forth with Archy users we were able to determine it is this TomTom option that breaks it.
After that was determined it was easy to reproduce the map issue with just TomTom enabled.

User When Change
Dridzt Mar 16, 2012 at 03:41 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 6 comments
  • Avatar of Cladhaire Cladhaire Oct 20, 2014 at 18:14 UTC - 0 likes

    Yes, that function was removed. I know this is broken, I just need to be able to spend time to be able to fix it. Please be patient.

  • Avatar of squiretoad squiretoad Oct 20, 2014 at 18:10 UTC - 0 likes

    I've confirmed the problem is in the API SetMapZoom() function. I threw in a debug line to display the values in Archy using this function and got this:

    for continent_id, continent_name in pairs(MAP_CONTINENTS) do

    Archy:Print("Archy: Continent_id: [" .. continent_id .. "], name: [" .. continent_name .. "]") debug [[ 13 Kalimdor 14 Eastern 466 Outland 485 Northrend and then an error ]]--

    _G.SetMapZoom(continent_id)

    SetMapZoom choked on the 485 value (which indeed is WAY out of the range of values in the SetMapZoom() function documentation. So .. who fixes APIs?

  • Avatar of Cladhaire Cladhaire Jul 08, 2012 at 10:53 UTC - 0 likes

    I'd love to get this fixed, but I am not 100% sure how to do it.. any ideas?

  • Avatar of Dridzt Dridzt Mar 22, 2012 at 02:28 UTC - 0 likes

    The confusion is probably my fault, the problem is not a result of TomTom calling SetMapZoom() at least I don't think so.

    "Something" in ObjectivesChanged() function in TomTom\TomTom_POIIntegration.lua is causing the map to continuously reset SetMapZoom() as if SetMapToCurrentZone() was instantly called.

    Could very well be a side-effect of one of the QuestPoi* Blizzard functions I didn't trace it in such detail.

    ObjectivesChanged() runs in an OnUpdate due to the WatchFrame_Update securehook and the behavior is what I described above.

    Calling SetMapZoom() from another addon or a lua script gets instantly reset so it can't be used to get relevant map information at the desired zoom level.

    Last edited Mar 22, 2012 by Dridzt
  • Avatar of Cladhaire Cladhaire Mar 21, 2012 at 23:56 UTC - 0 likes

    I am quite confused though, given that there are *very* few instances of SetMapZoom() in TomTom at all, and I certainly don't see any immediately in the POI integration (TomTom_POIIntegration.lua). But I'm looking.

  • Avatar of Cladhaire Cladhaire Mar 21, 2012 at 23:55 UTC - 0 likes

    I'll have to look into this further, but I don't know when I'll next have an opportunity.

  • 6 comments

Facts

Last updated
Mar 30, 2012
Reported
Mar 16, 2012
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
1

Reported by

Possible assignees