WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Astrolabe bug? (https://www.wowinterface.com/forums/showthread.php?t=50496)

myrroddin 11-17-14 07:16 PM

Astrolabe bug?
 
I see change logs for various AddOns saying that they are switching to a different API in TomTom to work around a bug in Astrolabe. The API now being used starts on line 879 of TomTom.lua
Code:

function TomTom:AddMFWaypoint(m, f, x, y, opts)
My questions are:
  1. What is the nature of the bug in Astrolabe? What was the code supposed to do, and what is it doing instead?
  2. Where in Astrolabe's code is the bug found? Which API, Lua file, line number?
  3. Why does using TomTom's API bypass the bug?
  4. Does Esamynn know?
Thank you for any help. :)

Phanx 11-17-14 11:43 PM

Quote:

Originally Posted by myrroddin (Post 300591)
Where in Astrolabe's code is the bug found? Which API, Lua file, line number?

The bug is in TomTom's "AddZWaypoint" method, which is why addons are switching to its "AddMFWaypoint" method instead. The "Z" stands for zone, while "MF" stands for map and floor. AddZWaypoint takes a continent index and zone index, asks Astrolabe to translate those into a map and floor, and then calls AddMFWaypoint. Based on a quick look in Astrolabe, it looks like the bug is related to Astrolabe not having been updated (completely/properly/maybe at all) for the changes to GetMapContinents and GetMapZones in WoD.

Beyond that, though, I don't know anything, and don't feel any particular inclination to look into it any further. I'm not really sure why you'd use AddZWaypoint anyway... I'd guess all the addons affected were actually using AddWaypoint, which grabs the current continent and map and calls AddZWaypoint internally, so it's really just a lazy way of adding waypoints in the current zone without having to figure out which zone you're in. Not really a big deal to switch, though obviously it is a bug in Astrolabe that should probably get fixed. :p

Cladhaire 11-17-14 11:59 PM

I could change the default AddWaypoint() behaviour to use AddMFWaypoint() if you think that would help, as a short-term workaround?

Phanx 11-18-14 12:23 AM

Well, it won't help me, but it may help other addons that are still using Add(Z?)Waypoint, and the authors who have already switched to AddMFWaypoint might like to go back to doing things the lazier way. :p

myrroddin 11-20-14 01:52 AM

Sorry for the late reply. That makes sense, although I'm not sure why anyone would use zone instead of mapID and floor number. That just sounds like asking for trouble.

Phanx 11-20-14 09:06 PM

Like I said, nobody actually looking up the continent and zone indices and calling AddZWaypoint; they were calling AddWaypoint to add a waypoint in the player's current zone without having to know anything about what zone that actually was.


All times are GMT -6. The time now is 01:52 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI