Scaling C_TaxiMap Node to Fit Flight Path Map
2 Attachment(s)
Hey everyone. Pretty new to making addons and I hit a bump with one project of mine.
I want to get all taxi node info and then put some pins on flight path map where the player doesn't have the flight path yet. I got all the nodes with C_TaxiMap. The data comes with a Vector2D object https://wow.gamepedia.com/Vector2DMixin I use GetXY() to get the X and Y, but when I then try and put them on the map, I can tell I have the correct shape as seen here: (For testing, I used the nodes that are Reachable==1 (known) for now). Top top exclamation is the Argent Tournament, the one off to the left is Warsong Hold, etc. But the scale is off, and I'm not sure how to expand it properly. I found this code to put a exclamation on the map just to test for now https://www.wowinterface.com/forums/...93&postcount=4 Code:
local frameT = FlightMapFrame Thanks! |
https://www.townlong-yak.com/framexm...taProvider.lua
This is how FlightMapFrame populates presently. Line 138 is important: pin:SetPosition() I wonder what would happen if you just did this for fun: Lua Code:
|
Could you explain where to put those? I'm afraid I don't really understand them all that well.
|
I had more time to do some toying around, and here's a simple solution. I believe the flight paths are already marked, just invisible and changed to a different icon. They appear briefly when you mouse over other paths, if it requires going past a location you haven't discovered.
So the solution is just to make them appear, and stop the game from re-hiding them. Lua Code:
PS. This is the complete addon, minus the TOC file of course. I tested briefly with an alt who had a couple unknown flight paths and it seemed to work. |
Wow, yeah that totally works and even less lines than mine. I was going to put the completed addon on Curse but it isn't right for me to do by just copying what you have so I will look into seeing how I can overwrite the textures with something else first. I'd credit you in the description for helping too.
Edit: It doesn't work with Draenor I don't think. /fstack shows the frame is named something else, it also looks and appears differently than the rest of the game. I'll fix it to work with that as well. |
Further testing: underwater nodes in Vashj'ir do not play nice with above-water nodes in the Eastern Kingdoms. A few extra lines of code can solve that problem...
Lua Code:
You are correct about Draenor. Here's the source code for that one: https://www.townlong-yak.com/framexm...xiFrame.lua#32 |
And I got the WoD map working too. The nodes start at "TaxiButton1" and keep increasing from there.
If you don't mind, I might include this in my own addon as well. It seems like a handy feature to keep refining. Lua Code:
|
You've done all of it so you don't have to ask.
|
All times are GMT -6. The time now is 02:01 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI