I'd swear I used to have a bookmark to a site that didn't just list functions etc that had been deleted from the API, but also listed what to replace them with. But I've been through all my WoW-related bookmarks and none of them are what I'm looking for. Does anyone else know what I'm talking about and have the link?
The type of info I'm looking for is, "GetCurrentMapDungeonLevel() is deleted, use xxxx instead". Highly likely the Blizzard devs have something like that, but I'm sure I've seen something similar in the past on a site us normal(?) people can get to.
Simplest thing to do is this:
Download and install Notepad++
Go to https://www.townlong-yak.com/framexml/live/ and download the current build.
Go to that same site and navigate backwards to the last 7.3.5 build and download that.
Unzip each those into its own directory.
Open Notepad++ and (after doing whatever customization you want to do - like setting the default language to Lua for instance) use "Search in Files" to find GetCurrentMapDungeonLevel in the last 7.3.5 version of FrameXML.
Make a note of a few places where that's used.
Then go into the 8.0.1 version of FrameXML and look at those same places and see what is used instead.
That said, for map stuff, it appears to have been completely rewritten. There doesn't seem to be much overlap between 7.3.5 and 8.0.1 at all - maybe 20% of the code.
Blizzard's developers have apparently gotten themselves a new hammer (mixins) and everything they touch looks like nail now.
I'm still trying to wrap my head around exactly how those work. I got the spell and item ones sorted out, but the map ones I haven't a clue about, yet.
Download and install Notepad++
Go to https://www.townlong-yak.com/framexml/live/ and download the current build.
Go to that same site and navigate backwards to the last 7.3.5 build and download that.
Unzip each those into its own directory.
Open Notepad++ and (after doing whatever customization you want to do - like setting the default language to Lua for instance) use "Search in Files" to find GetCurrentMapDungeonLevel in the last 7.3.5 version of FrameXML.
Make a note of a few places where that's used.
Then go into the 8.0.1 version of FrameXML and look at those same places and see what is used instead.
That said, for map stuff, it appears to have been completely rewritten. There doesn't seem to be much overlap between 7.3.5 and 8.0.1 at all - maybe 20% of the code.
Blizzard's developers have apparently gotten themselves a new hammer (mixins) and everything they touch looks like nail now.
I'm still trying to wrap my head around exactly how those work. I got the spell and item ones sorted out, but the map ones I haven't a clue about, yet.
Try either -
https://wow.gamepedia.com/Patch_8.0.1/API_changes
or searching on gamepedia with the old function name. Sometimes they'll redirect the old article to the new function.
Otherwise you'll need to go splunking in code as advised above.
https://wow.gamepedia.com/Patch_8.0.1/API_changes
or searching on gamepedia with the old function name. Sometimes they'll redirect the old article to the new function.
Otherwise you'll need to go splunking in code as advised above.
Thanks for the hints, I may give that a try over the weekend.
I've seen references to mixins while doing code searching (I did the console export thing so I have that code) but the term is new to me (and I've been developing for decades). They look just like any other function library, but as you said it's not obvious how they're used. Is there a doc somewhere that explains what a mixin is and in general how it's intended to be used?
I've seen references to mixins while doing code searching (I did the console export thing so I have that code) but the term is new to me (and I've been developing for decades). They look just like any other function library, but as you said it's not obvious how they're used. Is there a doc somewhere that explains what a mixin is and in general how it's intended to be used?
A mixin, from the little bit that I've been able to glean that's standard among mixins, is apparently an abstraction layer similar to the way an object is an abstraction layer but without the formal discipline of objects.07/26/2018 09:59 PMPosted by BaltharaghIs there a doc somewhere that explains what a mixin is and in general how it's intended to be used?
The spell and item mixins are freaking brilliant, as far as I've been able to tell. I had code that went on for pages in my addon that I replaced with almost nothing using them.
The mixins in question there reduce the amount of information you're guaranteed to get back from GetItemInfo and GetSpellInfo in exchange for triggering a user-specified function that fires when the requested, but not immediately delivered data becomes available.
That and judicious use of some flags and I spin through my inventory, macro library, spellbook, and action buttons without worrying about ...did I overload the throttle and start getting back nils.
Code your "followup" function correctly, set your flags, fire up the loop, keep track of whether or not you have any "followup" function executions pending, and walk away.
I'm sure I'll get the hang of the map and other mixins, but for now, I haven't quite been able to wrap my head around it all. It's just that it makes for some very terse code in places that I don't precisely understand what's happening.
07/26/2018 08:11 PMPosted by BaltharaghThe type of info I'm looking for is, "GetCurrentMapDungeonLevel() is deleted, use xxxx instead". Highly likely the Blizzard devs have something like that, but I'm sure I've seen something similar in the past on a site us normal(?) people can get to.
Could this be from HereBeDragons ?
Because Nevcariel's put out an update for that one. As well as a 1.0 and 2.0 version of the library.
GetCurrentMapDungeonLevel() is canonical, but it's gone.
I found it in the Battleground Map, World Map, Quest Map, and Minimap modules in 7.3.5.
When I went into the same modules for 8.0.1, however, the routines were unrecognizably different.
I found it in the Battleground Map, World Map, Quest Map, and Minimap modules in 7.3.5.
When I went into the same modules for 8.0.1, however, the routines were unrecognizably different.
07/26/2018 11:18 PMPosted by EhiztariGetCurrentMapDungeonLevel() is canonical, but it's gone.
HereBeDragons1.0 has a call that returns which level of map a player is on
If the OP is writing an addon and needs to use GetCurrentMapDungeonLevel they could try using HBD:GetPlayerZone() instead.
https://www.wowace.com/projects/herebedragons/pages/api/here-be-dragons-1-0
07/26/2018 11:26 PMPosted by Bluspacecow07/26/2018 11:18 PMPosted by EhiztariGetCurrentMapDungeonLevel() is canonical, but it's gone.
If the OP is writing an addon and needs to use GetCurrentMapDungeonLevel they could try using HBD:GetPlayerZone() instead.
https://www.wowace.com/projects/herebedragons/pages/api/here-be-dragons-1-0
I'm not writing one, just trying to update one of my favorites that may or may not have been abanoned (I know it uses Astrolabe which has been abandoned, so if anyone knows of a current workalike that could help as well).
Appreciate all the info, it'll give me something to do this weekend 8^)
Such an optimist.07/27/2018 01:53 PMPosted by Baltharaghthis weekend 8^)
I looked at that map replacement code.
It's gonna take more than finding new function names.
Blizzard did a LOT of work on that API and it's very, very differently structured now.
07/27/2018 03:13 PMPosted by EhiztariSuch an optimist.07/27/2018 01:53 PMPosted by Baltharaghthis weekend 8^)
[/quote]
Never said I'd finish this weekend 8^)
07/27/2018 01:53 PMPosted by BaltharaghI'm not writing one, just trying to update one of my favorites that may or may not have been abanoned (I know it uses Astrolabe which has been abandoned, so if anyone knows of a current workalike that could help as well).
*points at HBD*
Yes, HereBeDragons is going to be very helpful to you if you want to see what the new map APIs do.
Basically there are no such things as dungeon levels any more. Each map, including each dungeon level map has its own map id. Therefore, one only need worry about a map id, and not the combination of map id and dungeon level.
You can ask the WorldMapFrame what map it is showing, but you are not going to get an event for when the map changes. If you want to display things on the map you will need to become a data provider for the map, and this is really cool as the map just asks you to provide data each time the map changes, and in the routine it calls you can ask the map what the map id is and make your decision on what to have the map show.
Characters are now in multiple "zones" at the same time. For example, you can be in a dungeon, in a zone, in a continent in the world. In each of those maps you have coordinates. You can get the "best" map area which will be in the example above the specific dungeon floor you are on, but you can get each of the maps all the way up to the top.
Note that getting coordinates for the player returns a table, which takes up memory, which will be eventually cleaned by the garbage collector. This is annoying, but there is a workaround that I saw elcius post a while back.
Basically there are no such things as dungeon levels any more. Each map, including each dungeon level map has its own map id. Therefore, one only need worry about a map id, and not the combination of map id and dungeon level.
You can ask the WorldMapFrame what map it is showing, but you are not going to get an event for when the map changes. If you want to display things on the map you will need to become a data provider for the map, and this is really cool as the map just asks you to provide data each time the map changes, and in the routine it calls you can ask the map what the map id is and make your decision on what to have the map show.
Characters are now in multiple "zones" at the same time. For example, you can be in a dungeon, in a zone, in a continent in the world. In each of those maps you have coordinates. You can get the "best" map area which will be in the example above the specific dungeon floor you are on, but you can get each of the maps all the way up to the top.
Note that getting coordinates for the player returns a table, which takes up memory, which will be eventually cleaned by the garbage collector. This is annoying, but there is a workaround that I saw elcius post a while back.
GetCurrentMapDungeonLevel used to give you the 4 sides of the map in yards for instances and micros, is there a replacement?
GetCurrentMapZone also used to give you the 4 sides of the map in yards for outdoor zones. It's apparent replacement, C_Map.GetMapRectOnMap, simply yields the 4 sides of the map in terms of fractions of it's parent's map, no longer in yards.
How can addons measure distances if map borders are no longer given in yards? I do have map yardage data on the first few expansions recorded, but not on the latest expansions.
GetCurrentMapZone also used to give you the 4 sides of the map in yards for outdoor zones. It's apparent replacement, C_Map.GetMapRectOnMap, simply yields the 4 sides of the map in terms of fractions of it's parent's map, no longer in yards.
How can addons measure distances if map borders are no longer given in yards? I do have map yardage data on the first few expansions recorded, but not on the latest expansions.
Just found out that UnitPosition("player") yields the x,y continent yard coordinates of the player. Now I just need to sub map borders in terms of the continent yard coordinates, like in the past wow versions.