Skip to content

Commit 51c2349

Browse files
authored
Update to 10.2.0
1 parent 7fa7144 commit 51c2349

7 files changed

+72
-31
lines changed

Callings/CallingsBoard.lua

+7-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,13 @@ function WQT_CallingsBoardMixin:OnLoad()
6464
self.lastUpdate = 0;
6565
self:UpdateCovenant();
6666

67-
hooksecurefunc(WorldMapFrame, "OnMapChanged", function()
68-
self:OnMapChanged(WorldMapFrame:GetMapID());
69-
end)
67+
-- hooksecurefunc(WorldMapFrame, "OnMapChanged", function()
68+
-- self:OnMapChanged(WorldMapFrame:GetMapID());
69+
-- end)
70+
EventRegistry:RegisterCallback("MapCanvas.MapSet", function(_,mapID)
71+
-- Now we do it modern way.
72+
self:OnMapChanged(mapID);
73+
end);
7074

7175
self:RequestUpdate();
7276
end

Data.lua

+33-10
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ local WQT_DRAGONFLIGHT = {
156156
[2025] = {["x"] = 0.63, ["y"] = 0.50}, -- Thaldraszus
157157
[2085] = {["x"] = 0.66, ["y"] = 0.57}, -- Primalist Future
158158
[2133] = {["x"] = 0.86, ["y"] = 0.83}, -- Zaralek Cavern
159+
[2200] = {["x"] = 0.31, ["y"] = 0.55}, -- Emerald Dream
159160
}
160161
local WQT_SHADOWLANDS = {
161162
[1543] = {["x"] = 0.23, ["y"] = 0.13}, -- The Maw
@@ -309,6 +310,7 @@ local ZonesByExpansion = {
309310
2025, -- Thaldraszus
310311
2085, -- Primalist Future
311312
2133, -- Zaralek Cavern
313+
2200, -- Emerald Dream
312314
}
313315
,[LE_EXPANSION_SHADOWLANDS] = {
314316
1550, -- The Shadowlands
@@ -785,15 +787,13 @@ _V["SETTING_LIST"] = {
785787
end
786788
,["getValueFunc"] = function() return WQT.settings.list.includeDaily end
787789
}
788-
789790
,{["template"] = "WQT_SettingCheckboxTemplate", ["categoryID"] = "GENERAL_DRAGONFLIGHT", ["label"] = _L["GOLD_PURSES"], ["tooltip"] = _L["GOLD_PURSES_TT"], ["isNew"] = true
790791
, ["valueChangedFunc"] = function(value)
791792
WQT.settings.general.df_goldPurses = value;
792793
WQT_WorldQuestFrame.dataProvider:ReloadQuestRewards();
793794
end
794795
,["getValueFunc"] = function() return WQT.settings.general.df_goldPurses end
795796
}
796-
797797
,{["template"] = "WQT_SettingCheckboxTemplate", ["categoryID"] = "GENERAL_SHADOWLANDS", ["label"] = _L["CALLINGS_BOARD"], ["tooltip"] = _L["CALLINGS_BOARD_TT"]
798798
, ["valueChangedFunc"] = function(value)
799799
WQT.settings.general.sl_callingsBoard = value;
@@ -1271,26 +1271,39 @@ _V["FILTER_FUNCTIONS"] = {
12711271
-- /dump WorldMapFrame:GetMapID()
12721272
-- /dump FlightMapFrame:GetMapID()
12731273
_V["WQT_CONTINENT_GROUPS"] = {
1274-
[875] = {876}
1275-
,[1011] = {876} -- Zandalar flightmap
1276-
,[876] = {875}
1277-
,[1014] = {875} -- Kul Tiras flightmap
1274+
[2200] = {1978,2133} -- Emerald Dream
1275+
,[2241] = {1978,2133} -- Emerald Dream flightmap
1276+
,[2133] = {1978,2200} -- Zaralek Cavern
1277+
,[2175] = {1978,2200} -- Zaralek Cavern flightmap
1278+
,[1978] = {2133,2200} -- Dragonflight
1279+
,[2057] = {2133,2200} -- Dragonflight flightmap
1280+
,[875] = {876, 1355} -- Zandalar
1281+
,[1011] = {876, 1355} -- Zandalar flightmap
1282+
,[876] = {875, 1355} -- Kul Tiras
1283+
,[1014] = {875, 1355} -- Kul Tiras flightmap
1284+
,[1355] = {875, 876} -- Nazjatar
12781285
,[1504] = {875, 876} -- Nazjatar flightmap
12791286
,[619] = {905} -- Legion
12801287
,[905] = {619} -- Argus
12811288

12821289
}
12831290

12841291
_V["ZONE_SUBZONES"] = {
1285-
[2025] = {2112, 2085, 2133}; -- Thaldraszus, Valdrakken, Primalist Future, Zaralek Cavern
1292+
[2025] = {2112, 2085}; -- Thaldraszus, Valdrakken, Primalist Future
12861293
[1565] = {1701, 1702, 1703}; -- Ardenweald covenant
12871294
[1533] = {1707, 1708}; -- Bastion Covenant
12881295
[1525] = {1699, 1700}; -- Revendreth Covenant
12891296
[1536] = {1698}; -- Maldraxxus Covenant
12901297
}
12911298

12921299
_V["WQT_ZONE_MAPCOORDS"] = {
1293-
[2057] = WQT_DRAGONFLIGHT -- Dragonflight flightmap
1300+
[2241] = { -- Emerald Dream flightmap
1301+
[2200] = {["x"] = 0, ["y"] = 0} -- Emerald Dream
1302+
}
1303+
,[2175] = { -- Zaralek Cavern flightmap
1304+
[2133] = {["x"] = 0, ["y"] = 0} -- Zaralek Cavern
1305+
}
1306+
,[2057] = WQT_DRAGONFLIGHT -- Dragonflight flightmap
12941307
,[1978] = WQT_DRAGONFLIGHT -- Dragonflight
12951308
,[1647] = WQT_SHADOWLANDS -- Shadowlands flightmap
12961309
,[1550] = WQT_SHADOWLANDS -- Shadowlands
@@ -1332,7 +1345,7 @@ _V["WQT_ZONE_MAPCOORDS"] = {
13321345
}
13331346
}
13341347

1335-
_V["WQT_NO_FACTION_DATA"] = { ["expansion"] = 0 ,["playerFaction"] = nil ,["texture"] = 134400, ["name"]=_L["NO_FACTION"] } -- No faction
1348+
_V["WQT_NO_FACTION_DATA"] = { ["expansion"] = 0 ,["playerFaction"] = nil ,["texture"] = 1103069, ["name"]=_L["NO_FACTION"] } -- No faction
13361349
_V["WQT_FACTION_DATA"] = {
13371350
[67] = { ["expansion"] = LE_EXPANSION_CLASSIC ,["playerFaction"] = nil ,["texture"] = 2203914 } -- Horde
13381351
,[469] = { ["expansion"] = LE_EXPANSION_CLASSIC ,["playerFaction"] = nil ,["texture"] = 2203912 } -- Alliance
@@ -1392,6 +1405,7 @@ _V["WQT_FACTION_DATA"] = {
13921405
,[2526] = { ["expansion"] = LE_EXPANSION_DRAGONFLIGHT,["playerFaction"] = nil ,["texture"] = 4901295 } -- Winterpelt Furbolg
13931406
,[2564] = { ["expansion"] = LE_EXPANSION_DRAGONFLIGHT,["playerFaction"] = nil ,["texture"] = 5140835 } -- Loamm Niffen
13941407
,[2553] = { ["expansion"] = LE_EXPANSION_DRAGONFLIGHT,["playerFaction"] = nil ,["texture"] = 609811 } -- Soridormi
1408+
,[2574] = { ["expansion"] = LE_EXPANSION_DRAGONFLIGHT,["playerFaction"] = nil ,["texture"] = 5244643 } -- Dream Wardens
13951409
}
13961410
-- Add localized faction names
13971411
for k, v in pairs(_V["WQT_FACTION_DATA"]) do
@@ -1456,7 +1470,6 @@ _V["WQT_DEFAULTS"] = {
14561470
bountyReward = false;
14571471
bountySelectedOnly = true;
14581472
showDisliked = true;
1459-
14601473
df_goldPurses = false;
14611474
sl_callingsBoard = true;
14621475
sl_genericAnimaIcons = false;
@@ -1530,6 +1543,16 @@ end
15301543

15311544
-- This is just easier to maintain than changing the entire string every time
15321545
_V["PATCH_NOTES"] = {
1546+
{["version"] = "10.2.0.0",
1547+
["intro"] = { "Update for 10.2.0." },
1548+
["new"] ={
1549+
"Added new Dragonflight zones and factions.",
1550+
},
1551+
["fixes"] = {
1552+
"Updated embedded libraries.",
1553+
"Minor fixes.",
1554+
},
1555+
},
15331556
{["version"] = "10.1.7.0",
15341557
["intro"] = { "Update for 10.1.7." },
15351558
["new"] ={

Dataprovider.lua

+12-9
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function QuestInfoMixin:LoadRewards(force)
240240
elseif (typeID == 0 and subTypeID == 8 and price == 0 and ilvl > 100) then
241241
-- Item converting into equipment
242242
self:AddReward(WQT_REWARDTYPE.equipment, ilvl, texture, quality, WQT_Utils:GetColor(_V["COLOR_IDS"].rewardArmor), rewardId);
243-
elseif (rewardId == 199192 or rewardId == 204359 or rewardId == 205226) and WQT.settings.general.df_goldPurses then
243+
elseif (rewardId == 199192 or rewardId == 204359 or rewardId == 205226 or rewardId == 210549) and WQT.settings.general.df_goldPurses then
244244
--Treat dragon racer's purse rewards as gold.
245245
self:AddReward(WQT_REWARDTYPE.gold, 525*100*100, 133784, 1, WQT_Utils:GetColor(_V["COLOR_IDS"].rewardGold));
246246
else
@@ -491,12 +491,15 @@ function WQT_DataProvider:Init()
491491
self.waitingRoomRewards = {};
492492

493493
self.bufferedZones = {};
494-
hooksecurefunc(WorldMapFrame, "OnMapChanged", function()
495-
-- If we change map, reset the CD, we want new quest info
496-
self:LoadQuestsInZone(WorldMapFrame.mapID);
494+
-- hooksecurefunc(WorldMapFrame, "OnMapChanged", function()
495+
-- -- If we change map, reset the CD, we want new quest info
496+
-- self:LoadQuestsInZone(WorldMapFrame.mapID);
497+
-- end);
498+
EventRegistry:RegisterCallback("MapCanvas.MapSet", function(_,mapID)
499+
-- Now we do it modern way.
500+
self:LoadQuestsInZone(mapID);
497501
end);
498-
499-
UpdateAzerothZones();
502+
UpdateAzerothZones();
500503

501504
self.updateCD = 0;
502505
end
@@ -512,7 +515,7 @@ function WQT_DataProvider:OnEvent(event, ...)
512515

513516
elseif (event == "PLAYER_LEVEL_UP") then
514517
local level = ...;
515-
UpdateAzerothZones(level);
518+
UpdateAzerothZones(level);
516519
end
517520
end
518521

@@ -615,7 +618,7 @@ function WQT_DataProvider:LoadQuestsInZone(zoneID)
615618
self.latestZoneId = zoneID
616619
-- If the flight map is open, we want all quests no matter what
617620
if ((FlightMapFrame and FlightMapFrame:IsShown()) ) then
618-
local taxiId = GetTaxiMapID()
621+
local taxiId = FlightMapFrame and FlightMapFrame:GetMapID() or GetTaxiMapID()
619622
zoneID = (taxiId and taxiId > 0) and taxiId or zoneID;
620623
-- World Flight Map add-on overwrite
621624
if (_WFMLoaded) then
@@ -698,7 +701,7 @@ function WQT_DataProvider:AddQuest(qInfo)
698701
-- Dragonflight devs forgot to flagged some tech quests with "MapUtil.ShouldShowTask", and past it in Vol'dun location.
699702
-- It make Vol'dun's map messy. This should fix it.
700703
if (qInfo.questId > 60000) and (qInfo.mapID == 864) then alwaysHide = true; end
701-
704+
702705
local posX, posY = WQT_Utils:GetQuestMapLocation(qInfo.questId, qInfo.mapID);
703706
local haveRewardData = questInfo:Init(qInfo.questId, qInfo.isDaily, qInfo.isCombatAllyQuest, alwaysHide, posX, posY);
704707

MapPinProvider.lua

+6-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ function WQT_PinDataProvider:Init()
122122
end, addonName);
123123

124124
-- Fix pings and fades when switching map
125-
hooksecurefunc(WorldMapFrame, "OnMapChanged", function()
125+
-- hooksecurefunc(WorldMapFrame, "OnMapChanged", function()
126+
-- wipe(self.pingedQuests);
127+
-- self:UpdateQuestPings();
128+
-- end);
129+
EventRegistry:RegisterCallback("MapCanvas.MapSet", function()
130+
-- Now we do it modern way.
126131
wipe(self.pingedQuests);
127132
self:UpdateQuestPings();
128133
end);

Templates.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ function WQT_Utils:GetFactionDataInternal(id)
344344

345345
if (not factionData[id]) then
346346
-- Add new faction in case it's not in our data yet
347-
factionData[id] = { ["expansion"] = 0 ,["faction"] = nil ,["texture"] = 1103069, ["unknown"] = true }
348-
factionData[id].name = GetFactionInfoByID(id) or "Unknown Faction";
347+
factionData[id] = { ["expansion"] = 0 ,["faction"] = nil ,["texture"] = 134400, ["unknown"] = true }
348+
factionData[id].name = GetFactionInfoByID(id) or UNKNOWN;
349349
WQT:debugPrint("Added new faction", id,factionData[id].name);
350350
end
351351

WorldQuestTab.lua

+10-4
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,7 @@ end
16941694
function WQT_ScrollListMixin:DisplayQuestList()
16951695
local mapId = WorldMapFrame.mapID;
16961696
if (((FlightMapFrame and FlightMapFrame:IsShown()) or TaxiRouteMap:IsShown()) and not _WFMLoaded) then
1697-
local taxiId = GetTaxiMapID()
1697+
local taxiId = FlightMapFrame and FlightMapFrame:GetMapID() or GetTaxiMapID()
16981698
mapId = (taxiId and taxiId > 0) and taxiId or mapId;
16991699
end
17001700
local mapInfo = WQT_Utils:GetCachedMapInfo(mapId or 0);
@@ -2155,11 +2155,17 @@ function WQT_CoreMixin:OnLoad()
21552155

21562156
-- World map
21572157
-- If we were reading details when we switch maps, change back to normal quests
2158-
hooksecurefunc(WorldMapFrame, "OnMapChanged", function()
2158+
-- hooksecurefunc(WorldMapFrame, "OnMapChanged", function()
2159+
-- if (self.selectedTab == WQT_TabDetails) then
2160+
-- self:SelectTab(WQT_TabNormal);
2161+
-- end
2162+
-- end)
2163+
EventRegistry:RegisterCallback("MapCanvas.MapSet", function()
2164+
-- Now we do it modern way.
21592165
if (self.selectedTab == WQT_TabDetails) then
21602166
self:SelectTab(WQT_TabNormal);
21612167
end
2162-
end)
2168+
end);
21632169

21642170
-- Update when opening the map
21652171
WorldMapFrame:HookScript("OnShow", function()
@@ -2637,7 +2643,7 @@ function WQT_CoreMixin:TAXIMAP_OPENED(system)
26372643
end
26382644

26392645
WQT_WorldQuestFrame:ChangeAnchorLocation(anchor);
2640-
self.dataProvider:LoadQuestsInZone(GetTaxiMapID());
2646+
self.dataProvider:LoadQuestsInZone(FlightMapFrame and FlightMapFrame:GetMapID() or GetTaxiMapID());
26412647
end
26422648

26432649
-- Reset official map filters

WorldQuestTab.toc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## Interface: 100107
1+
## Interface: 100200
22
## Title: World Quest Tab
33
## Notes: Creates a new quest tab to keep track of world quests.
44
## Author: LanceDH
5-
## Version: 10.1.7.0
5+
## Version: 10.2.0.0
66
## SavedVariables: BWQDB
77
## X-Website: https://www.curseforge.com/wow/addons/worldquesttab
88
## X-Curse-Project-ID: 102243

0 commit comments

Comments
 (0)