comparison 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
comparison
equal deleted inserted replaced
110:f6ef9a9f5476 111:e8b6c5433128
529 return 529 return
530 end 530 end
531 531
532 isDataLoaded = true 532 isDataLoaded = true
533 local taskInfo = TQ_GetQuestsForPlayerByMapID(db.currentMapID) 533 local taskInfo = TQ_GetQuestsForPlayerByMapID(db.currentMapID)
534 local transformFlags = (db.currentMapID == 1184) and Enum.MapTransform.IsForFlightMap or nil
534 if taskInfo then 535 if taskInfo then
535 self:UpdateQuestsForMap(taskInfo, db.currentMapID) 536 self:UpdateQuestsForMap(taskInfo, db.currentMapID)
536 end 537 end
537 local numZones = MC_GetNumZones(db.currentMapID) 538 local numZones = MC_GetNumZones(db.currentMapID)
538 if numZones then 539 if numZones then
539 for i = 1, numZones do 540 for i = 1, numZones do
540 local mapAreaID = MC_GetZoneInfo(db.currentMapID, i) 541 local mapAreaID = MC_GetZoneInfo(db.currentMapID, i)
541 local taskInfo = TQ_GetQuestsForPlayerByMapID(mapAreaID, db.currentMapID) 542 local taskInfo = TQ_GetQuestsForPlayerByMapID(mapAreaID, db.currentMapID, transformFlags)
542 543
543 db.QuestsByZone[mapAreaID] = db.QuestsByZone[mapAreaID] or {} 544 db.QuestsByZone[mapAreaID] = db.QuestsByZone[mapAreaID] or {}
544 545
545 if taskInfo then 546 if taskInfo then
546 self:UpdateQuestsForMap(taskInfo, mapAreaID) 547 self:UpdateQuestsForMap(taskInfo, mapAreaID, transformFlags)
547 end 548 end
548 end 549 end
549 end 550 end
551
552
550 end 553 end
551 554
552 -- Attempt to display the pins for quests in taskInfo 555 -- Attempt to display the pins for quests in taskInfo
553 function Module:UpdateQuestsForMap(taskInfo, mapID) 556 function Module:UpdateQuestsForMap(taskInfo, mapID, transformFlags)
554 print('|cFF00FF00UpdateQuestsForMap()|r', GetMapNameByID(mapID), GetMapNameByID(db.currentMapID), layoutDirty) 557 print('|cFF00FF00UpdateQuestsForMap()|r', GetMapNameByID(mapID), GetMapNameByID(db.currentMapID), layoutDirty)
555 if db.QuestsByZone[mapID] then 558 if db.QuestsByZone[mapID] then
556 wipe(db.QuestsByZone[mapID]) 559 wipe(db.QuestsByZone[mapID])
557 elseif db.isBrokenIsle then 560 elseif db.isBrokenIsle then
558 continentScanned = true 561 continentScanned = true
560 db.PinStrata = WorldMapFrame_InWindowedMode() and 'HIGH' or 'FULLSCREEN' 563 db.PinStrata = WorldMapFrame_InWindowedMode() and 'HIGH' or 'FULLSCREEN'
561 print('layoutDirty =',layoutDirty) 564 print('layoutDirty =',layoutDirty)
562 565
563 for index, info in pairs(taskInfo) do 566 for index, info in pairs(taskInfo) do
564 local questID, x, y = info.questId, info.x, info.y 567 local questID, x, y = info.questId, info.x, info.y
568
569 -- rough workaround for argus map; flightmap and world map images are different, so not completely accurate
570 if transformFlags and x and y then
571 print(x,y)
572 x = x / 2 + .25
573 y = y / 2 + .30
574 print(x,y)
575 end
576
577
565 local pin = self:AcquirePin(info) 578 local pin = self:AcquirePin(info)
566 if pin then 579 if pin then
567 if pin.canShow then 580 if pin.canShow then
568 pin.used = true 581 pin.used = true
569 print('using', pin.title, (pin.owningFrame ~= WorldMapFrame)) 582 print('using', pin.title, (pin.owningFrame ~= WorldMapFrame))