Mercurial > wow > worldplan
diff WorldMap.lua @ 111:e8b6c5433128 v7.3.0-1
7.3 Updates
author | Nenue |
---|---|
date | Tue, 05 Sep 2017 02:58:24 -0400 |
parents | f6ef9a9f5476 |
children | a4dfdd4f1cf3 |
line wrap: on
line diff
--- a/WorldMap.lua Tue Jul 25 12:38:27 2017 -0400 +++ b/WorldMap.lua Tue Sep 05 02:58:24 2017 -0400 @@ -531,6 +531,7 @@ isDataLoaded = true local taskInfo = TQ_GetQuestsForPlayerByMapID(db.currentMapID) + local transformFlags = (db.currentMapID == 1184) and Enum.MapTransform.IsForFlightMap or nil if taskInfo then self:UpdateQuestsForMap(taskInfo, db.currentMapID) end @@ -538,19 +539,21 @@ if numZones then for i = 1, numZones do local mapAreaID = MC_GetZoneInfo(db.currentMapID, i) - local taskInfo = TQ_GetQuestsForPlayerByMapID(mapAreaID, db.currentMapID) + local taskInfo = TQ_GetQuestsForPlayerByMapID(mapAreaID, db.currentMapID, transformFlags) db.QuestsByZone[mapAreaID] = db.QuestsByZone[mapAreaID] or {} if taskInfo then - self:UpdateQuestsForMap(taskInfo, mapAreaID) + self:UpdateQuestsForMap(taskInfo, mapAreaID, transformFlags) end end end + + end -- Attempt to display the pins for quests in taskInfo -function Module:UpdateQuestsForMap(taskInfo, mapID) +function Module:UpdateQuestsForMap(taskInfo, mapID, transformFlags) print('|cFF00FF00UpdateQuestsForMap()|r', GetMapNameByID(mapID), GetMapNameByID(db.currentMapID), layoutDirty) if db.QuestsByZone[mapID] then wipe(db.QuestsByZone[mapID]) @@ -562,6 +565,16 @@ for index, info in pairs(taskInfo) do local questID, x, y = info.questId, info.x, info.y + + -- rough workaround for argus map; flightmap and world map images are different, so not completely accurate + if transformFlags and x and y then + print(x,y) + x = x / 2 + .25 + y = y / 2 + .30 + print(x,y) + end + + local pin = self:AcquirePin(info) if pin then if pin.canShow then