GetMapNameByID a nil value?
Fixing up some of the addons I use in the face of today's pre-patch release. So far, I'm batting a thousand, but coming across this error:
is a little problematic. I've looked up this API call here and it doesn't indicate it's moved 'tables' (like SendAddonMessage did). Here's the top of the .lua file in question: Is there something else this file needs to allow it to get visibility of GetMapNameByID? (eg. in the C world, a #include, etc). Thanks! |
Ok, so, after finding information at this git repo detailing what seems to be the current API, and this mapping of old IDs to the new format, it looks like I replace
With something like: .. or some more condensed lua-ism (not very familiar with the language yet) |
The whole map API changed with this patch. Typing "/api mapui" in-game will give you the user-friendly version of the Lua file you linked.
|
Yeah, that's what led me down the path of finding the .lua file with the new API calls.
Unfortunately, I'm not finding a proper replacement for GetWorldMapTransforms(). This function resides in HereBeDragons, which is used by a lot of addons (including TomTom, HandyNotes, etc): Any clues? |
It's unclear what you're eventually trying to do with the transforms, but my guess is that C_Map.GetWorldPosFromMapPos and C_Map.GetMapPosFromWorldPos would the best replacements.
|
I'm unclear as well. This is not code I wrote, it's part of an addon library that multiple addons use. I'm just trying to fix it in the face of the new API changes.
It would help if I knew what 'transforms' were in this context. Those other calls you mentioned might be useful, except that this code is looping over a set of ids returned by GetWorlMapTransforms() (and then each id is fed to GetWorldMapTransformInfo() which gets us the various min/max/offset/etc data). It sounds like the GetWorldPosFromMapPos, et al, functions would be useful for that second step, but I'm not sure where to get the list of things to feed them. If I knew what the ids represented that GetWorldMapTransforms() returned, that might help, but I can't find anything meaningful on that function anywhere. :( |
Did you try an updated version of the library?
https://www.curseforge.com/wow/addons/herebedragons |
All times are GMT -6. The time now is 05:21 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI