View Single Post
10-29-20, 04:07 PM   #4
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
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:
  1. -- Step 1: Wait for the flight map to be created
  2. -- Step 2: Any time the flight map appears, enumerate through every flight path pin
  3. -- Step 3: Make each pin shown, and prevent the the OnMouseEnter/OnMouseLeave events from overriding this
  4.  
  5.  
  6. -- STEP 1:
  7. local alreadyHooked
  8. hooksecurefunc("FlightMap_LoadUI", function()
  9.     if (alreadyHooked) then
  10.         return
  11.     else
  12.         alreadyHooked = true
  13.        
  14.         -- STEP 2:
  15.         FlightMapFrame:HookScript("OnShow", function()
  16.             for pin in FlightMapFrame:EnumeratePinsByTemplate("FlightMap_FlightPointPinTemplate") do
  17.                 -- STEP 3:
  18.                 pin:Show()
  19.                 pin.SetShown = pin.Show
  20.             end
  21.         end)
  22.     end
  23. end)


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.
  Reply With Quote