WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Whistle Master (https://www.wowinterface.com/forums/showthread.php?t=56561)

flow0284 08-17-18 04:59 AM

Whistle Master
 
Hi,

could anyone help to fix the addon Whistle Master? I am no lua expert, maybe some help with the Flightmap POIs ould help me a lot.

To fix this addon should be very easy for the experts in this forum.


BR
flow

candrid 08-17-18 06:49 AM

When running it - I get two general problems.

1) - The WORLD_MAP_UPDATE event is invalid. That means it isn't firing like it is supposed to. Perhaps that event was changed in 8.0.1.

2) - There is an issue loading LibStub. LibStub is used to work with many addons. I did not really look to see if it was included or not but it is needed to be in the location referenced or it won't run.

Otherwise the addon works? (at least for me)

flow0284 08-17-18 07:40 AM

When you are in a Legion zone you should se on your worldmap a green circle around the next nearest flightpoint where the whistle will bring you.

so the function GetPlayerMapPosition() is no longer valid. so there i can use C_Map.GetPlayerMapPosition() in combination with C_Map.GetBestMapForUnit()

but(!) i found nothing for GetNumMapLandmarks() and GetMapLandmarkInfo() to gather the taxinode pois

Lua Code:
  1. local function GetNode()
  2.     local node
  3.     local distance
  4.     local index
  5.     for k = 1, GetNumMapLandmarks() do
  6.         local n = {}
  7.         n.type, n.name, n.description, n.textureIndex, n.x, n.y = GetMapLandmarkInfo(k)
  8.         if n.type == LE_MAP_LANDMARK_TYPE_TAXINODE then --LE_MAP_LANDMARK_TYPE_TAXINODE is a constant defined by Blizzard
  9.             local d = GetDistance(n.x, n.y)
  10.             if distance == nil or d < distance then
  11.                 n.index = k
  12.                 distance = d
  13.                 node = n
  14.             end
  15.         end
  16.     end
  17.     return node
  18. end

yoshimo 09-10-18 12:42 PM

Maybe scanning the taximap and caching C_TaxiMap:GetAllTaxiNodes() might help out?


All times are GMT -6. The time now is 08:17 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI