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:
-- Step 1: Wait for the flight map to be created
-- Step 2: Any time the flight map appears, enumerate through every flight path pin and do steps 3 and 4 at least once
-- Step 3: Make each pin shown, and prevent the the OnMouseEnter/OnMouseLeave events from overriding this
-- Step 4: Undersea nodes in Vashj'ir will not play nice, so override the click handler
-- Step 5: Also because of Vashj'ir, change the tooltip text just a little
-- STEP 1:
local alreadyHooked
hooksecurefunc("FlightMap_LoadUI", function()
if (alreadyHooked) then
return
else
alreadyHooked = true
-- STEP 2:
FlightMapFrame:HookScript("OnShow", function()
for pin in FlightMapFrame:EnumeratePinsByTemplate("FlightMap_FlightPointPinTemplate") do
if (pin.alreadyHooked == nil) then
pin.alreadyHooked = true
-- STEP 3:
pin:Show()
pin.SetShown = pin.Show
-- STEP 4:
function pin:OnClick(button)
if button == "LeftButton" and self.taxiNodeData.state == Enum.FlightPathState.Reachable then
TakeTaxiNode(self.taxiNodeData.slotIndex);
end
end
end
end
end)
end
end)
-- Instead of saying 'not discovered' it will say 'not available'
TAXI_PATH_UNREACHABLE = ADDON_NOT_AVAILABLE
You are correct about Draenor. Here's the source code for that one:
https://www.townlong-yak.com/framexm...xiFrame.lua#32