From b8fa9874f0705483c7b996728cc3231ff3c46ee0 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Mon, 5 Dec 2022 23:23:59 -0600 Subject: [PATCH 01/51] Add support for Bloody Tokens (PVP Currency) Set Version to 10.0.2.2 --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 5 +++++ Constants.lua | 4 +++- WorldQuests.lua | 44 ++++++++++++++++++++++++------------------ 4 files changed, 34 insertions(+), 21 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 41ce118..d85a802 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 100002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.0.2.1 +## Version: 10.0.2.2 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7031b84..7cce63a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +### 10.0.2.2 + +* Add support for Bloody Tokens (Dragonflight PVP Currency) + ### 10.0.2.1 + * Updates for Shadowlands compatibility * Initial Updates for Dragonflight compatibility diff --git a/Constants.lua b/Constants.lua index b14993e..2ac3047 100644 --- a/Constants.lua +++ b/Constants.lua @@ -59,6 +59,7 @@ CONSTANTS.REWARD_TYPES = { ANIMA_CONTAINER = 15, GRATEFUL_OFFERING = 15, CYPHERS_OF_THE_FIRST_ONES = 16, + BLOODY_TOKEN = 17, } CONSTANTS.QUEST_TYPES = { @@ -104,7 +105,8 @@ CONSTANTS.CURRENCIES_AFFECTED_BY_WARMODE = { [1342] = true, -- legionfall supplies [1220] = true, -- order hall (legion) [1560] = true, -- war resources (bfa) - [1553] = true, -- azerite + [1553] = true, -- azerite (bfa) + [2123] = true, -- Bloody Tokens (dragonflight) } CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS = { diff --git a/WorldQuests.lua b/WorldQuests.lua index 2dac9e0..e56ce61 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -860,6 +860,10 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.GRATEFUL_OFFERING quest.reward.gratefulOfferingAmount = currency.amount if C("ShowGratefulOffering") then quest.hide = false end + elseif currencyId == 2123 then -- bloody token + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.BLOODY_TOKEN + quest.reward.bloodyTokenAmount = currency.amount + --if C("ShowGratefulOffering") then quest.hide = false end -- TODO: Add this with other Dragonflight options else if DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -1013,6 +1017,8 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalCyphersOfTheFirstOnes = BWQ.totalCyphersOfTheFirstOnes + quest.reward.cyphersOfTheFirstOnesAmount end if rtype == CONSTANTS.REWARD_TYPES.GRATEFUL_OFFERING then BWQ.totalGratefulOffering = BWQ.totalGratefulOffering + quest.reward.gratefulOfferingAmount end + if rtype == CONSTANTS.REWARD_TYPES.BLOODY_TOKEN then + BWQ.totalBloodyTokenAmount = BWQ.totalBloodyTokenAmount + quest.reward.bloodyTokenAmount end end end if questType then @@ -1332,7 +1338,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokenAmount = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -1851,24 +1857,24 @@ function BWQ:UpdateBlock() if C("showTotalsInBrokerText") then local brokerString = "" - if C("brokerShowAP") and BWQ.totalArtifactPower > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_smallazeriteshard:16:16|t %s ", brokerString, AbbreviateNumber(BWQ.totalArtifactPower)) end - if C("brokerShowServiceMedals") and BWQ.totalServiceMedals > 0 then brokerString = string.format("%s|T%s:16:16|t %s ", brokerString, isHorde and "Interface\\Icons\\ui_horde_honorboundmedal" or "Interface\\Icons\\ui_alliance_7legionmedal", BWQ.totalServiceMedals) end - if C("brokerShowWakeningEssences") and BWQ.totalWakeningEssences > 0 then brokerString = string.format("%s|TInterface\\Icons\\achievement_dungeon_ulduar80_25man:16:16|t %s ", brokerString, BWQ.totalWakeningEssences) end - if C("brokerShowWarResources") and BWQ.totalWarResources > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv__faction_warresources:16:16|t %d ", brokerString, BWQ.totalWarResources) end - if C("brokerShowPrismaticManapearl") and BWQ.totalPrismaticManapearl > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_misc_enchantedpearlf:16:16|t %d ", brokerString, BWQ.totalPrismaticManapearl) end - if C("brokerShowCyphersOfTheFirstOnes") and BWQ.totalCyphersOfTheFirstOnes > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_trinket_progenitorraid_02_blue:16:16|t %d ", brokerString, BWQ.totalCyphersOfTheFirstOnes) end - if C("brokerShowGratefulOffering") and BWQ.totalGratefulOffering > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_ornatebox:16:16|t %d ", brokerString, BWQ.totalGratefulOffering) end - if C("brokerShowResources") and BWQ.totalResources > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_orderhall_orderresources:16:16|t %d ", brokerString, BWQ.totalResources) end - if C("brokerShowLegionfallSupplies") and BWQ.totalLegionfallSupplies > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_summonable_boss_token:16:16|t %d ", brokerString, BWQ.totalLegionfallSupplies) end - if C("brokerShowHonor") and BWQ.totalHonor > 0 then brokerString = string.format("%s|TInterface\\Icons\\Achievement_LegionPVPTier4:16:16|t %d ", brokerString, BWQ.totalHonor) end - if C("brokerShowGold") and BWQ.totalGold > 0 then brokerString = string.format("%s|TInterface\\GossipFrame\\auctioneerGossipIcon:16:16|t %d ", brokerString, math.floor(BWQ.totalGold / 10000)) end - if C("brokerShowGear") and BWQ.totalGear > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_chest_plate_legionendgame_c_01:16:16|t %d ", brokerString, BWQ.totalGear) end - if C("brokerShowMarkOfHonor") and BWQ.totalMarkOfHonor > 0 then brokerString = string.format("%s|TInterface\\Icons\\ability_pvp_gladiatormedallion:16:16|t %d ", brokerString, BWQ.totalMarkOfHonor) end - if C("brokerShowHerbalism") and BWQ.totalHerbalism > 0 then brokerString = string.format("%s|TInterface\\Icons\\Trade_Herbalism:16:16|t %d ", brokerString, BWQ.totalHerbalism) end - if C("brokerShowMining") and BWQ.totalMining > 0 then brokerString = string.format("%s|TInterface\\Icons\\Trade_Mining:16:16|t %d ", brokerString, BWQ.totalMining) end - if C("brokerShowFishing") and BWQ.totalFishing > 0 then brokerString = string.format("%s|TInterface\\Icons\\Trade_Fishing:16:16|t %d ", brokerString, BWQ.totalFishing) end - if C("brokerShowSkinning") and BWQ.totalSkinning > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_pelt_wolf_01:16:16|t %d ", brokerString, BWQ.totalSkinning) end - if C("brokerShowBloodOfSargeras") and BWQ.totalBloodOfSargeras > 0 then brokerString = string.format("%s|T1417744:16:16|t %d", brokerString, BWQ.totalBloodOfSargeras) end + if C("brokerShowAP") and BWQ.totalArtifactPower > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_smallazeriteshard:16:16|t %s ", brokerString, AbbreviateNumber(BWQ.totalArtifactPower)) end + if C("brokerShowServiceMedals") and BWQ.totalServiceMedals > 0 then brokerString = string.format("%s|T%s:16:16|t %s ", brokerString, isHorde and "Interface\\Icons\\ui_horde_honorboundmedal" or "Interface\\Icons\\ui_alliance_7legionmedal", BWQ.totalServiceMedals) end + if C("brokerShowWakeningEssences") and BWQ.totalWakeningEssences > 0 then brokerString = string.format("%s|TInterface\\Icons\\achievement_dungeon_ulduar80_25man:16:16|t %s ", brokerString, BWQ.totalWakeningEssences) end + if C("brokerShowWarResources") and BWQ.totalWarResources > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv__faction_warresources:16:16|t %d ", brokerString, BWQ.totalWarResources) end + if C("brokerShowPrismaticManapearl") and BWQ.totalPrismaticManapearl > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_misc_enchantedpearlf:16:16|t %d ", brokerString, BWQ.totalPrismaticManapearl) end + if C("brokerShowCyphersOfTheFirstOnes") and BWQ.totalCyphersOfTheFirstOnes > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_trinket_progenitorraid_02_blue:16:16|t %d ", brokerString, BWQ.totalCyphersOfTheFirstOnes) end + if C("brokerShowGratefulOffering") and BWQ.totalGratefulOffering > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_ornatebox:16:16|t %d ", brokerString, BWQ.totalGratefulOffering) end + if C("brokerShowResources") and BWQ.totalResources > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_orderhall_orderresources:16:16|t %d ", brokerString, BWQ.totalResources) end + if C("brokerShowLegionfallSupplies") and BWQ.totalLegionfallSupplies > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_summonable_boss_token:16:16|t %d ", brokerString, BWQ.totalLegionfallSupplies) end + if C("brokerShowHonor") and BWQ.totalHonor > 0 then brokerString = string.format("%s|TInterface\\Icons\\Achievement_LegionPVPTier4:16:16|t %d ", brokerString, BWQ.totalHonor) end + if C("brokerShowGold") and BWQ.totalGold > 0 then brokerString = string.format("%s|TInterface\\GossipFrame\\auctioneerGossipIcon:16:16|t %d ", brokerString, math.floor(BWQ.totalGold / 10000)) end + if C("brokerShowGear") and BWQ.totalGear > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_chest_plate_legionendgame_c_01:16:16|t %d ", brokerString, BWQ.totalGear) end + if C("brokerShowMarkOfHonor") and BWQ.totalMarkOfHonor > 0 then brokerString = string.format("%s|TInterface\\Icons\\ability_pvp_gladiatormedallion:16:16|t %d ", brokerString, BWQ.totalMarkOfHonor) end + if C("brokerShowHerbalism") and BWQ.totalHerbalism > 0 then brokerString = string.format("%s|TInterface\\Icons\\Trade_Herbalism:16:16|t %d ", brokerString, BWQ.totalHerbalism) end + if C("brokerShowMining") and BWQ.totalMining > 0 then brokerString = string.format("%s|TInterface\\Icons\\Trade_Mining:16:16|t %d ", brokerString, BWQ.totalMining) end + if C("brokerShowFishing") and BWQ.totalFishing > 0 then brokerString = string.format("%s|TInterface\\Icons\\Trade_Fishing:16:16|t %d ", brokerString, BWQ.totalFishing) end + if C("brokerShowSkinning") and BWQ.totalSkinning > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_pelt_wolf_01:16:16|t %d ", brokerString, BWQ.totalSkinning) end + if C("brokerShowBloodOfSargeras") and BWQ.totalBloodOfSargeras > 0 then brokerString = string.format("%s|T1417744:16:16|t %d", brokerString, BWQ.totalBloodOfSargeras) end if brokerString and brokerString ~= "" then BWQ.WorldQuestsBroker.text = brokerString From 23a70626b5326c5e11cc7282d90ec7d45ee07901 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Mon, 5 Dec 2022 23:50:36 -0600 Subject: [PATCH 02/51] Version 10.0.2.3 --- Broker_WorldQuests.toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index d85a802..5f2d21f 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 100002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.0.2.2 +## Version: 10.0.2.3 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. From 56e8f798558eaa48cdd1ede72b7891d5a703ad48 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Tue, 6 Dec 2022 13:46:04 -0600 Subject: [PATCH 03/51] Add support for Valdrakken Accord (Dragonflight reputation currency) --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 6 +++++- Constants.lua | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 5f2d21f..170a341 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 100002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.0.2.3 +## Version: 10.0.2.4 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cce63a..1fcfd93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -### 10.0.2.2 +### 10.0.2.4 + +* Add support for Valdrakken Accord (Dragonflight reputation currency) + +### 10.0.2.3 * Add support for Bloody Tokens (Dragonflight PVP Currency) diff --git a/Constants.lua b/Constants.lua index 2ac3047..480a3ee 100644 --- a/Constants.lua +++ b/Constants.lua @@ -114,6 +114,7 @@ CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS = { [2108] = true, -- Maruuk Centaur [2109] = true, -- Iskaara Tuskarr [2031] = true, -- Dragonscale Expedition + [2106] = true, -- Valdrakken Accord } CONSTANTS.SHADOWLANDS_REPUTATION_CURRENCY_IDS = { From 65d65d17f625e12e262abeee19fec6fd866d8a29 Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Wed, 7 Dec 2022 14:32:06 -0500 Subject: [PATCH 04/51] Dragonflight updates - Broker options for Dragon Isles Supplies, Bloody Tokens, Polished Pet Charms - Filters for Dragon Isles Supplies, Bloody Tokens - Split DF reputation out - Options for DF reputation by faction - Total Polished Pet Charms available - Total Dragon Isles Supplies available - Reorganize menus to move old expansion options to submenus - Fix Grateful Offering checkbox - Fix Conduits icon --- Constants.lua | 6 +- WorldQuests.lua | 221 +++++++++++++++++++++++++++++------------------- 2 files changed, 139 insertions(+), 88 deletions(-) diff --git a/Constants.lua b/Constants.lua index 480a3ee..2f48a8f 100644 --- a/Constants.lua +++ b/Constants.lua @@ -59,7 +59,9 @@ CONSTANTS.REWARD_TYPES = { ANIMA_CONTAINER = 15, GRATEFUL_OFFERING = 15, CYPHERS_OF_THE_FIRST_ONES = 16, - BLOODY_TOKEN = 17, + BLOODY_TOKENS = 17, + DRAGON_ISLES_SUPPLIES = 18, + POLISHED_PET_CHARM = 19, } CONSTANTS.QUEST_TYPES = { @@ -97,7 +99,6 @@ CONSTANTS.WORLD_QUEST_ICONS_BY_TAG_ID = { [260] = isHorde and "worldquest-icon-horde" or "worldquest-icon-alliance", } - CONSTANTS.CURRENCIES_AFFECTED_BY_WARMODE = { [1226] = true, -- nethershard [1508] = true, -- argunite @@ -110,7 +111,6 @@ CONSTANTS.CURRENCIES_AFFECTED_BY_WARMODE = { } CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS = { - [2003] = true, -- Dragon Isles Supplies [2108] = true, -- Maruuk Centaur [2109] = true, -- Iskaara Tuskarr [2031] = true, -- Dragonscale Expedition diff --git a/WorldQuests.lua b/WorldQuests.lua index e56ce61..d5749ac 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -135,8 +135,13 @@ local defaultConfig = { brokerShowFishing = false, brokerShowSkinning = false, brokerShowBloodOfSargeras = false, + brokerShowDragonIslesSupplies = true, + brokerShowBloodyTokens = true, + brokerShowPolishedPetCharm = false, sortByTimeRemaining = false, -- reward type + showDragonIslesSupplies = true, + showBloodyTokens = true, showArtifactPower = true, showPrismaticManapearl = true, showCyphersOfTheFirstOnes = true, @@ -148,6 +153,7 @@ local defaultConfig = { showConduits = true, showMarkOfHonor = true, showOtherItems = true, + showDFReputation = true, showSLReputation = true, showBFAReputation = true, showBFAServiceMedals = true, @@ -181,20 +187,33 @@ local defaultConfig = { showPvP = true, hideFactionColumn = false, hideFactionParagonBars = false, - -- BFA - alwaysShow7thLegion = false, - alwaysShowStormsWake = false, - alwaysShowOrderOfEmbers = false, - alwaysShowProudmooreAdmiralty = false, - alwaysShowWavebladeAnkoan = false, - alwaysShowTheHonorbound = false, - alwaysShowZandalariEmpire = false, - alwaysShowTalanjisExpedition = false, - alwaysShowVoldunai = false, - alwaysShowTheUnshackled = false, - alwaysShowRustboltResistance = false, - alwaysShowTortollanSeekers = false, - alwaysShowChampionsOfAzeroth = false, + -- Dragonflight + alwaysShowDragonscaleExpedition = false, + alwaysShowIskaaraTuskarr = false, + alwaysShowMaruukCentaur = false, + alwaysShowValdrakkenAccord = false, + -- Shadowlands + alwaysShowAscended = false, + alwaysShowUndyingArmy = false, + alwaysShowCourtofHarvesters = false, + alwaysShowAvowed = false, + alwaysShowWildHunt = false, + alwaysShowDeathsAdvance = false, + alwaysShowEnlightened = false, + -- BFA + alwaysShow7thLegion = false, + alwaysShowStormsWake = false, + alwaysShowOrderOfEmbers = false, + alwaysShowProudmooreAdmiralty = false, + alwaysShowWavebladeAnkoan = false, + alwaysShowTheHonorbound = false, + alwaysShowZandalariEmpire = false, + alwaysShowTalanjisExpedition = false, + alwaysShowVoldunai = false, + alwaysShowTheUnshackled = false, + alwaysShowRustboltResistance = false, + alwaysShowTortollanSeekers = false, + alwaysShowChampionsOfAzeroth = false, -- Legion alwaysShowCourtOfFarondis = false, alwaysShowDreamweavers = false, @@ -205,14 +224,6 @@ local defaultConfig = { alwaysShowArmiesOfLegionfall = false, alwaysShowArmyOfTheLight = false, alwaysShowArgussianReach = false, - -- Shadowlands - alwaysShowAscended = false, - alwaysShowUndyingArmy = false, - alwaysShowCourtofHarvesters = false, - alwaysShowAvowed = false, - alwaysShowWildHunt = false, - alwaysShowDeathsAdvance = false, - alwaysShowEnlightened = false, showPetBattle = true, hidePetBattleBountyQuests = false, alwaysShowPetBattleFamilyFamiliar = true, @@ -753,10 +764,13 @@ local RetrieveWorldQuests = function(mapId) if C("showConduits") then quest.hide = false end elseif C_Item.IsAnimaItemByID(itemId) == true then if C("showAnima") then quest.hide = false end - elseif itemId == 137642 then + elseif itemId == 137642 then -- mark of honor quest.sort = quest.sort > CONSTANTS.SORT_ORDER.ITEM and quest.sort or CONSTANTS.SORT_ORDER.ITEM rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.MARK_OF_HONOR if C("showItems") and C("showMarkOfHonor") then quest.hide = false end + elseif itemId == 163036 then -- polished pet charm + quest.reward.polishedPetCharmAmount = quest.reward.itemQuantity + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM else quest.sort = quest.sort > CONSTANTS.SORT_ORDER.ITEM and quest.sort or CONSTANTS.SORT_ORDER.ITEM rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT @@ -813,7 +827,7 @@ local RetrieveWorldQuests = function(mapId) elseif CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS[currencyId] then currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT - --if C("showSLReputation") then quest.hide = false end -- TODO: Add this with other Dragonflight options + if C("showDFReputation") then quest.hide = false end elseif CONSTANTS.SHADOWLANDS_REPUTATION_CURRENCY_IDS[currencyId] then currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT @@ -859,11 +873,15 @@ local RetrieveWorldQuests = function(mapId) elseif currencyId == 1885 then -- grateful offering rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.GRATEFUL_OFFERING quest.reward.gratefulOfferingAmount = currency.amount - if C("ShowGratefulOffering") then quest.hide = false end - elseif currencyId == 2123 then -- bloody token - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.BLOODY_TOKEN - quest.reward.bloodyTokenAmount = currency.amount - --if C("ShowGratefulOffering") then quest.hide = false end -- TODO: Add this with other Dragonflight options + if C("showGratefulOffering") then quest.hide = false end + elseif currencyId == 2123 then -- bloody tokens + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.BLOODY_TOKENS + quest.reward.bloodyTokensAmount = currency.amount + if C("showBloodyTokens") then quest.hide = false end + elseif currencyId == 2003 then -- dragon isles supplies + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DRAGON_ISLES_SUPPLIES + quest.reward.dragonIslesSuppliesAmount = currency.amount + if C("showDragonIslesSupplies") then quest.hide = false end else if DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -874,7 +892,6 @@ local RetrieveWorldQuests = function(mapId) else quest.sort = quest.sort > CONSTANTS.SORT_ORDER.RESOURCES and quest.sort or CONSTANTS.SORT_ORDER.RESOURCES end - end end @@ -938,6 +955,11 @@ local RetrieveWorldQuests = function(mapId) -- always show bounty quests or reputation for faction filter if (C("alwaysShowBountyQuests") and #quest.bounties > 0) or + -- Dragonflight + (C("alwaysShowDragonscaleExpedition") and quest.factionId == 2507) or + (C("alwaysShowIskaaraTuskarr") and quest.factionId == 2511) or + (C("alwaysShowMaruukCentaur") and quest.factionId == 2503) or + (C("alwaysShowValdrakkenAccord") and quest.factionId == 2510) or -- Shadowlands (C("alwaysShowAscended") and quest.factionId == 2407) or (C("alwaysShowUndyingArmy") and quest.factionId == 2410) or @@ -990,47 +1012,53 @@ local RetrieveWorldQuests = function(mapId) if rewardType then for _, rtype in next, rewardType do if rtype == CONSTANTS.REWARD_TYPES.ARTIFACTPOWER and quest.reward.azeriteAmount then - BWQ.totalArtifactPower = BWQ.totalArtifactPower + (quest.reward.azeriteAmount or 0) end - if rtype == CONSTANTS.REWARD_TYPES.WAKENING_ESSENCES and quest.reward.wakeningEssencesAmount then - BWQ.totalWakeningEssences = BWQ.totalWakeningEssences + quest.reward.wakeningEssencesAmount end - if rtype == CONSTANTS.REWARD_TYPES.WAR_RESOURCES and quest.reward.warResourceAmount then - BWQ.totalWarResources = BWQ.totalWarResources + quest.reward.warResourceAmount end - if rtype == CONSTANTS.REWARD_TYPES.SERVICE_MEDALS and quest.reward.serviceMedalAmount then - BWQ.totalServiceMedals = BWQ.totalServiceMedals + quest.reward.serviceMedalAmount end - if rtype == CONSTANTS.REWARD_TYPES.RESOURCES and quest.reward.resourceAmount then - BWQ.totalResources = BWQ.totalResources + quest.reward.resourceAmount end - if rtype == CONSTANTS.REWARD_TYPES.LEGIONFALL_SUPPLIES and quest.reward.legionfallSuppliesAmount then - BWQ.totalLegionfallSupplies = BWQ.totalLegionfallSupplies + quest.reward.legionfallSuppliesAmount end - if rtype == CONSTANTS.REWARD_TYPES.HONOR and quest.reward.honor then - BWQ.totalHonor = BWQ.totalHonor + quest.reward.honor end - if rtype == CONSTANTS.REWARD_TYPES.MONEY and quest.reward.money then - BWQ.totalGold = BWQ.totalGold + quest.reward.money end - if rtype == CONSTANTS.REWARD_TYPES.BLOODOFSARGERAS and quest.reward.itemQuantity then - BWQ.totalBloodOfSargeras = BWQ.totalBloodOfSargeras + quest.reward.itemQuantity end - if rtype == CONSTANTS.REWARD_TYPES.GEAR then - BWQ.totalGear = BWQ.totalGear + 1 end - if rtype == CONSTANTS.REWARD_TYPES.MARK_OF_HONOR then - BWQ.totalMarkOfHonor = BWQ.totalMarkOfHonor + quest.reward.itemQuantity end - if rtype == CONSTANTS.REWARD_TYPES.PRISMATIC_MANAPEARL then - BWQ.totalPrismaticManapearl = BWQ.totalPrismaticManapearl + quest.reward.prismaticManapearlAmount end - if rtype == CONSTANTS.REWARD_TYPES.CYPHERS_OF_THE_FIRST_ONES then - BWQ.totalCyphersOfTheFirstOnes = BWQ.totalCyphersOfTheFirstOnes + quest.reward.cyphersOfTheFirstOnesAmount end - if rtype == CONSTANTS.REWARD_TYPES.GRATEFUL_OFFERING then - BWQ.totalGratefulOffering = BWQ.totalGratefulOffering + quest.reward.gratefulOfferingAmount end - if rtype == CONSTANTS.REWARD_TYPES.BLOODY_TOKEN then - BWQ.totalBloodyTokenAmount = BWQ.totalBloodyTokenAmount + quest.reward.bloodyTokenAmount end + BWQ.totalArtifactPower = BWQ.totalArtifactPower + (quest.reward.azeriteAmount or 0) + elseif rtype == CONSTANTS.REWARD_TYPES.WAKENING_ESSENCES and quest.reward.wakeningEssencesAmount then + BWQ.totalWakeningEssences = BWQ.totalWakeningEssences + quest.reward.wakeningEssencesAmount + elseif rtype == CONSTANTS.REWARD_TYPES.WAR_RESOURCES and quest.reward.warResourceAmount then + BWQ.totalWarResources = BWQ.totalWarResources + quest.reward.warResourceAmount + elseif rtype == CONSTANTS.REWARD_TYPES.SERVICE_MEDALS and quest.reward.serviceMedalAmount then + BWQ.totalServiceMedals = BWQ.totalServiceMedals + quest.reward.serviceMedalAmount + elseif rtype == CONSTANTS.REWARD_TYPES.RESOURCES and quest.reward.resourceAmount then + BWQ.totalResources = BWQ.totalResources + quest.reward.resourceAmount + elseif rtype == CONSTANTS.REWARD_TYPES.LEGIONFALL_SUPPLIES and quest.reward.legionfallSuppliesAmount then + BWQ.totalLegionfallSupplies = BWQ.totalLegionfallSupplies + quest.reward.legionfallSuppliesAmount + elseif rtype == CONSTANTS.REWARD_TYPES.HONOR and quest.reward.honor then + BWQ.totalHonor = BWQ.totalHonor + quest.reward.honor + elseif rtype == CONSTANTS.REWARD_TYPES.MONEY and quest.reward.money then + BWQ.totalGold = BWQ.totalGold + quest.reward.money + elseif rtype == CONSTANTS.REWARD_TYPES.BLOODOFSARGERAS and quest.reward.itemQuantity then + BWQ.totalBloodOfSargeras = BWQ.totalBloodOfSargeras + quest.reward.itemQuantity + elseif rtype == CONSTANTS.REWARD_TYPES.GEAR then + BWQ.totalGear = BWQ.totalGear + 1 + elseif rtype == CONSTANTS.REWARD_TYPES.MARK_OF_HONOR then + BWQ.totalMarkOfHonor = BWQ.totalMarkOfHonor + quest.reward.itemQuantity + elseif rtype == CONSTANTS.REWARD_TYPES.PRISMATIC_MANAPEARL then + BWQ.totalPrismaticManapearl = BWQ.totalPrismaticManapearl + quest.reward.prismaticManapearlAmount + elseif rtype == CONSTANTS.REWARD_TYPES.CYPHERS_OF_THE_FIRST_ONES then + BWQ.totalCyphersOfTheFirstOnes = BWQ.totalCyphersOfTheFirstOnes + quest.reward.cyphersOfTheFirstOnesAmount + elseif rtype == CONSTANTS.REWARD_TYPES.GRATEFUL_OFFERING then + BWQ.totalGratefulOffering = BWQ.totalGratefulOffering + quest.reward.gratefulOfferingAmount + elseif rtype == CONSTANTS.REWARD_TYPES.BLOODY_TOKENS then + BWQ.totalBloodyTokens = BWQ.totalBloodyTokens + quest.reward.bloodyTokensAmount + elseif rtype == CONSTANTS.REWARD_TYPES.DRAGON_ISLES_SUPPLIES then + BWQ.totalDragonIslesSupplies = BWQ.totalDragonIslesSupplies + quest.reward.dragonIslesSuppliesAmount + elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM then + BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmAmount + end end end if questType then for _, qtype in next, questType do if qtype == CONSTANTS.QUEST_TYPES.HERBALISM then - BWQ.totalHerbalism = BWQ.totalHerbalism + 1 end - if qtype == CONSTANTS.QUEST_TYPES.MINING then - BWQ.totalMining = BWQ.totalMining + 1 end - if qtype == CONSTANTS.QUEST_TYPES.FISHING then - BWQ.totalFishing = BWQ.totalFishing + 1 end - if qtype == CONSTANTS.QUEST_TYPES.SKINNING then - BWQ.totalSkinning = BWQ.totalSkinning + 1 end + BWQ.totalHerbalism = BWQ.totalHerbalism + 1 + elseif qtype == CONSTANTS.QUEST_TYPES.MINING then + BWQ.totalMining = BWQ.totalMining + 1 + elseif qtype == CONSTANTS.QUEST_TYPES.FISHING then + BWQ.totalFishing = BWQ.totalFishing + 1 + elseif qtype == CONSTANTS.QUEST_TYPES.SKINNING then + BWQ.totalSkinning = BWQ.totalSkinning + 1 + end end end end @@ -1338,7 +1366,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokenAmount = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -1875,6 +1903,9 @@ function BWQ:UpdateBlock() if C("brokerShowFishing") and BWQ.totalFishing > 0 then brokerString = string.format("%s|TInterface\\Icons\\Trade_Fishing:16:16|t %d ", brokerString, BWQ.totalFishing) end if C("brokerShowSkinning") and BWQ.totalSkinning > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_pelt_wolf_01:16:16|t %d ", brokerString, BWQ.totalSkinning) end if C("brokerShowBloodOfSargeras") and BWQ.totalBloodOfSargeras > 0 then brokerString = string.format("%s|T1417744:16:16|t %d", brokerString, BWQ.totalBloodOfSargeras) end + if C("brokerShowBloodyTokens") and BWQ.totalBloodyTokens > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2:16:16|t %d ", brokerString, BWQ.totalBloodyTokens) end + if C("brokerShowDragonIslesSupplies") and BWQ.totalDragonIslesSupplies > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_faction_warresources:16:16|t %d ", brokerString, BWQ.totalDragonIslesSupplies) end + if C("brokerShowPolishedPetCharm") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then BWQ.WorldQuestsBroker.text = brokerString @@ -1905,8 +1936,8 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Service Medals"):format(isHorde and "Interface\\Icons\\ui_horde_honorboundmedal" or "Interface\\Icons\\ui_alliance_7legionmedal"), check = "brokerShowServiceMedals" }, { text = ("|T%1$s:16:16|t Wakening Essences"):format("Interface\\Icons\\achievement_dungeon_ulduar80_25man"), check = "brokerShowWakeningEssences" }, { text = ("|T%1$s:16:16|t Prismatic Manapearls"):format("Interface\\Icons\\Inv_misc_enchantedpearlf"), check = "brokerShowPrismaticManapearl" }, - { text = ("|T%1$s:16:16|t Cyphers of the First Ones"):format("Interface\\Icons\\inv_trinket_progenitorraid_02_blue"), check = "brokerShowCyphersOfTheFirstOnes" }, - { text = ("|T%1$s:16:16|t Grateful Offerings"):format("Interface\\Icons\\inv_misc_ornatebox"), check = "brokerShowGratefulOffering" }, + { text = ("|T%1$s:16:16|t Cyphers of the First Ones"):format("Interface\\Icons\\inv_trinket_progenitorraid_02_blue"), check = "brokerShowCyphersOfTheFirstOnes" }, + { text = ("|T%1$s:16:16|t Grateful Offerings"):format("Interface\\Icons\\inv_misc_ornatebox"), check = "brokerShowGratefulOffering" }, { text = ("|T%1$s:16:16|t War Resources"):format("Interface\\Icons\\inv__faction_warresources"), check = "brokerShowWarResources" }, { text = ("|T%1$s:16:16|t Order Hall Resources"):format("Interface\\Icons\\inv_orderhall_orderresources"), check = "brokerShowResources" }, { text = ("|T%1$s:16:16|t Legionfall War Supplies"):format("Interface\\Icons\\inv_misc_summonable_boss_token"), check = "brokerShowLegionfallSupplies" }, @@ -1919,37 +1950,50 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Fishing Quests"):format("Interface\\Icons\\Trade_Fishing"), check = "brokerShowFishing" }, { text = ("|T%1$s:16:16|t Skinning Quests"):format("Interface\\Icons\\inv_misc_pelt_wolf_01"), check = "brokerShowSkinning" }, { text = ("|T%s$s:16:16|t Blood of Sargeras"):format("1417744"), check = "brokerShowBloodOfSargeras" }, + { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "brokerShowBloodyTokens" }, + { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "brokerShowDragonIslesSupplies" }, + { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharm" }, } }, { text = "Sort list by time remaining instead of reward type", check = "sortByTimeRemaining" }, { text = "" }, { text = "Filter by reward...", isTitle = true }, - { text = ("|T%1$s:16:16|t Azerite"):format("Interface\\Icons\\inv_smallazeriteshard"), check = "showArtifactPower" }, - { text = ("|T%1$s:16:16|t Prismatic Manapearl"):format("Interface\\Icons\\Inv_misc_enchantedpearlf"), check = "showPrismaticManapearl" }, - { text = ("|T%1$s:16:16|t Cyphers of the First Ones"):format("Interface\\Icons\\inv_trinket_progenitorraid_02_blue"), check = "showCyphersOfTheFirstOnes" }, - { text = ("|T%1$s:16:16|t Grateful Offerings"):format("Interface\\Icons\\inv_misc_ornatebox"), check = "showGratefulOffering" }, { text = ("|T%1$s:16:16|t Items"):format("Interface\\Minimap\\Tracking\\Banker"), check = "showItems", submenu = { { text = ("|T%1$s:16:16|t Gear"):format("Interface\\Icons\\Inv_chest_plate_legionendgame_c_01"), check = "showGear" }, { text = ("|T%s$s:16:16|t Crafting Materials"):format("1417744"), check = "showCraftingMaterials" }, - { text = ("|T%s$s:16:16|t Conduits"):format("1417744"), check = "showConduits" }, { text = ("|T%1$s:16:16|t Mark Of Honor"):format("Interface\\Icons\\ability_pvp_gladiatormedallion"), check = "showMarkOfHonor" }, { text = "Other", check = "showOtherItems" }, } }, - { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showBFAReputation" }, - { text = ("|T%1$s:16:16|t Service Medals"):format(isHorde and "Interface\\Icons\\ui_horde_honorboundmedal" or "Interface\\Icons\\ui_alliance_7legionmedal"), check = "showBFAServiceMedals" }, + { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showDFReputation" }, + { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "showDragonIslesSupplies" }, + { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "showBloodyTokens" }, { text = ("|T%1$s:16:16|t Honor"):format("Interface\\Icons\\Achievement_LegionPVPTier4"), check = "showHonor" }, { text = ("|T%1$s:16:16|t Low gold reward"):format("Interface\\GossipFrame\\auctioneerGossipIcon"), check = "showLowGold" }, { text = ("|T%1$s:16:16|t High gold reward"):format("Interface\\GossipFrame\\auctioneerGossipIcon"), check = "showHighGold" }, - { text = ("|T%1$s:16:16|t War Resources"):format("Interface\\Icons\\inv__faction_warresources"), check = "showWarResources" }, - { text = ("|T%s$s:16:16|t Anima Item"):format("3528288"), check = "showAnima" }, + { text = " Shadowlands", submenu = { + { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showSLReputation" }, + { text = ("|T%s$s:16:16|t Anima Item"):format("3528288"), check = "showAnima" }, + { text = ("|T%s$s:16:16|t Conduits"):format("3586269"), check = "showConduits" }, + { text = ("|T%1$s:16:16|t Cyphers of the First Ones"):format("Interface\\Icons\\inv_trinket_progenitorraid_02_blue"), check = "showCyphersOfTheFirstOnes" }, + { text = ("|T%1$s:16:16|t Grateful Offerings"):format("Interface\\Icons\\inv_misc_ornatebox"), check = "showGratefulOffering" }, + } + }, + { text = " Battle for Azeroth", submenu = { + { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showBFAReputation" }, + { text = ("|T%1$s:16:16|t War Resources"):format("Interface\\Icons\\inv__faction_warresources"), check = "showWarResources" }, + { text = ("|T%1$s:16:16|t Azerite"):format("Interface\\Icons\\inv_smallazeriteshard"), check = "showArtifactPower" }, + { text = ("|T%1$s:16:16|t Service Medals"):format(isHorde and "Interface\\Icons\\ui_horde_honorboundmedal" or "Interface\\Icons\\ui_alliance_7legionmedal"), check = "showBFAServiceMedals" }, + { text = ("|T%1$s:16:16|t Prismatic Manapearl"):format("Interface\\Icons\\Inv_misc_enchantedpearlf"), check = "showPrismaticManapearl" }, + } + }, { text = " Legion", submenu = { - { text = ("|T%1$s:16:16|t Order Hall Resources"):format("Interface\\Icons\\inv_orderhall_orderresources"), check = "showResources" }, - { text = ("|T%1$s:16:16|t Legionfall War Supplies"):format("Interface\\Icons\\inv_misc_summonable_boss_token"), check = "showLegionfallSupplies" }, - { text = ("|T%1$s:16:16|t Nethershard"):format("Interface\\Icons\\inv_datacrystal01"), check = "showNethershards" }, - { text = ("|T%1$s:16:16|t Veiled Argunite"):format("Interface\\Icons\\oshugun_crystalfragments"), check = "showArgunite" }, - { text = ("|T%1$s:16:16|t Wakening Essences"):format("Interface\\Icons\\achievement_dungeon_ulduar80_25man"), check = "showWakeningEssences" }, - } + { text = ("|T%1$s:16:16|t Order Hall Resources"):format("Interface\\Icons\\inv_orderhall_orderresources"), check = "showResources" }, + { text = ("|T%1$s:16:16|t Legionfall War Supplies"):format("Interface\\Icons\\inv_misc_summonable_boss_token"), check = "showLegionfallSupplies" }, + { text = ("|T%1$s:16:16|t Nethershard"):format("Interface\\Icons\\inv_datacrystal01"), check = "showNethershards" }, + { text = ("|T%1$s:16:16|t Veiled Argunite"):format("Interface\\Icons\\oshugun_crystalfragments"), check = "showArgunite" }, + { text = ("|T%1$s:16:16|t Wakening Essences"):format("Interface\\Icons\\achievement_dungeon_ulduar80_25man"), check = "showWakeningEssences" }, + } }, { text = "" }, { text = "Filter by type...", isTitle = true }, @@ -1982,7 +2026,14 @@ function BWQ:SetupConfigMenu() { text = "" }, { text = "Hide faction column", check="hideFactionColumn" }, { text = "Hide faction paragon bars", check="hideFactionParagonBars" }, - { text = "Always show quests for faction...", isTitle = true }, + { text = "Always show quests for faction...", isTitle = true }, + { text = " Dragonflight", submenu = { + { text = "Dragonscale Expedition", check="alwaysShowDragonscaleExpedition" }, + { text = "Iskaara Tuskarr", check="alwaysShowIskaaraTuskarr" }, + { text = "Maruuk Centaur", check="alwaysShowMaruukCentaur" }, + { text = "Valdrakken Accord", check="alwaysShowValdrakkenAccord" }, + } + }, { text = " Shadowlands", submenu = { { text = "The Avowed", check="alwaysShowAvowed" }, { text = "The Wild Hunt", check="alwaysShowWildHunt" }, From fcb5f0f4ab013f1044c1b26c34d2bbcf3fe23128 Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Wed, 7 Dec 2022 15:30:29 -0500 Subject: [PATCH 05/51] fix spacing --- WorldQuests.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index d5749ac..ca39b8c 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -1037,8 +1037,8 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalPrismaticManapearl = BWQ.totalPrismaticManapearl + quest.reward.prismaticManapearlAmount elseif rtype == CONSTANTS.REWARD_TYPES.CYPHERS_OF_THE_FIRST_ONES then BWQ.totalCyphersOfTheFirstOnes = BWQ.totalCyphersOfTheFirstOnes + quest.reward.cyphersOfTheFirstOnesAmount - elseif rtype == CONSTANTS.REWARD_TYPES.GRATEFUL_OFFERING then - BWQ.totalGratefulOffering = BWQ.totalGratefulOffering + quest.reward.gratefulOfferingAmount + elseif rtype == CONSTANTS.REWARD_TYPES.GRATEFUL_OFFERING then + BWQ.totalGratefulOffering = BWQ.totalGratefulOffering + quest.reward.gratefulOfferingAmount elseif rtype == CONSTANTS.REWARD_TYPES.BLOODY_TOKENS then BWQ.totalBloodyTokens = BWQ.totalBloodyTokens + quest.reward.bloodyTokensAmount elseif rtype == CONSTANTS.REWARD_TYPES.DRAGON_ISLES_SUPPLIES then From 1818693474806614d13a497ebbcacd4443834963 Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Wed, 7 Dec 2022 15:36:13 -0500 Subject: [PATCH 06/51] fix spacing --- WorldQuests.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index ca39b8c..e57a7c0 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -1890,8 +1890,8 @@ function BWQ:UpdateBlock() if C("brokerShowWakeningEssences") and BWQ.totalWakeningEssences > 0 then brokerString = string.format("%s|TInterface\\Icons\\achievement_dungeon_ulduar80_25man:16:16|t %s ", brokerString, BWQ.totalWakeningEssences) end if C("brokerShowWarResources") and BWQ.totalWarResources > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv__faction_warresources:16:16|t %d ", brokerString, BWQ.totalWarResources) end if C("brokerShowPrismaticManapearl") and BWQ.totalPrismaticManapearl > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_misc_enchantedpearlf:16:16|t %d ", brokerString, BWQ.totalPrismaticManapearl) end - if C("brokerShowCyphersOfTheFirstOnes") and BWQ.totalCyphersOfTheFirstOnes > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_trinket_progenitorraid_02_blue:16:16|t %d ", brokerString, BWQ.totalCyphersOfTheFirstOnes) end - if C("brokerShowGratefulOffering") and BWQ.totalGratefulOffering > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_ornatebox:16:16|t %d ", brokerString, BWQ.totalGratefulOffering) end + if C("brokerShowCyphersOfTheFirstOnes") and BWQ.totalCyphersOfTheFirstOnes > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_trinket_progenitorraid_02_blue:16:16|t %d ", brokerString, BWQ.totalCyphersOfTheFirstOnes) end + if C("brokerShowGratefulOffering") and BWQ.totalGratefulOffering > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_ornatebox:16:16|t %d ", brokerString, BWQ.totalGratefulOffering) end if C("brokerShowResources") and BWQ.totalResources > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_orderhall_orderresources:16:16|t %d ", brokerString, BWQ.totalResources) end if C("brokerShowLegionfallSupplies") and BWQ.totalLegionfallSupplies > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_summonable_boss_token:16:16|t %d ", brokerString, BWQ.totalLegionfallSupplies) end if C("brokerShowHonor") and BWQ.totalHonor > 0 then brokerString = string.format("%s|TInterface\\Icons\\Achievement_LegionPVPTier4:16:16|t %d ", brokerString, BWQ.totalHonor) end @@ -1903,9 +1903,9 @@ function BWQ:UpdateBlock() if C("brokerShowFishing") and BWQ.totalFishing > 0 then brokerString = string.format("%s|TInterface\\Icons\\Trade_Fishing:16:16|t %d ", brokerString, BWQ.totalFishing) end if C("brokerShowSkinning") and BWQ.totalSkinning > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_pelt_wolf_01:16:16|t %d ", brokerString, BWQ.totalSkinning) end if C("brokerShowBloodOfSargeras") and BWQ.totalBloodOfSargeras > 0 then brokerString = string.format("%s|T1417744:16:16|t %d", brokerString, BWQ.totalBloodOfSargeras) end - if C("brokerShowBloodyTokens") and BWQ.totalBloodyTokens > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2:16:16|t %d ", brokerString, BWQ.totalBloodyTokens) end + if C("brokerShowBloodyTokens") and BWQ.totalBloodyTokens > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2:16:16|t %d ", brokerString, BWQ.totalBloodyTokens) end if C("brokerShowDragonIslesSupplies") and BWQ.totalDragonIslesSupplies > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_faction_warresources:16:16|t %d ", brokerString, BWQ.totalDragonIslesSupplies) end - if C("brokerShowPolishedPetCharm") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end + if C("brokerShowPolishedPetCharm") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then BWQ.WorldQuestsBroker.text = brokerString From e6d71c3fba3458d6f46e6d3fafe5102c6307e2d8 Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Wed, 7 Dec 2022 15:37:20 -0500 Subject: [PATCH 07/51] fix spacing --- WorldQuests.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index e57a7c0..a7eb4aa 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -1903,9 +1903,9 @@ function BWQ:UpdateBlock() if C("brokerShowFishing") and BWQ.totalFishing > 0 then brokerString = string.format("%s|TInterface\\Icons\\Trade_Fishing:16:16|t %d ", brokerString, BWQ.totalFishing) end if C("brokerShowSkinning") and BWQ.totalSkinning > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_pelt_wolf_01:16:16|t %d ", brokerString, BWQ.totalSkinning) end if C("brokerShowBloodOfSargeras") and BWQ.totalBloodOfSargeras > 0 then brokerString = string.format("%s|T1417744:16:16|t %d", brokerString, BWQ.totalBloodOfSargeras) end - if C("brokerShowBloodyTokens") and BWQ.totalBloodyTokens > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2:16:16|t %d ", brokerString, BWQ.totalBloodyTokens) end + if C("brokerShowBloodyTokens") and BWQ.totalBloodyTokens > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2:16:16|t %d ", brokerString, BWQ.totalBloodyTokens) end if C("brokerShowDragonIslesSupplies") and BWQ.totalDragonIslesSupplies > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_faction_warresources:16:16|t %d ", brokerString, BWQ.totalDragonIslesSupplies) end - if C("brokerShowPolishedPetCharm") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end + if C("brokerShowPolishedPetCharm") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then BWQ.WorldQuestsBroker.text = brokerString From 329bc3a13031088bd752e283916a9ef6e3ff4e59 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 7 Dec 2022 17:26:59 -0600 Subject: [PATCH 08/51] The names used in CONSTANTS.REWARD_TYPES should match the currency name in game (verified via Wowhead). Some currencies are singular, some are plural. --- Constants.lua | 5 +++-- WorldQuests.lua | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Constants.lua b/Constants.lua index 2f48a8f..5bf71d5 100644 --- a/Constants.lua +++ b/Constants.lua @@ -39,6 +39,7 @@ CONSTANTS.WORLD_QUEST_TYPES = { RAID = 8, } +-- The name here should match the currency name in game (verified via Wowhead). Some currencies are singular, some are plural. CONSTANTS.REWARD_TYPES = { IRRELEVANT = -1, ARTIFACTPOWER = 0, @@ -50,10 +51,10 @@ CONSTANTS.REWARD_TYPES = { HONOR = 6, NETHERSHARD = 7, ARGUNITE = 8, - WAKENING_ESSENCES = 9, + WAKENING_ESSENCE = 9, WAR_RESOURCES = 10, MARK_OF_HONOR = 11, - SERVICE_MEDALS = 12, + SERVICE_MEDAL = 12, PRISMATIC_MANAPEARL = 13, SOULBIND_CONDUIT = 14, ANIMA_CONTAINER = 15, diff --git a/WorldQuests.lua b/WorldQuests.lua index a7eb4aa..a443ac8 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -841,7 +841,7 @@ local RetrieveWorldQuests = function(mapId) quest.reward.warResourceAmount = currency.amount if C("showWarResources") then quest.hide = false end elseif currencyId == 1716 or currencyId == 1717 then -- service medals - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.SERVICE_MEDALS + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.SERVICE_MEDAL quest.reward.serviceMedalAmount = currency.amount if C("showBFAServiceMedals") then quest.hide = false end elseif currencyId == 1220 then -- order hall resources @@ -859,7 +859,7 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ARGUNITE if C("showArgunite") then quest.hide = false end elseif currencyId == 1533 then - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WAKENING_ESSENCES + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WAKENING_ESSENCE quest.reward.wakeningEssencesAmount = currency.amount if C("showWakeningEssences") then quest.hide = false end elseif currencyId == 1721 then -- prismatic manapearl @@ -1013,11 +1013,11 @@ local RetrieveWorldQuests = function(mapId) for _, rtype in next, rewardType do if rtype == CONSTANTS.REWARD_TYPES.ARTIFACTPOWER and quest.reward.azeriteAmount then BWQ.totalArtifactPower = BWQ.totalArtifactPower + (quest.reward.azeriteAmount or 0) - elseif rtype == CONSTANTS.REWARD_TYPES.WAKENING_ESSENCES and quest.reward.wakeningEssencesAmount then + elseif rtype == CONSTANTS.REWARD_TYPES.WAKENING_ESSENCE and quest.reward.wakeningEssencesAmount then BWQ.totalWakeningEssences = BWQ.totalWakeningEssences + quest.reward.wakeningEssencesAmount elseif rtype == CONSTANTS.REWARD_TYPES.WAR_RESOURCES and quest.reward.warResourceAmount then BWQ.totalWarResources = BWQ.totalWarResources + quest.reward.warResourceAmount - elseif rtype == CONSTANTS.REWARD_TYPES.SERVICE_MEDALS and quest.reward.serviceMedalAmount then + elseif rtype == CONSTANTS.REWARD_TYPES.SERVICE_MEDAL and quest.reward.serviceMedalAmount then BWQ.totalServiceMedals = BWQ.totalServiceMedals + quest.reward.serviceMedalAmount elseif rtype == CONSTANTS.REWARD_TYPES.RESOURCES and quest.reward.resourceAmount then BWQ.totalResources = BWQ.totalResources + quest.reward.resourceAmount From 69db504279dd8ec73ff64754a152e75b6902c0ac Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 7 Dec 2022 17:38:11 -0600 Subject: [PATCH 09/51] Update 10.0.2.5 --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 170a341..98101ac 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 100002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.0.2.4 +## Version: 10.0.2.5 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fcfd93..fb813b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +### 10.0.2.5 + +Changes below submitted by ntowle (github) +* Broker options for Dragon Isles Supplies, Bloody Tokens, Polished Pet Charms +* Filters for Dragon Isles Supplies, Bloody Tokens +* Split DF reputation out +* Options for DF reputation by faction +* Total Polished Pet Charms available +* Total Dragon Isles Supplies available +* Reorganize menus to move old expansion options to submenus +* Fix Grateful Offering checkbox +* Fix Conduits icon + ### 10.0.2.4 * Add support for Valdrakken Accord (Dragonflight reputation currency) From 006e52acf327bd0690d75a46923b6a10e22e9a10 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Thu, 15 Dec 2022 22:12:02 -0600 Subject: [PATCH 10/51] Added support for "Primalist Tomorrow" zone (Dragonflight) Update version to 10.0.2.6 --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 13 +++---------- WorldQuests.lua | 1 + 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 98101ac..3b8f763 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 100002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.0.2.5 +## Version: 10.0.2.6 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index fb813b6..8716ad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ -### 10.0.2.5 +### 10.0.2.6 +* Added support for "Primalist Tomorrow" zone (Dragonflight) +### 10.0.2.5 Changes below submitted by ntowle (github) * Broker options for Dragon Isles Supplies, Bloody Tokens, Polished Pet Charms * Filters for Dragon Isles Supplies, Bloody Tokens @@ -12,38 +14,30 @@ Changes below submitted by ntowle (github) * Fix Conduits icon ### 10.0.2.4 - * Add support for Valdrakken Accord (Dragonflight reputation currency) ### 10.0.2.3 - * Add support for Bloody Tokens (Dragonflight PVP Currency) ### 10.0.2.1 - * Updates for Shadowlands compatibility * Initial Updates for Dragonflight compatibility ### 9.0.63 - * Bug fixes ### 9.0.62 - * Added BfA assault zones * Fixed paragon faction bar performance issue * Fixed some filters ### 9.0.61 - * Bug fixes for Shadowlands pre-patch ### 8.1.58 - * Fixed incorrect questIds for Battle on Zandalar and Kul Tiras ### 8.1.57 - * Added quest title highlight for achievement quest criterias - Fishing 'Round The Isles (Legion Fishing) - Battle on the Broken Isles (Legion Pet Battle) @@ -52,7 +46,6 @@ Changes below submitted by ntowle (github) * Fixed no world quests error message showing when all zones are collapsed ### 8.1.56 - * Added basic TomTom support. Clicking a row will set this quest as waypoint. * Added option to hide paragon reputation bars * Removed expansion toggle in dropdown menu (use the buttons in the top-right corner) diff --git a/WorldQuests.lua b/WorldQuests.lua index a443ac8..6e49023 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -51,6 +51,7 @@ local MAP_ZONES = { [2023] = { id = 2023, name = GetMapInfo(2023).name, quests = {}, buttons = {}, }, -- Ohn'ahran Plains 10.0 [2024] = { id = 2024, name = GetMapInfo(2024).name, quests = {}, buttons = {}, }, -- The Azure Span 10.0 [2025] = { id = 2025, name = GetMapInfo(2025).name, quests = {}, buttons = {}, }, -- Thaldraszus 10.0 + [2085] = { id = 2085, name = GetMapInfo(2085).name, quests = {}, buttons = {}, }, -- Primalist Tomorrow 10.0 }, [CONSTANTS.EXPANSIONS.SHADOWLANDS] = { [1525] = { id = 1525, name = GetMapInfo(1525).name, quests = {}, buttons = {}, }, -- Revendreth 9.0 From 89d8d998b894fbc40611f4e6a88717ca5d5f7c04 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Fri, 16 Dec 2022 22:26:44 -0600 Subject: [PATCH 11/51] Added support for "Rustbolt Resistance" reputation currency --- CHANGELOG.md | 3 +++ Constants.lua | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8716ad0..35a90ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 10.0.2.7 +* Added support for "Rustbolt Resistance" reputation currency (added in WoW v. 8.2.0.30918) + ### 10.0.2.6 * Added support for "Primalist Tomorrow" zone (Dragonflight) diff --git a/Constants.lua b/Constants.lua index 5bf71d5..3d34a7d 100644 --- a/Constants.lua +++ b/Constants.lua @@ -133,16 +133,17 @@ CONSTANTS.SHADOWLANDS_REPUTATION_CURRENCY_IDS = { } CONSTANTS.BFA_REPUTATION_CURRENCY_IDS = { - [1579] = true, -- both - [1598] = true, - [1600] = true, -- alliance - [1595] = true, - [1597] = true, - [1596] = true, - [1599] = true, -- horde - [1593] = true, - [1594] = true, - [1592] = true, + [1579] = true, -- Champions of Azeroth + [1598] = true, -- Tortollan Seekers + [1600] = true, -- Honorbound + [1595] = true, -- Talanji's Expedition + [1597] = true, -- Zandalari Empire + [1596] = true, -- Voldunai + [1599] = true, -- 7th Legion + [1593] = true, -- Proudmoore Admiralty + [1594] = true, -- Storm's Wake + [1592] = true, -- Order of Embers + [1742] = true, -- Rustbolt Resistance } CONSTANTS.FAMILY_FAMILIAR_QUEST_IDS = { -- WQ pet battle achievement From 572de1d85452a2f318c781ad569264d9fade1bc3 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Fri, 16 Dec 2022 22:29:00 -0600 Subject: [PATCH 12/51] Updated Version --- Broker_WorldQuests.toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 3b8f763..3774454 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 100002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.0.2.6 +## Version: 10.0.2.7 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. From eb95fbdd2ffc867ba80069381fecd9b43537eb49 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Fri, 30 Dec 2022 19:07:35 -0600 Subject: [PATCH 13/51] Fixed WQs not properly showing for "Primalist Tomorrow" --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 3 +++ WorldQuests.lua | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 3774454..ec7477c 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 100002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.0.2.7 +## Version: 10.0.2.8 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 35a90ae..4a48b71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 10.0.2.8 +* Fixed WQs not properly showing for "Primalist Tomorrow" zone (Dragonflight) + ### 10.0.2.7 * Added support for "Rustbolt Resistance" reputation currency (added in WoW v. 8.2.0.30918) diff --git a/WorldQuests.lua b/WorldQuests.lua index 6e49023..9b50aac 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -92,7 +92,7 @@ local MAP_ZONES = { } local MAP_ZONES_SORT = { [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { - 2022, 2023, 2024, 2025 + 2022, 2023, 2024, 2025, 2085 }, [CONSTANTS.EXPANSIONS.SHADOWLANDS] = { 1525, 1533, 1536, 1565, 1543, 1970 From d906eac1f1fea364a5e470b7d89824f22f3f415e Mon Sep 17 00:00:00 2001 From: Ciante79 <120906376+Ciante79@users.noreply.github.com> Date: Wed, 12 Apr 2023 00:44:55 +0200 Subject: [PATCH 14/51] Update for 10.0.7 Added The Forbidden Zone Added Currency: Elemental Overflow --- WorldQuests.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index 9b50aac..dac9441 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -52,6 +52,7 @@ local MAP_ZONES = { [2024] = { id = 2024, name = GetMapInfo(2024).name, quests = {}, buttons = {}, }, -- The Azure Span 10.0 [2025] = { id = 2025, name = GetMapInfo(2025).name, quests = {}, buttons = {}, }, -- Thaldraszus 10.0 [2085] = { id = 2085, name = GetMapInfo(2085).name, quests = {}, buttons = {}, }, -- Primalist Tomorrow 10.0 + [2151] = { id = 2151, name = GetMapInfo(2151).name, quests = {}, buttons = {}, }, -- The Forbidden Reach }, [CONSTANTS.EXPANSIONS.SHADOWLANDS] = { [1525] = { id = 1525, name = GetMapInfo(1525).name, quests = {}, buttons = {}, }, -- Revendreth 9.0 @@ -92,7 +93,7 @@ local MAP_ZONES = { } local MAP_ZONES_SORT = { [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { - 2022, 2023, 2024, 2025, 2085 + 2022, 2023, 2024, 2025, 2085, 2151 }, [CONSTANTS.EXPANSIONS.SHADOWLANDS] = { 1525, 1533, 1536, 1565, 1543, 1970 @@ -137,11 +138,13 @@ local defaultConfig = { brokerShowSkinning = false, brokerShowBloodOfSargeras = false, brokerShowDragonIslesSupplies = true, + brokerShowElementalOverflow = true, brokerShowBloodyTokens = true, brokerShowPolishedPetCharm = false, sortByTimeRemaining = false, -- reward type showDragonIslesSupplies = true, + showElementalOverflow = true, showBloodyTokens = true, showArtifactPower = true, showPrismaticManapearl = true, @@ -883,6 +886,10 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DRAGON_ISLES_SUPPLIES quest.reward.dragonIslesSuppliesAmount = currency.amount if C("showDragonIslesSupplies") then quest.hide = false end + elseif currencyId == 2118 then -- elemental overflow + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ELEMENTAL_OVERFLOW + quest.reward.elementalOverflowAmount = currency.amount + if C("showElementalOverflow") then quest.hide = false end else if DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -1044,6 +1051,8 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalBloodyTokens = BWQ.totalBloodyTokens + quest.reward.bloodyTokensAmount elseif rtype == CONSTANTS.REWARD_TYPES.DRAGON_ISLES_SUPPLIES then BWQ.totalDragonIslesSupplies = BWQ.totalDragonIslesSupplies + quest.reward.dragonIslesSuppliesAmount + elseif rtype == CONSTANTS.REWARD_TYPES.ELEMENTAL_OVERFLOW then + BWQ.totalElementalOverflow = BWQ.totalElementalOverflow + quest.reward.elementalOverflowAmount elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM then BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmAmount end @@ -1367,7 +1376,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -1906,6 +1915,7 @@ function BWQ:UpdateBlock() if C("brokerShowBloodOfSargeras") and BWQ.totalBloodOfSargeras > 0 then brokerString = string.format("%s|T1417744:16:16|t %d", brokerString, BWQ.totalBloodOfSargeras) end if C("brokerShowBloodyTokens") and BWQ.totalBloodyTokens > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2:16:16|t %d ", brokerString, BWQ.totalBloodyTokens) end if C("brokerShowDragonIslesSupplies") and BWQ.totalDragonIslesSupplies > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_faction_warresources:16:16|t %d ", brokerString, BWQ.totalDragonIslesSupplies) end + if C("brokerShowElementalOverflow") and BWQ.totalElementalOverflow > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_powder_thorium:16:16|t %d ", brokerString, BWQ.totalElementalOverflow) end if C("brokerShowPolishedPetCharm") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then @@ -1953,6 +1963,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%s$s:16:16|t Blood of Sargeras"):format("1417744"), check = "brokerShowBloodOfSargeras" }, { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "brokerShowBloodyTokens" }, { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "brokerShowDragonIslesSupplies" }, + { text = ("|T%1$s:16:16|t Elemental Overflow"):format("Interface\\Icons\\inv_misc_powder_thorium"), check = "brokerShowElementalOverflow" }, { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharm" }, } }, @@ -1968,6 +1979,7 @@ function BWQ:SetupConfigMenu() }, { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showDFReputation" }, { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "showDragonIslesSupplies" }, + { text = ("|T%1$s:16:16|t Elemental Overflow"):format("Interface\\Icons\\inv_misc_powder_thorium"), check = "ShowElementalOverflow" }, { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "showBloodyTokens" }, { text = ("|T%1$s:16:16|t Honor"):format("Interface\\Icons\\Achievement_LegionPVPTier4"), check = "showHonor" }, { text = ("|T%1$s:16:16|t Low gold reward"):format("Interface\\GossipFrame\\auctioneerGossipIcon"), check = "showLowGold" }, From b6c85119c6c66c3abb48ba3c26cf9dc475fc0b44 Mon Sep 17 00:00:00 2001 From: Ciante79 <120906376+Ciante79@users.noreply.github.com> Date: Fri, 14 Apr 2023 09:53:38 +0200 Subject: [PATCH 15/51] Update WorldQuests.lua --- WorldQuests.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index dac9441..c79dc39 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -1376,7 +1376,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) From baeb133d4b1ad057adfc2c4e7ae7b50d26b40ead Mon Sep 17 00:00:00 2001 From: Ciante79 <120906376+Ciante79@users.noreply.github.com> Date: Thu, 4 May 2023 17:20:56 +0200 Subject: [PATCH 16/51] Add files via upload --- Broker_WorldQuests.toc | 6 +++--- CHANGELOG.md | 6 ++++++ WorldQuests.lua | 18 +++++++++++++++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index ec7477c..59fba56 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ -## Interface: 100002 +## Interface: 100100 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.0.2.8 +## Version: 10.1.0 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. @@ -9,4 +9,4 @@ libs/CallbackHandler-1.0.lua libs/LibDataBroker-1.1.lua Constants.lua -WorldQuests.lua \ No newline at end of file +WorldQuests.lua diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a48b71..1fc3d6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### 10.1.0 +* Added Zaralek Cavern and Flightstone currency + +### 10.0.7 +* Added Forbidden Reach zone and Elemental Overflow currency + ### 10.0.2.8 * Fixed WQs not properly showing for "Primalist Tomorrow" zone (Dragonflight) diff --git a/WorldQuests.lua b/WorldQuests.lua index c79dc39..603f133 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -53,6 +53,7 @@ local MAP_ZONES = { [2025] = { id = 2025, name = GetMapInfo(2025).name, quests = {}, buttons = {}, }, -- Thaldraszus 10.0 [2085] = { id = 2085, name = GetMapInfo(2085).name, quests = {}, buttons = {}, }, -- Primalist Tomorrow 10.0 [2151] = { id = 2151, name = GetMapInfo(2151).name, quests = {}, buttons = {}, }, -- The Forbidden Reach + [2133] = { id = 2133, name = GetMapInfo(2133).name, quests = {}, buttons = {}, }, -- Zaralek Cavern }, [CONSTANTS.EXPANSIONS.SHADOWLANDS] = { [1525] = { id = 1525, name = GetMapInfo(1525).name, quests = {}, buttons = {}, }, -- Revendreth 9.0 @@ -93,7 +94,7 @@ local MAP_ZONES = { } local MAP_ZONES_SORT = { [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { - 2022, 2023, 2024, 2025, 2085, 2151 + 2022, 2023, 2024, 2025, 2085, 2151, 2133 }, [CONSTANTS.EXPANSIONS.SHADOWLANDS] = { 1525, 1533, 1536, 1565, 1543, 1970 @@ -139,12 +140,14 @@ local defaultConfig = { brokerShowBloodOfSargeras = false, brokerShowDragonIslesSupplies = true, brokerShowElementalOverflow = true, + brokerShowFlightstones = true, brokerShowBloodyTokens = true, brokerShowPolishedPetCharm = false, sortByTimeRemaining = false, -- reward type showDragonIslesSupplies = true, showElementalOverflow = true, + showFlightstones = true, showBloodyTokens = true, showArtifactPower = true, showPrismaticManapearl = true, @@ -890,6 +893,10 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ELEMENTAL_OVERFLOW quest.reward.elementalOverflowAmount = currency.amount if C("showElementalOverflow") then quest.hide = false end + elseif currencyId == 2245 then -- flightstones + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.FLIGHTSTONES + quest.reward.flightstonesAmount = currency.amount + if C("showFlightstones") then quest.hide = false end else if DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -1053,6 +1060,8 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalDragonIslesSupplies = BWQ.totalDragonIslesSupplies + quest.reward.dragonIslesSuppliesAmount elseif rtype == CONSTANTS.REWARD_TYPES.ELEMENTAL_OVERFLOW then BWQ.totalElementalOverflow = BWQ.totalElementalOverflow + quest.reward.elementalOverflowAmount + elseif rtype == CONSTANTS.REWARD_TYPES.FLIGHTSTONES then + BWQ.totalFlightstones = BWQ.totalFlightstones + quest.reward.FlightstonesAmount elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM then BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmAmount end @@ -1376,7 +1385,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -1915,7 +1924,8 @@ function BWQ:UpdateBlock() if C("brokerShowBloodOfSargeras") and BWQ.totalBloodOfSargeras > 0 then brokerString = string.format("%s|T1417744:16:16|t %d", brokerString, BWQ.totalBloodOfSargeras) end if C("brokerShowBloodyTokens") and BWQ.totalBloodyTokens > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2:16:16|t %d ", brokerString, BWQ.totalBloodyTokens) end if C("brokerShowDragonIslesSupplies") and BWQ.totalDragonIslesSupplies > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_faction_warresources:16:16|t %d ", brokerString, BWQ.totalDragonIslesSupplies) end - if C("brokerShowElementalOverflow") and BWQ.totalElementalOverflow > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_powder_thorium:16:16|t %d ", brokerString, BWQ.totalElementalOverflow) end + if C("brokerShowElementalOverflow") and BWQ.totalElementalOverflow > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_powder_thorium:16:16|t %d ", brokerString, BWQ.totalElementalOverflow) end + if C("brokerShowFlightstones") and BWQ.totalFlightstones > 0 then brokerString = string.format("%s|TInterface\\Icons\\flightstone-dragonflight:16:16|t %d ", brokerString, BWQ.totalFlightstones) end if C("brokerShowPolishedPetCharm") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then @@ -1964,6 +1974,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "brokerShowBloodyTokens" }, { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "brokerShowDragonIslesSupplies" }, { text = ("|T%1$s:16:16|t Elemental Overflow"):format("Interface\\Icons\\inv_misc_powder_thorium"), check = "brokerShowElementalOverflow" }, + { text = ("|T%1$s:16:16|t Flghtstones"):format("Interface\\Icons\\flightstone-dragonflight"), check = "brokerShowFlightstones" }, { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharm" }, } }, @@ -1980,6 +1991,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showDFReputation" }, { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "showDragonIslesSupplies" }, { text = ("|T%1$s:16:16|t Elemental Overflow"):format("Interface\\Icons\\inv_misc_powder_thorium"), check = "ShowElementalOverflow" }, + { text = ("|T%1$s:16:16|t Flghtstones"):format("Interface\\Icons\\flightstone-dragonflight"), check = "showFlightstones" }, { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "showBloodyTokens" }, { text = ("|T%1$s:16:16|t Honor"):format("Interface\\Icons\\Achievement_LegionPVPTier4"), check = "showHonor" }, { text = ("|T%1$s:16:16|t Low gold reward"):format("Interface\\GossipFrame\\auctioneerGossipIcon"), check = "showLowGold" }, From 23e99a1eab350815f25354aafb390aaef1d060ac Mon Sep 17 00:00:00 2001 From: Ciante79 <120906376+Ciante79@users.noreply.github.com> Date: Thu, 4 May 2023 23:38:42 +0200 Subject: [PATCH 17/51] Add files via upload --- WorldQuests.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index 603f133..5f46371 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -142,7 +142,7 @@ local defaultConfig = { brokerShowElementalOverflow = true, brokerShowFlightstones = true, brokerShowBloodyTokens = true, - brokerShowPolishedPetCharm = false, + brokerShowPolishedPetCharms = false, sortByTimeRemaining = false, -- reward type showDragonIslesSupplies = true, @@ -775,9 +775,9 @@ local RetrieveWorldQuests = function(mapId) quest.sort = quest.sort > CONSTANTS.SORT_ORDER.ITEM and quest.sort or CONSTANTS.SORT_ORDER.ITEM rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.MARK_OF_HONOR if C("showItems") and C("showMarkOfHonor") then quest.hide = false end - elseif itemId == 163036 then -- polished pet charm - quest.reward.polishedPetCharmAmount = quest.reward.itemQuantity - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM + elseif itemId == 163036 then -- polished pet charms + quest.reward.polishedPetCharmsAmount = quest.reward.itemQuantity + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARMS else quest.sort = quest.sort > CONSTANTS.SORT_ORDER.ITEM and quest.sort or CONSTANTS.SORT_ORDER.ITEM rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT @@ -1062,8 +1062,8 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalElementalOverflow = BWQ.totalElementalOverflow + quest.reward.elementalOverflowAmount elseif rtype == CONSTANTS.REWARD_TYPES.FLIGHTSTONES then BWQ.totalFlightstones = BWQ.totalFlightstones + quest.reward.FlightstonesAmount - elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM then - BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmAmount + elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARMS then + BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmsAmount end end end @@ -1926,7 +1926,7 @@ function BWQ:UpdateBlock() if C("brokerShowDragonIslesSupplies") and BWQ.totalDragonIslesSupplies > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_faction_warresources:16:16|t %d ", brokerString, BWQ.totalDragonIslesSupplies) end if C("brokerShowElementalOverflow") and BWQ.totalElementalOverflow > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_powder_thorium:16:16|t %d ", brokerString, BWQ.totalElementalOverflow) end if C("brokerShowFlightstones") and BWQ.totalFlightstones > 0 then brokerString = string.format("%s|TInterface\\Icons\\flightstone-dragonflight:16:16|t %d ", brokerString, BWQ.totalFlightstones) end - if C("brokerShowPolishedPetCharm") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end + if C("brokerShowPolishedPetCharms") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then BWQ.WorldQuestsBroker.text = brokerString @@ -1975,7 +1975,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "brokerShowDragonIslesSupplies" }, { text = ("|T%1$s:16:16|t Elemental Overflow"):format("Interface\\Icons\\inv_misc_powder_thorium"), check = "brokerShowElementalOverflow" }, { text = ("|T%1$s:16:16|t Flghtstones"):format("Interface\\Icons\\flightstone-dragonflight"), check = "brokerShowFlightstones" }, - { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharm" }, + { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharms" }, } }, { text = "Sort list by time remaining instead of reward type", check = "sortByTimeRemaining" }, From cfe4515b5af120edc35128293d8e00a34ff46ade Mon Sep 17 00:00:00 2001 From: Ciante79 <120906376+Ciante79@users.noreply.github.com> Date: Thu, 7 Sep 2023 18:42:16 +0200 Subject: [PATCH 18/51] Update CHANGELOG.md TOC Bumb for 10.1.7 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fc3d6d..cc84a18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 10.1.7 +* TOC Bump + ### 10.1.0 * Added Zaralek Cavern and Flightstone currency @@ -61,4 +64,4 @@ Changes below submitted by ntowle (github) * Added basic TomTom support. Clicking a row will set this quest as waypoint. * Added option to hide paragon reputation bars * Removed expansion toggle in dropdown menu (use the buttons in the top-right corner) -* Moved some options to reduce number of dropdown items \ No newline at end of file +* Moved some options to reduce number of dropdown items From ac415e1dce0d0789e05e229f2360d6c017ac0fc8 Mon Sep 17 00:00:00 2001 From: Ciante79 <120906376+Ciante79@users.noreply.github.com> Date: Thu, 7 Sep 2023 18:43:15 +0200 Subject: [PATCH 19/51] Update Broker_WorldQuests.toc TOC Bump for 10.1.7 --- Broker_WorldQuests.toc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 59fba56..8021f0d 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ -## Interface: 100100 +## Interface: 100107 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.1.0 +## Version: 10.1.7 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. From 432b2b65260948b1e9123314efef8edc022a96cf Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 17 Jan 2024 01:17:59 -0600 Subject: [PATCH 20/51] Linting --- WorldQuests.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/WorldQuests.lua b/WorldQuests.lua index 5f46371..fbb2655 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -45,6 +45,7 @@ local DEBUG = true local isHorde = UnitFactionGroup("player") == "Horde" +-- When adding zones to MAP_ZONES, be sure to also add the zoneID to MAP_ZONES_SORT immediately below local MAP_ZONES = { [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { [2022] = { id = 2022, name = GetMapInfo(2022).name, quests = {}, buttons = {}, }, -- The Waking Shores 10.0 From 85c406c18ea1b5cd35bb1403582bbd7eb2caca1a Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 17 Jan 2024 01:26:28 -0600 Subject: [PATCH 21/51] Added Artisan's Consortium reputation currency --- Constants.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Constants.lua b/Constants.lua index 3d34a7d..226877c 100644 --- a/Constants.lua +++ b/Constants.lua @@ -112,6 +112,7 @@ CONSTANTS.CURRENCIES_AFFECTED_BY_WARMODE = { } CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS = { + [2107] = true, -- Artisan's Consortium [2108] = true, -- Maruuk Centaur [2109] = true, -- Iskaara Tuskarr [2031] = true, -- Dragonscale Expedition From e3eff6445713529f47c795b8b7bde9463b7b0c55 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 17 Jan 2024 01:31:29 -0600 Subject: [PATCH 22/51] Updated Interface version and Addon version numbers --- Broker_WorldQuests.toc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 8021f0d..542af70 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ -## Interface: 100107 +## Interface: 100205 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.1.7 +## Version: 10.2.5.0 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. From c64166dc6e2af42cf361a6197b232d924d2cfcb5 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 17 Jan 2024 01:37:56 -0600 Subject: [PATCH 23/51] Added additional Dragonflight reputations, etc. to Constants.lua --- Constants.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Constants.lua b/Constants.lua index 226877c..17bdaf9 100644 --- a/Constants.lua +++ b/Constants.lua @@ -62,7 +62,14 @@ CONSTANTS.REWARD_TYPES = { CYPHERS_OF_THE_FIRST_ONES = 16, BLOODY_TOKENS = 17, DRAGON_ISLES_SUPPLIES = 18, - POLISHED_PET_CHARM = 19, + ELEMENTAL_OVERFLOW = 19, + FLIGHTSTONES = 20, + POLISHED_PET_CHARM = 21, + BATTLE_PET_BANDAGE = 22, + WHELPLINGS_DREAMING_CREST = 23, + DRAKES_DREAMING_CREST = 24, + WYRMS_DREAMING_CREST = 25, + ASPECTS_DREAMING_CREST = 26, } CONSTANTS.QUEST_TYPES = { @@ -117,6 +124,8 @@ CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS = { [2109] = true, -- Iskaara Tuskarr [2031] = true, -- Dragonscale Expedition [2106] = true, -- Valdrakken Accord + [2420] = true, -- Loamm Niffen + [2652] = true, -- Dream wardens } CONSTANTS.SHADOWLANDS_REPUTATION_CURRENCY_IDS = { @@ -345,11 +354,13 @@ CONSTANTS.PARAGON_FACTIONS = { [2478] = "inv_misc_enlightenedbrokers_paragoncache01", -- TheEnlightened }, dragonflight = { - order = {2507, 2503, 2511, 2510 }, + order = {2507, 2503, 2511, 2510, 2564, 2574 }, [2507] = "ui_majorfaction_expedition", -- Dragonscale Expedition [2503] = "ui_majorfaction_centaur", -- Maruuk Centaur [2511] = "ui_majorfaction_tuskarr", -- Iskaara Tuskarr [2510] = "ui_majorfaction_valdrakken", -- Valdrakken Accord + [2564] = "ui_majorfaction_niffen", -- Loamm Niffen + [2574] = "ui_majorfaction_denizens", -- Dream Wardens }, } From bef5ff067ed796e0218dc73ffe4f2dd101dbae88 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 17 Jan 2024 23:22:47 -0600 Subject: [PATCH 24/51] Updates for Dragonflight --- WorldQuests.lua | 65 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index fbb2655..9991302 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -53,8 +53,9 @@ local MAP_ZONES = { [2024] = { id = 2024, name = GetMapInfo(2024).name, quests = {}, buttons = {}, }, -- The Azure Span 10.0 [2025] = { id = 2025, name = GetMapInfo(2025).name, quests = {}, buttons = {}, }, -- Thaldraszus 10.0 [2085] = { id = 2085, name = GetMapInfo(2085).name, quests = {}, buttons = {}, }, -- Primalist Tomorrow 10.0 - [2151] = { id = 2151, name = GetMapInfo(2151).name, quests = {}, buttons = {}, }, -- The Forbidden Reach - [2133] = { id = 2133, name = GetMapInfo(2133).name, quests = {}, buttons = {}, }, -- Zaralek Cavern + [2151] = { id = 2151, name = GetMapInfo(2151).name, quests = {}, buttons = {}, }, -- The Forbidden Reach 10.0.7 + [2133] = { id = 2133, name = GetMapInfo(2133).name, quests = {}, buttons = {}, }, -- Zaralek Cavern 10.1 + [2200] = { id = 2200, name = GetMapInfo(2200).name, quests = {}, buttons = {}, }, -- Emerald Dream 10.2 }, [CONSTANTS.EXPANSIONS.SHADOWLANDS] = { [1525] = { id = 1525, name = GetMapInfo(1525).name, quests = {}, buttons = {}, }, -- Revendreth 9.0 @@ -95,7 +96,7 @@ local MAP_ZONES = { } local MAP_ZONES_SORT = { [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { - 2022, 2023, 2024, 2025, 2085, 2151, 2133 + 2022, 2023, 2024, 2025, 2085, 2151, 2133, 2200 }, [CONSTANTS.EXPANSIONS.SHADOWLANDS] = { 1525, 1533, 1536, 1565, 1543, 1970 @@ -142,6 +143,10 @@ local defaultConfig = { brokerShowDragonIslesSupplies = true, brokerShowElementalOverflow = true, brokerShowFlightstones = true, + brokerShowWhelplingsDreamingCrest = true, + brokerShowDrakesDreamingCrest = true, + brokerShowWyrmsDreamingCrest = true, + brokerShowAspectsDreamingCrest = true, brokerShowBloodyTokens = true, brokerShowPolishedPetCharms = false, sortByTimeRemaining = false, @@ -149,6 +154,10 @@ local defaultConfig = { showDragonIslesSupplies = true, showElementalOverflow = true, showFlightstones = true, + showWhelplingsDreamingCrest = true, + showDrakesDreamingCrest = true, + showWyrmsDreamingCrest = true, + showAspectsDreamingCrest = true, showBloodyTokens = true, showArtifactPower = true, showPrismaticManapearl = true, @@ -200,6 +209,8 @@ local defaultConfig = { alwaysShowIskaaraTuskarr = false, alwaysShowMaruukCentaur = false, alwaysShowValdrakkenAccord = false, + alwaysShowLoammNiffen = false, + alwaysShowDreamWardens = false, -- Shadowlands alwaysShowAscended = false, alwaysShowUndyingArmy = false, @@ -898,6 +909,22 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.FLIGHTSTONES quest.reward.flightstonesAmount = currency.amount if C("showFlightstones") then quest.hide = false end + elseif currencyId == 2706 then -- Whelplings Dreaming Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WhelplingsDreamingCrest + quest.reward.WhelplingsDreamingCrestAmount = currency.amount + if C("showWhelplingsDreamingCrest") then quest.hide = false end + elseif currencyId == 2707 then -- Drakes Dreaming Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DrakesDreamingCrest + quest.reward.DrakesDreamingCrestAmount = currency.amount + if C("showDrakesDreamingCrest") then quest.hide = false end + elseif currencyId == 2708 then -- Wyrms Dreaming Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WyrmsDreamingCrest + quest.reward.WyrmsDreamingCrestAmount = currency.amount + if C("showWyrmsDreamingCrest") then quest.hide = false end + elseif currencyId == 2709 then -- Aspects Dreaming Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.AspectsDreamingCrest + quest.reward.AspectsDreamingCrestAmount = currency.amount + if C("showAspectsDreamingCrest") then quest.hide = false end else if DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -976,6 +1003,8 @@ local RetrieveWorldQuests = function(mapId) (C("alwaysShowIskaaraTuskarr") and quest.factionId == 2511) or (C("alwaysShowMaruukCentaur") and quest.factionId == 2503) or (C("alwaysShowValdrakkenAccord") and quest.factionId == 2510) or + (C("alwaysShowLoammNiffen") and quest.factionId == 2564) or + (C("alwaysShowDreamWardens") and quest.factionId == 2574) or -- Shadowlands (C("alwaysShowAscended") and quest.factionId == 2407) or (C("alwaysShowUndyingArmy") and quest.factionId == 2410) or @@ -1062,7 +1091,15 @@ local RetrieveWorldQuests = function(mapId) elseif rtype == CONSTANTS.REWARD_TYPES.ELEMENTAL_OVERFLOW then BWQ.totalElementalOverflow = BWQ.totalElementalOverflow + quest.reward.elementalOverflowAmount elseif rtype == CONSTANTS.REWARD_TYPES.FLIGHTSTONES then - BWQ.totalFlightstones = BWQ.totalFlightstones + quest.reward.FlightstonesAmount + BWQ.totalFlightstones = BWQ.totalFlightstones + quest.reward.flightstonesAmount + elseif rtype == CONSTANTS.REWARD_TYPES.WhelplingsDreamingCrest then + BWQ.totalWhelplingsDreamingCrest = BWQ.totalWhelplingsDreamingCrest + quest.reward.WhelplingsDreamingCrestAmount + elseif rtype == CONSTANTS.REWARD_TYPES.DrakesDreamingCrest then + BWQ.totalDrakesDreamingCrest = BWQ.totalDrakesDreamingCrest + quest.reward.DrakesDreamingCrestAmount + elseif rtype == CONSTANTS.REWARD_TYPES.WyrmsDreamingCrest then + BWQ.totalWyrmsDreamingCrest = BWQ.totalWyrmsDreamingCrest + quest.reward.WyrmsDreamingCrestAmount + elseif rtype == CONSTANTS.REWARD_TYPES.AspectsDreamingCrest then + BWQ.totalAspectsDreamingCrest = BWQ.totalAspectsDreamingCrest + quest.reward.AspectsDreamingCrestAmount elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARMS then BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmsAmount end @@ -1386,7 +1423,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -1927,6 +1964,10 @@ function BWQ:UpdateBlock() if C("brokerShowDragonIslesSupplies") and BWQ.totalDragonIslesSupplies > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_faction_warresources:16:16|t %d ", brokerString, BWQ.totalDragonIslesSupplies) end if C("brokerShowElementalOverflow") and BWQ.totalElementalOverflow > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_misc_powder_thorium:16:16|t %d ", brokerString, BWQ.totalElementalOverflow) end if C("brokerShowFlightstones") and BWQ.totalFlightstones > 0 then brokerString = string.format("%s|TInterface\\Icons\\flightstone-dragonflight:16:16|t %d ", brokerString, BWQ.totalFlightstones) end + if C("brokerShowWhelplingsDreamingCrest") and BWQ.totalWhelplingsDreamingCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_whelplingsdreamingcrest:16:16|t %d ", brokerString, BWQ.totalWhelplingsDreamingCrest) end + if C("brokerShowDrakesDreamingCrest") and BWQ.totalDrakesDreamingCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest:16:16|t %d ", brokerString, BWQ.totalDrakesDreamingCrest) end + if C("brokerShowWyrmsDreamingCrest") and BWQ.totalWyrmsDreamingCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest:16:16|t %d ", brokerString, BWQ.totalWyrmsDreamingCrest) end + if C("brokerShowAspectsDreamingCrest") and BWQ.totalAspectsDreamingCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest:16:16|t %d ", brokerString, BWQ.totalAspectsDreamingCrest) end if C("brokerShowPolishedPetCharms") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then @@ -1975,7 +2016,11 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "brokerShowBloodyTokens" }, { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "brokerShowDragonIslesSupplies" }, { text = ("|T%1$s:16:16|t Elemental Overflow"):format("Interface\\Icons\\inv_misc_powder_thorium"), check = "brokerShowElementalOverflow" }, - { text = ("|T%1$s:16:16|t Flghtstones"):format("Interface\\Icons\\flightstone-dragonflight"), check = "brokerShowFlightstones" }, + { text = ("|T%1$s:16:16|t Flightstones"):format("Interface\\Icons\\flightstone-dragonflight"), check = "brokerShowFlightstones" }, + { text = ("|T%1$s:16:16|t Whelplings Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_whelplingsdreamingcrest"), check = "brokerShowWhelplingsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Drakes Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest"), check = "brokerShowDrakesDreamingCrest" }, + { text = ("|T%1$s:16:16|t Wyrms Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest"), check = "brokerShowWyrmsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Aspects Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest"), check = "brokerShowAspectsDreamingCrest" }, { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharms" }, } }, @@ -1992,7 +2037,11 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showDFReputation" }, { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "showDragonIslesSupplies" }, { text = ("|T%1$s:16:16|t Elemental Overflow"):format("Interface\\Icons\\inv_misc_powder_thorium"), check = "ShowElementalOverflow" }, - { text = ("|T%1$s:16:16|t Flghtstones"):format("Interface\\Icons\\flightstone-dragonflight"), check = "showFlightstones" }, + { text = ("|T%1$s:16:16|t Flightstones"):format("Interface\\Icons\\flightstone-dragonflight"), check = "showFlightstones" }, + { text = ("|T%1$s:16:16|t Whelplings Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_whelplingsdreamingcrest"), check = "showWhelplingsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Drakes Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest"), check = "showDrakesDreamingCrest" }, + { text = ("|T%1$s:16:16|t Wyrms Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest"), check = "showWyrmsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Aspects Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest"), check = "showAspectsDreamingCrest" }, { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "showBloodyTokens" }, { text = ("|T%1$s:16:16|t Honor"):format("Interface\\Icons\\Achievement_LegionPVPTier4"), check = "showHonor" }, { text = ("|T%1$s:16:16|t Low gold reward"):format("Interface\\GossipFrame\\auctioneerGossipIcon"), check = "showLowGold" }, @@ -2058,6 +2107,8 @@ function BWQ:SetupConfigMenu() { text = "Iskaara Tuskarr", check="alwaysShowIskaaraTuskarr" }, { text = "Maruuk Centaur", check="alwaysShowMaruukCentaur" }, { text = "Valdrakken Accord", check="alwaysShowValdrakkenAccord" }, + { text = "Loamm Niffen", check="alwaysShowLoammNiffen" }, + { text = "Dream Wardens", check="alwaysShowDreamWardens" }, } }, { text = " Shadowlands", submenu = { From 56f331b2bc8a04f724d6d39f60ec0f5303d1697a Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 17 Jan 2024 23:24:37 -0600 Subject: [PATCH 25/51] Updates for Dragonflight 10.1, 10.2 and 10.2.5 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc84a18..2e7a7b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 10.2.5.0 +* Updates for Dragonflight 10.1, 10.2 and 10.2.5 + ### 10.1.7 * TOC Bump From 72141c5c090bd17c2174a3a7bce6e49d2c7db8ba Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 17 Jan 2024 23:28:16 -0600 Subject: [PATCH 26/51] All CONSTANTS.REWARD_TYPES should be capitalized to match past coding practices within Constants.lua --- WorldQuests.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index 9991302..c351097 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -910,19 +910,19 @@ local RetrieveWorldQuests = function(mapId) quest.reward.flightstonesAmount = currency.amount if C("showFlightstones") then quest.hide = false end elseif currencyId == 2706 then -- Whelplings Dreaming Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WhelplingsDreamingCrest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WHELPLINGS_DREAMING_CREST quest.reward.WhelplingsDreamingCrestAmount = currency.amount if C("showWhelplingsDreamingCrest") then quest.hide = false end elseif currencyId == 2707 then -- Drakes Dreaming Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DrakesDreamingCrest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DRAKES_DREAMING_CREST quest.reward.DrakesDreamingCrestAmount = currency.amount if C("showDrakesDreamingCrest") then quest.hide = false end elseif currencyId == 2708 then -- Wyrms Dreaming Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WyrmsDreamingCrest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WYRMS_DREAMING_CREST quest.reward.WyrmsDreamingCrestAmount = currency.amount if C("showWyrmsDreamingCrest") then quest.hide = false end elseif currencyId == 2709 then -- Aspects Dreaming Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.AspectsDreamingCrest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ASPECTS_DREAMING_CREST quest.reward.AspectsDreamingCrestAmount = currency.amount if C("showAspectsDreamingCrest") then quest.hide = false end else @@ -1092,13 +1092,13 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalElementalOverflow = BWQ.totalElementalOverflow + quest.reward.elementalOverflowAmount elseif rtype == CONSTANTS.REWARD_TYPES.FLIGHTSTONES then BWQ.totalFlightstones = BWQ.totalFlightstones + quest.reward.flightstonesAmount - elseif rtype == CONSTANTS.REWARD_TYPES.WhelplingsDreamingCrest then + elseif rtype == CONSTANTS.REWARD_TYPES.WHELPLINGS_DREAMING_CREST then BWQ.totalWhelplingsDreamingCrest = BWQ.totalWhelplingsDreamingCrest + quest.reward.WhelplingsDreamingCrestAmount - elseif rtype == CONSTANTS.REWARD_TYPES.DrakesDreamingCrest then + elseif rtype == CONSTANTS.REWARD_TYPES.DRAKES_DREAMING_CREST then BWQ.totalDrakesDreamingCrest = BWQ.totalDrakesDreamingCrest + quest.reward.DrakesDreamingCrestAmount - elseif rtype == CONSTANTS.REWARD_TYPES.WyrmsDreamingCrest then + elseif rtype == CONSTANTS.REWARD_TYPES.WYRMS_DREAMING_CREST then BWQ.totalWyrmsDreamingCrest = BWQ.totalWyrmsDreamingCrest + quest.reward.WyrmsDreamingCrestAmount - elseif rtype == CONSTANTS.REWARD_TYPES.AspectsDreamingCrest then + elseif rtype == CONSTANTS.REWARD_TYPES.ASPECTS_DREAMING_CREST then BWQ.totalAspectsDreamingCrest = BWQ.totalAspectsDreamingCrest + quest.reward.AspectsDreamingCrestAmount elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARMS then BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmsAmount From 32538d8a32ee346654c557d8322f7b6ed7e6dc54 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Thu, 18 Jan 2024 20:29:09 -0600 Subject: [PATCH 27/51] Add support for 10.2.5 currency "Mysterious Fragment" --- Constants.lua | 1 + WorldQuests.lua | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Constants.lua b/Constants.lua index 17bdaf9..576cc5f 100644 --- a/Constants.lua +++ b/Constants.lua @@ -70,6 +70,7 @@ CONSTANTS.REWARD_TYPES = { DRAKES_DREAMING_CREST = 24, WYRMS_DREAMING_CREST = 25, ASPECTS_DREAMING_CREST = 26, + MYSTERIOUS_FRAGMENT = 27, } CONSTANTS.QUEST_TYPES = { diff --git a/WorldQuests.lua b/WorldQuests.lua index c351097..b3bc3f0 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -147,6 +147,7 @@ local defaultConfig = { brokerShowDrakesDreamingCrest = true, brokerShowWyrmsDreamingCrest = true, brokerShowAspectsDreamingCrest = true, + brokerShowMysteriousFragment = true, brokerShowBloodyTokens = true, brokerShowPolishedPetCharms = false, sortByTimeRemaining = false, @@ -158,6 +159,7 @@ local defaultConfig = { showDrakesDreamingCrest = true, showWyrmsDreamingCrest = true, showAspectsDreamingCrest = true, + showMysteriousFragment = true, showBloodyTokens = true, showArtifactPower = true, showPrismaticManapearl = true, @@ -925,6 +927,10 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ASPECTS_DREAMING_CREST quest.reward.AspectsDreamingCrestAmount = currency.amount if C("showAspectsDreamingCrest") then quest.hide = false end + elseif currencyId == 2657 then -- Mysterious Fragment + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.MYSTERIOUS_FRAGMENT + quest.reward.MysteriousFragmentAmount = currency.amount + if C("showMysteriousFragment") then quest.hide = false end else if DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -1100,6 +1106,8 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalWyrmsDreamingCrest = BWQ.totalWyrmsDreamingCrest + quest.reward.WyrmsDreamingCrestAmount elseif rtype == CONSTANTS.REWARD_TYPES.ASPECTS_DREAMING_CREST then BWQ.totalAspectsDreamingCrest = BWQ.totalAspectsDreamingCrest + quest.reward.AspectsDreamingCrestAmount + elseif rtype == CONSTANTS.REWARD_TYPES.MYSTERIOUS_FRAGMENT then + BWQ.totalMysteriousFragment = BWQ.totalMysteriousFragment + quest.reward.MysteriousFragmentAmount elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARMS then BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmsAmount end @@ -1423,7 +1431,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalMysteriousFragment, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -1968,6 +1976,7 @@ function BWQ:UpdateBlock() if C("brokerShowDrakesDreamingCrest") and BWQ.totalDrakesDreamingCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest:16:16|t %d ", brokerString, BWQ.totalDrakesDreamingCrest) end if C("brokerShowWyrmsDreamingCrest") and BWQ.totalWyrmsDreamingCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest:16:16|t %d ", brokerString, BWQ.totalWyrmsDreamingCrest) end if C("brokerShowAspectsDreamingCrest") and BWQ.totalAspectsDreamingCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest:16:16|t %d ", brokerString, BWQ.totalAspectsDreamingCrest) end + if C("brokerShowMysteriousFragment") and BWQ.totalMysteriousFragment > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_7_0raid_trinket_05a:16:16|t %d ", brokerString, BWQ.totalMysteriousFragment) end if C("brokerShowPolishedPetCharms") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then @@ -2021,6 +2030,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Drakes Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest"), check = "brokerShowDrakesDreamingCrest" }, { text = ("|T%1$s:16:16|t Wyrms Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest"), check = "brokerShowWyrmsDreamingCrest" }, { text = ("|T%1$s:16:16|t Aspects Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest"), check = "brokerShowAspectsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Mysterious Fragment"):format("Interface\\Icons\\Inv_7_0raid_trinket_05a"), check = "brokerShowMysteriousFragment" }, { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharms" }, } }, @@ -2042,6 +2052,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Drakes Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest"), check = "showDrakesDreamingCrest" }, { text = ("|T%1$s:16:16|t Wyrms Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest"), check = "showWyrmsDreamingCrest" }, { text = ("|T%1$s:16:16|t Aspects Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest"), check = "showAspectsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Mysterious Fragment"):format("Interface\\Icons\\Inv_7_0raid_trinket_05a"), check = "showMysteriousFragment" }, { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "showBloodyTokens" }, { text = ("|T%1$s:16:16|t Honor"):format("Interface\\Icons\\Achievement_LegionPVPTier4"), check = "showHonor" }, { text = ("|T%1$s:16:16|t Low gold reward"):format("Interface\\GossipFrame\\auctioneerGossipIcon"), check = "showLowGold" }, From ed0f9d80a2d4521c3ba97f98e7b9830de0802dfa Mon Sep 17 00:00:00 2001 From: Amadeus Date: Fri, 19 Jan 2024 20:34:53 -0600 Subject: [PATCH 28/51] Fixed an issue affecting Polished Pet Charms (thanks tflo for catching it.) --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 3 +++ WorldQuests.lua | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 542af70..5e2e461 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 100205 ## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) ## Title: Broker_WorldQuests -## Version: 10.2.5.0 +## Version: 10.2.5.1 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e7a7b1..9f20176 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 10.2.5.1 +* Fixed an issue affecting Polished Pet Charms (thanks tflo for catching it.) + ### 10.2.5.0 * Updates for Dragonflight 10.1, 10.2 and 10.2.5 diff --git a/WorldQuests.lua b/WorldQuests.lua index b3bc3f0..318b196 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -789,9 +789,9 @@ local RetrieveWorldQuests = function(mapId) quest.sort = quest.sort > CONSTANTS.SORT_ORDER.ITEM and quest.sort or CONSTANTS.SORT_ORDER.ITEM rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.MARK_OF_HONOR if C("showItems") and C("showMarkOfHonor") then quest.hide = false end - elseif itemId == 163036 then -- polished pet charms + elseif itemId == 163036 then -- polished pet charm quest.reward.polishedPetCharmsAmount = quest.reward.itemQuantity - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARMS + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM else quest.sort = quest.sort > CONSTANTS.SORT_ORDER.ITEM and quest.sort or CONSTANTS.SORT_ORDER.ITEM rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT @@ -1108,7 +1108,7 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalAspectsDreamingCrest = BWQ.totalAspectsDreamingCrest + quest.reward.AspectsDreamingCrestAmount elseif rtype == CONSTANTS.REWARD_TYPES.MYSTERIOUS_FRAGMENT then BWQ.totalMysteriousFragment = BWQ.totalMysteriousFragment + quest.reward.MysteriousFragmentAmount - elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARMS then + elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM then BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmsAmount end end From 8331dba9c7587f7d53cc8c4a0c22b7fe54c79079 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Sat, 13 Jul 2024 14:28:15 -0500 Subject: [PATCH 29/51] Updates for Dragonflight 10.2.7 --- Broker_WorldQuests.toc | 6 ++--- CHANGELOG.md | 3 +++ Constants.lua | 6 ++++- WorldQuests.lua | 46 +++++++++++++++++++++++++++++++++++- libs/CallbackHandler-1.0.lua | 32 +++++++++---------------- 5 files changed, 67 insertions(+), 26 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 5e2e461..a0225c1 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ -## Interface: 100205 -## Author: myno (original author; up through 8.x), Amadeus (maintainer: 9.x and 10.x) +## Interface: 100207 +## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 10.2.5.1 +## Version: 10.2.7.0 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f20176..d829a49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 10.2.7.0 +* Updates for Dragonflight 10.2.7 + ### 10.2.5.1 * Fixed an issue affecting Polished Pet Charms (thanks tflo for catching it.) diff --git a/Constants.lua b/Constants.lua index 576cc5f..23ec506 100644 --- a/Constants.lua +++ b/Constants.lua @@ -70,7 +70,11 @@ CONSTANTS.REWARD_TYPES = { DRAKES_DREAMING_CREST = 24, WYRMS_DREAMING_CREST = 25, ASPECTS_DREAMING_CREST = 26, - MYSTERIOUS_FRAGMENT = 27, + WHELPLINGS_AWAKENED_CREST = 27, + DRAKES_AWAKENED_CREST = 28, + WYRMS_AWAKENED_CREST = 29, + ASPECTS_AWAKENED_CREST = 30, + MYSTERIOUS_FRAGMENT = 31, } CONSTANTS.QUEST_TYPES = { diff --git a/WorldQuests.lua b/WorldQuests.lua index 318b196..6dbdee0 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -147,6 +147,10 @@ local defaultConfig = { brokerShowDrakesDreamingCrest = true, brokerShowWyrmsDreamingCrest = true, brokerShowAspectsDreamingCrest = true, + brokerShowWhelplingsAwakenedCrest = true, + brokerShowDrakesAwakenedCrest = true, + brokerShowWyrmsAwakenedCrest = true, + brokerShowAspectsAwakenedCrest = true, brokerShowMysteriousFragment = true, brokerShowBloodyTokens = true, brokerShowPolishedPetCharms = false, @@ -159,6 +163,10 @@ local defaultConfig = { showDrakesDreamingCrest = true, showWyrmsDreamingCrest = true, showAspectsDreamingCrest = true, + showWhelplingsAwakenedCrest = true, + showDrakesAwakenedCrest = true, + showWyrmsAwakenedCrest = true, + showAspectsAwakenedCrest = true, showMysteriousFragment = true, showBloodyTokens = true, showArtifactPower = true, @@ -927,6 +935,22 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ASPECTS_DREAMING_CREST quest.reward.AspectsDreamingCrestAmount = currency.amount if C("showAspectsDreamingCrest") then quest.hide = false end + elseif currencyId == 2806 then -- Whelplings Awakened Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WHELPLINGS_Awakened_CREST + quest.reward.WhelplingsAwakenedCrestAmount = currency.amount + if C("showWhelplingsAwakenedCrest") then quest.hide = false end + elseif currencyId == 2807 then -- Drakes Awakened Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DRAKES_Awakened_CREST + quest.reward.DrakesAwakenedCrestAmount = currency.amount + if C("showDrakesAwakenedCrest") then quest.hide = false end + elseif currencyId == 2809 then -- Wyrms Awakened Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WYRMS_Awakened_CREST + quest.reward.WyrmsAwakenedCrestAmount = currency.amount + if C("showWyrmsAwakenedCrest") then quest.hide = false end + elseif currencyId == 2812 then -- Aspects Awakened Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ASPECTS_Awakened_CREST + quest.reward.AspectsAwakenedCrestAmount = currency.amount + if C("showAspectsAwakenedCrest") then quest.hide = false end elseif currencyId == 2657 then -- Mysterious Fragment rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.MYSTERIOUS_FRAGMENT quest.reward.MysteriousFragmentAmount = currency.amount @@ -1106,6 +1130,14 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalWyrmsDreamingCrest = BWQ.totalWyrmsDreamingCrest + quest.reward.WyrmsDreamingCrestAmount elseif rtype == CONSTANTS.REWARD_TYPES.ASPECTS_DREAMING_CREST then BWQ.totalAspectsDreamingCrest = BWQ.totalAspectsDreamingCrest + quest.reward.AspectsDreamingCrestAmount + elseif rtype == CONSTANTS.REWARD_TYPES.WHELPLINGS_Awakened_CREST then + BWQ.totalWhelplingsAwakenedCrest = BWQ.totalWhelplingsAwakenedCrest + quest.reward.WhelplingsAwakenedCrestAmount + elseif rtype == CONSTANTS.REWARD_TYPES.DRAKES_Awakened_CREST then + BWQ.totalDrakesAwakenedCrest = BWQ.totalDrakesAwakenedCrest + quest.reward.DrakesAwakenedCrestAmount + elseif rtype == CONSTANTS.REWARD_TYPES.WYRMS_Awakened_CREST then + BWQ.totalWyrmsAwakenedCrest = BWQ.totalWyrmsAwakenedCrest + quest.reward.WyrmsAwakenedCrestAmount + elseif rtype == CONSTANTS.REWARD_TYPES.ASPECTS_Awakened_CREST then + BWQ.totalAspectsAwakenedCrest = BWQ.totalAspectsAwakenedCrest + quest.reward.AspectsAwakenedCrestAmount elseif rtype == CONSTANTS.REWARD_TYPES.MYSTERIOUS_FRAGMENT then BWQ.totalMysteriousFragment = BWQ.totalMysteriousFragment + quest.reward.MysteriousFragmentAmount elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM then @@ -1431,7 +1463,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalMysteriousFragment, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalWhelplingsAwakenedCrest, BWQ.totalDrakesAwakenedCrest, BWQ.totalWyrmsAwakenedCrest, BWQ.totalAspectsAwakenedCrest, BWQ.totalMysteriousFragment, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -1976,6 +2008,10 @@ function BWQ:UpdateBlock() if C("brokerShowDrakesDreamingCrest") and BWQ.totalDrakesDreamingCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest:16:16|t %d ", brokerString, BWQ.totalDrakesDreamingCrest) end if C("brokerShowWyrmsDreamingCrest") and BWQ.totalWyrmsDreamingCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest:16:16|t %d ", brokerString, BWQ.totalWyrmsDreamingCrest) end if C("brokerShowAspectsDreamingCrest") and BWQ.totalAspectsDreamingCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest:16:16|t %d ", brokerString, BWQ.totalAspectsDreamingCrest) end + if C("brokerShowWhelplingsAwakenedCrest") and BWQ.totalWhelplingsAwakenedCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_10_gearupgrade_whelplingsawakenedcrest:16:16|t %d ", brokerString, BWQ.totalWhelplingsAwakenedCrest) end + if C("brokerShowDrakesAwakenedCrest") and BWQ.totalDrakesAwakenedCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_10_gearupgrade_drakesawakenedcrest:16:16|t %d ", brokerString, BWQ.totalDrakesAwakenedCrest) end + if C("brokerShowWyrmsAwakenedCrest") and BWQ.totalWyrmsAwakenedCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_wyrmsawakenedcrest:16:16|t %d ", brokerString, BWQ.totalWyrmsAwakenedCrest) end + if C("brokerShowAspectsAwakenedCrest") and BWQ.totalAspectsAwakenedCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_aspectsawakenedcrest:16:16|t %d ", brokerString, BWQ.totalAspectsAwakenedCrest) end if C("brokerShowMysteriousFragment") and BWQ.totalMysteriousFragment > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_7_0raid_trinket_05a:16:16|t %d ", brokerString, BWQ.totalMysteriousFragment) end if C("brokerShowPolishedPetCharms") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end @@ -2030,6 +2066,10 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Drakes Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest"), check = "brokerShowDrakesDreamingCrest" }, { text = ("|T%1$s:16:16|t Wyrms Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest"), check = "brokerShowWyrmsDreamingCrest" }, { text = ("|T%1$s:16:16|t Aspects Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest"), check = "brokerShowAspectsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Whelplings Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_whelplingsAwakenedcrest"), check = "brokerShowWhelplingsAwakenedCrest" }, + { text = ("|T%1$s:16:16|t Drakes Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesAwakenedcrest"), check = "brokerShowDrakesAwakenedCrest" }, + { text = ("|T%1$s:16:16|t Wyrms Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsAwakenedcrest"), check = "brokerShowWyrmsAwakenedCrest" }, + { text = ("|T%1$s:16:16|t Aspects Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsAwakenedcrest"), check = "brokerShowAspectsAwakenedCrest" }, { text = ("|T%1$s:16:16|t Mysterious Fragment"):format("Interface\\Icons\\Inv_7_0raid_trinket_05a"), check = "brokerShowMysteriousFragment" }, { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharms" }, } @@ -2052,6 +2092,10 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Drakes Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest"), check = "showDrakesDreamingCrest" }, { text = ("|T%1$s:16:16|t Wyrms Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest"), check = "showWyrmsDreamingCrest" }, { text = ("|T%1$s:16:16|t Aspects Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest"), check = "showAspectsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Whelplings Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_whelplingsAwakenedcrest"), check = "showWhelplingsAwakenedCrest" }, + { text = ("|T%1$s:16:16|t Drakes Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesAwakenedcrest"), check = "showDrakesAwakenedCrest" }, + { text = ("|T%1$s:16:16|t Wyrms Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsAwakenedcrest"), check = "showWyrmsAwakenedCrest" }, + { text = ("|T%1$s:16:16|t Aspects Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsAwakenedcrest"), check = "showAspectsAwakenedCrest" }, { text = ("|T%1$s:16:16|t Mysterious Fragment"):format("Interface\\Icons\\Inv_7_0raid_trinket_05a"), check = "showMysteriousFragment" }, { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "showBloodyTokens" }, { text = ("|T%1$s:16:16|t Honor"):format("Interface\\Icons\\Achievement_LegionPVPTier4"), check = "showHonor" }, diff --git a/libs/CallbackHandler-1.0.lua b/libs/CallbackHandler-1.0.lua index 4c9a302..44543d5 100644 --- a/libs/CallbackHandler-1.0.lua +++ b/libs/CallbackHandler-1.0.lua @@ -1,5 +1,5 @@ ---[[ $Id: CallbackHandler-1.0.lua 22 2018-07-21 14:17:22Z nevcairiel $ ]] -local MAJOR, MINOR = "CallbackHandler-1.0", 7 +--[[ $Id: CallbackHandler-1.0.lua 26 2022-12-12 15:09:39Z nevcairiel $ ]] +local MAJOR, MINOR = "CallbackHandler-1.0", 8 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) if not CallbackHandler then return end -- No upgrade needed @@ -7,26 +7,16 @@ if not CallbackHandler then return end -- No upgrade needed local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} -- Lua APIs -local tconcat = table.concat -local assert, error, loadstring = assert, error, loadstring -local setmetatable, rawset, rawget = setmetatable, rawset, rawget +local securecallfunction, error = securecallfunction, error +local setmetatable, rawget = setmetatable, rawget local next, select, pairs, type, tostring = next, select, pairs, type, tostring --- Global vars/functions that we don't upvalue since they might get hooked, or upgraded --- List them here for Mikk's FindGlobals script --- GLOBALS: geterrorhandler - -local xpcall = xpcall - -local function errorhandler(err) - return geterrorhandler()(err) -end local function Dispatch(handlers, ...) local index, method = next(handlers) if not method then return end repeat - xpcall(method, errorhandler, ...) + securecallfunction(method, ...) index, method = next(handlers, index) until not method end @@ -39,7 +29,7 @@ end -- UnregisterName - name of the callback unregistration API, default "UnregisterCallback" -- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API. -function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName) +function CallbackHandler.New(_self, target, RegisterName, UnregisterName, UnregisterAllName) RegisterName = RegisterName or "RegisterCallback" UnregisterName = UnregisterName or "UnregisterCallback" @@ -67,13 +57,13 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll if registry.insertQueue and oldrecurse==0 then -- Something in one of our callbacks wanted to register more callbacks; they got queued - for eventname,callbacks in pairs(registry.insertQueue) do - local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten. - for self,func in pairs(callbacks) do - events[eventname][self] = func + for event,callbacks in pairs(registry.insertQueue) do + local first = not rawget(events, event) or not next(events[event]) -- test for empty before. not test for one member after. that one member may have been overwritten. + for object,func in pairs(callbacks) do + events[event][object] = func -- fire OnUsed callback? if first and registry.OnUsed then - registry.OnUsed(registry, target, eventname) + registry.OnUsed(registry, target, event) first = nil end end From 6c85ce2e7499a057c156502e0f91016de8e7426f Mon Sep 17 00:00:00 2001 From: Amadeus Date: Mon, 5 Aug 2024 23:29:45 -0500 Subject: [PATCH 30/51] Updates for WoW version 11.0.0 --- Broker_WorldQuests.toc | 4 +- CHANGELOG.md | 3 + WorldQuests.lua | 32 ++- libs/CallbackHandler-1.0.lua | 404 +++++++++++++++++------------------ 4 files changed, 236 insertions(+), 207 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index a0225c1..a2feaae 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ -## Interface: 100207 +## Interface: 110000, 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 10.2.7.0 +## Version: 11.0.0.1 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index d829a49..16d3148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.0.0.1 +* Updates for WoW version 11.0.0 + ### 10.2.7.0 * Updates for Dragonflight 10.2.7 diff --git a/WorldQuests.lua b/WorldQuests.lua index 6dbdee0..d97df63 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -30,8 +30,34 @@ local GetBestMapForUnit, GetMapInfo local IsWarModeDesired = C_PvP.IsWarModeDesired -local GetFactionInfoByID, GetQuestObjectiveInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, GetNumQuestLogRewardCurrencies, GetQuestLogRewardCurrencyInfo, HaveQuestData - = GetFactionInfoByID, GetQuestObjectiveInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, GetNumQuestLogRewardCurrencies, GetQuestLogRewardCurrencyInfo, HaveQuestData +local GetFactionInfoByID, GetQuestObjectiveInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, HaveQuestData += C_Reputation.GetFactionDataByID, GetQuestObjectiveInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, HaveQuestData + +local GetNumQuestLogRewardCurrencies, GetQuestLogRewardCurrencyInfo = GetNumQuestLogRewardCurrencies, GetQuestLogRewardCurrencyInfo +if not GetNumQuestLogRewardCurrencies then + local reward_cache = {} + local function GetData(questID) + local data = reward_cache[questID] + local t = GetTime() + if not data or t > data.expTime then + data = C_QuestLog.GetQuestRewardCurrencies(questID) + data.expTime = t + 5 + end + return data + end + function GetNumQuestLogRewardCurrencies(questID) + local data = GetData(questID) + return #data + end + function GetQuestLogRewardCurrencyInfo(i, questID) + local data = GetData(questID)[i] + if not data then + return + end + return data.name, data.texture, data.baseRewardAmount, data.currencyID + --data.totalRewardAmount + end +end local GetAchievementInfo = GetAchievementInfo @@ -1910,7 +1936,7 @@ function BWQ:UpdateBlock() if bountyWidth > bountyMaxWidth then bountyMaxWidth = bountyWidth end if not C("hideFactionColumn") then - button.factionFS:SetText(button.quest.faction) + button.factionFS:SetText(button.quest.factionID) local factionWidth = button.factionFS:GetStringWidth() if factionWidth > factionMaxWidth then factionMaxWidth = factionWidth end else diff --git a/libs/CallbackHandler-1.0.lua b/libs/CallbackHandler-1.0.lua index 44543d5..6b32193 100644 --- a/libs/CallbackHandler-1.0.lua +++ b/libs/CallbackHandler-1.0.lua @@ -1,202 +1,202 @@ ---[[ $Id: CallbackHandler-1.0.lua 26 2022-12-12 15:09:39Z nevcairiel $ ]] -local MAJOR, MINOR = "CallbackHandler-1.0", 8 -local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) - -if not CallbackHandler then return end -- No upgrade needed - -local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} - --- Lua APIs -local securecallfunction, error = securecallfunction, error -local setmetatable, rawget = setmetatable, rawget -local next, select, pairs, type, tostring = next, select, pairs, type, tostring - - -local function Dispatch(handlers, ...) - local index, method = next(handlers) - if not method then return end - repeat - securecallfunction(method, ...) - index, method = next(handlers, index) - until not method -end - --------------------------------------------------------------------------- --- CallbackHandler:New --- --- target - target object to embed public APIs in --- RegisterName - name of the callback registration API, default "RegisterCallback" --- UnregisterName - name of the callback unregistration API, default "UnregisterCallback" --- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API. - -function CallbackHandler.New(_self, target, RegisterName, UnregisterName, UnregisterAllName) - - RegisterName = RegisterName or "RegisterCallback" - UnregisterName = UnregisterName or "UnregisterCallback" - if UnregisterAllName==nil then -- false is used to indicate "don't want this method" - UnregisterAllName = "UnregisterAllCallbacks" - end - - -- we declare all objects and exported APIs inside this closure to quickly gain access - -- to e.g. function names, the "target" parameter, etc - - - -- Create the registry object - local events = setmetatable({}, meta) - local registry = { recurse=0, events=events } - - -- registry:Fire() - fires the given event/message into the registry - function registry:Fire(eventname, ...) - if not rawget(events, eventname) or not next(events[eventname]) then return end - local oldrecurse = registry.recurse - registry.recurse = oldrecurse + 1 - - Dispatch(events[eventname], eventname, ...) - - registry.recurse = oldrecurse - - if registry.insertQueue and oldrecurse==0 then - -- Something in one of our callbacks wanted to register more callbacks; they got queued - for event,callbacks in pairs(registry.insertQueue) do - local first = not rawget(events, event) or not next(events[event]) -- test for empty before. not test for one member after. that one member may have been overwritten. - for object,func in pairs(callbacks) do - events[event][object] = func - -- fire OnUsed callback? - if first and registry.OnUsed then - registry.OnUsed(registry, target, event) - first = nil - end - end - end - registry.insertQueue = nil - end - end - - -- Registration of a callback, handles: - -- self["method"], leads to self["method"](self, ...) - -- self with function ref, leads to functionref(...) - -- "addonId" (instead of self) with function ref, leads to functionref(...) - -- all with an optional arg, which, if present, gets passed as first argument (after self if present) - target[RegisterName] = function(self, eventname, method, ... --[[actually just a single arg]]) - if type(eventname) ~= "string" then - error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2) - end - - method = method or eventname - - local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten. - - if type(method) ~= "string" and type(method) ~= "function" then - error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - string or function expected.", 2) - end - - local regfunc - - if type(method) == "string" then - -- self["method"] calling style - if type(self) ~= "table" then - error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): self was not a table?", 2) - elseif self==target then - error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): do not use Library:"..RegisterName.."(), use your own 'self'", 2) - elseif type(self[method]) ~= "function" then - error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2) - end - - if select("#",...)>=1 then -- this is not the same as testing for arg==nil! - local arg=select(1,...) - regfunc = function(...) self[method](self,arg,...) end - else - regfunc = function(...) self[method](self,...) end - end - else - -- function ref with self=object or self="addonId" or self=thread - if type(self)~="table" and type(self)~="string" and type(self)~="thread" then - error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2) - end - - if select("#",...)>=1 then -- this is not the same as testing for arg==nil! - local arg=select(1,...) - regfunc = function(...) method(arg,...) end - else - regfunc = method - end - end - - - if events[eventname][self] or registry.recurse<1 then - -- if registry.recurse<1 then - -- we're overwriting an existing entry, or not currently recursing. just set it. - events[eventname][self] = regfunc - -- fire OnUsed callback? - if registry.OnUsed and first then - registry.OnUsed(registry, target, eventname) - end - else - -- we're currently processing a callback in this registry, so delay the registration of this new entry! - -- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency - registry.insertQueue = registry.insertQueue or setmetatable({},meta) - registry.insertQueue[eventname][self] = regfunc - end - end - - -- Unregister a callback - target[UnregisterName] = function(self, eventname) - if not self or self==target then - error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2) - end - if type(eventname) ~= "string" then - error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2) - end - if rawget(events, eventname) and events[eventname][self] then - events[eventname][self] = nil - -- Fire OnUnused callback? - if registry.OnUnused and not next(events[eventname]) then - registry.OnUnused(registry, target, eventname) - end - end - if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then - registry.insertQueue[eventname][self] = nil - end - end - - -- OPTIONAL: Unregister all callbacks for given selfs/addonIds - if UnregisterAllName then - target[UnregisterAllName] = function(...) - if select("#",...)<1 then - error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2) - end - if select("#",...)==1 and ...==target then - error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2) - end - - - for i=1,select("#",...) do - local self = select(i,...) - if registry.insertQueue then - for eventname, callbacks in pairs(registry.insertQueue) do - if callbacks[self] then - callbacks[self] = nil - end - end - end - for eventname, callbacks in pairs(events) do - if callbacks[self] then - callbacks[self] = nil - -- Fire OnUnused callback? - if registry.OnUnused and not next(callbacks) then - registry.OnUnused(registry, target, eventname) - end - end - end - end - end - end - - return registry -end - - --- CallbackHandler purposefully does NOT do explicit embedding. Nor does it --- try to upgrade old implicit embeds since the system is selfcontained and --- relies on closures to work. - +--[[ $Id: CallbackHandler-1.0.lua 1298 2022-12-12 15:10:10Z nevcairiel $ ]] +local MAJOR, MINOR = "CallbackHandler-1.0", 8 +local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) + +if not CallbackHandler then return end -- No upgrade needed + +local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} + +-- Lua APIs +local securecallfunction, error = securecallfunction, error +local setmetatable, rawget = setmetatable, rawget +local next, select, pairs, type, tostring = next, select, pairs, type, tostring + + +local function Dispatch(handlers, ...) + local index, method = next(handlers) + if not method then return end + repeat + securecallfunction(method, ...) + index, method = next(handlers, index) + until not method +end + +-------------------------------------------------------------------------- +-- CallbackHandler:New +-- +-- target - target object to embed public APIs in +-- RegisterName - name of the callback registration API, default "RegisterCallback" +-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback" +-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API. + +function CallbackHandler.New(_self, target, RegisterName, UnregisterName, UnregisterAllName) + + RegisterName = RegisterName or "RegisterCallback" + UnregisterName = UnregisterName or "UnregisterCallback" + if UnregisterAllName==nil then -- false is used to indicate "don't want this method" + UnregisterAllName = "UnregisterAllCallbacks" + end + + -- we declare all objects and exported APIs inside this closure to quickly gain access + -- to e.g. function names, the "target" parameter, etc + + + -- Create the registry object + local events = setmetatable({}, meta) + local registry = { recurse=0, events=events } + + -- registry:Fire() - fires the given event/message into the registry + function registry:Fire(eventname, ...) + if not rawget(events, eventname) or not next(events[eventname]) then return end + local oldrecurse = registry.recurse + registry.recurse = oldrecurse + 1 + + Dispatch(events[eventname], eventname, ...) + + registry.recurse = oldrecurse + + if registry.insertQueue and oldrecurse==0 then + -- Something in one of our callbacks wanted to register more callbacks; they got queued + for event,callbacks in pairs(registry.insertQueue) do + local first = not rawget(events, event) or not next(events[event]) -- test for empty before. not test for one member after. that one member may have been overwritten. + for object,func in pairs(callbacks) do + events[event][object] = func + -- fire OnUsed callback? + if first and registry.OnUsed then + registry.OnUsed(registry, target, event) + first = nil + end + end + end + registry.insertQueue = nil + end + end + + -- Registration of a callback, handles: + -- self["method"], leads to self["method"](self, ...) + -- self with function ref, leads to functionref(...) + -- "addonId" (instead of self) with function ref, leads to functionref(...) + -- all with an optional arg, which, if present, gets passed as first argument (after self if present) + target[RegisterName] = function(self, eventname, method, ... --[[actually just a single arg]]) + if type(eventname) ~= "string" then + error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2) + end + + method = method or eventname + + local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten. + + if type(method) ~= "string" and type(method) ~= "function" then + error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - string or function expected.", 2) + end + + local regfunc + + if type(method) == "string" then + -- self["method"] calling style + if type(self) ~= "table" then + error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): self was not a table?", 2) + elseif self==target then + error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): do not use Library:"..RegisterName.."(), use your own 'self'", 2) + elseif type(self[method]) ~= "function" then + error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2) + end + + if select("#",...)>=1 then -- this is not the same as testing for arg==nil! + local arg=select(1,...) + regfunc = function(...) self[method](self,arg,...) end + else + regfunc = function(...) self[method](self,...) end + end + else + -- function ref with self=object or self="addonId" or self=thread + if type(self)~="table" and type(self)~="string" and type(self)~="thread" then + error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2) + end + + if select("#",...)>=1 then -- this is not the same as testing for arg==nil! + local arg=select(1,...) + regfunc = function(...) method(arg,...) end + else + regfunc = method + end + end + + + if events[eventname][self] or registry.recurse<1 then + -- if registry.recurse<1 then + -- we're overwriting an existing entry, or not currently recursing. just set it. + events[eventname][self] = regfunc + -- fire OnUsed callback? + if registry.OnUsed and first then + registry.OnUsed(registry, target, eventname) + end + else + -- we're currently processing a callback in this registry, so delay the registration of this new entry! + -- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency + registry.insertQueue = registry.insertQueue or setmetatable({},meta) + registry.insertQueue[eventname][self] = regfunc + end + end + + -- Unregister a callback + target[UnregisterName] = function(self, eventname) + if not self or self==target then + error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2) + end + if type(eventname) ~= "string" then + error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2) + end + if rawget(events, eventname) and events[eventname][self] then + events[eventname][self] = nil + -- Fire OnUnused callback? + if registry.OnUnused and not next(events[eventname]) then + registry.OnUnused(registry, target, eventname) + end + end + if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then + registry.insertQueue[eventname][self] = nil + end + end + + -- OPTIONAL: Unregister all callbacks for given selfs/addonIds + if UnregisterAllName then + target[UnregisterAllName] = function(...) + if select("#",...)<1 then + error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2) + end + if select("#",...)==1 and ...==target then + error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2) + end + + + for i=1,select("#",...) do + local self = select(i,...) + if registry.insertQueue then + for eventname, callbacks in pairs(registry.insertQueue) do + if callbacks[self] then + callbacks[self] = nil + end + end + end + for eventname, callbacks in pairs(events) do + if callbacks[self] then + callbacks[self] = nil + -- Fire OnUnused callback? + if registry.OnUnused and not next(callbacks) then + registry.OnUnused(registry, target, eventname) + end + end + end + end + end + end + + return registry +end + + +-- CallbackHandler purposefully does NOT do explicit embedding. Nor does it +-- try to upgrade old implicit embeds since the system is selfcontained and +-- relies on closures to work. + From 5cdbe4301398f854d115a704c68f38449983a34b Mon Sep 17 00:00:00 2001 From: Amadeus Date: Thu, 8 Aug 2024 13:43:03 -0500 Subject: [PATCH 31/51] Updates to Faction related calls due to API changes with 11.0.0 --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 3 +++ WorldQuests.lua | 17 +++++++++-------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index a2feaae..c4eb026 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110000, 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.0.1 +## Version: 11.0.0.2 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 16d3148..4b0085c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.0.0.2 +* Updates to Faction related calls due to API changes with 11.0.0 + ### 11.0.0.1 * Updates for WoW version 11.0.0 diff --git a/WorldQuests.lua b/WorldQuests.lua index d97df63..a589aff 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -30,8 +30,8 @@ local GetBestMapForUnit, GetMapInfo local IsWarModeDesired = C_PvP.IsWarModeDesired -local GetFactionInfoByID, GetQuestObjectiveInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, HaveQuestData -= C_Reputation.GetFactionDataByID, GetQuestObjectiveInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, HaveQuestData +local GetQuestObjectiveInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, HaveQuestData += GetQuestObjectiveInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, HaveQuestData local GetNumQuestLogRewardCurrencies, GetQuestLogRewardCurrencyInfo = GetNumQuestLogRewardCurrencies, GetQuestLogRewardCurrencyInfo if not GetNumQuestLogRewardCurrencies then @@ -781,7 +781,7 @@ local RetrieveWorldQuests = function(mapId) quest.title = title quest.factionId = factionId if factionId then - quest.faction = GetFactionInfoByID(factionId) + quest.faction = C_Reputation.GetFactionDataByID(factionId).name end quest.timeLeft = timeLeft quest.bounties = {} @@ -1362,10 +1362,10 @@ function BWQ:OnFactionUpdate(msg) end end - local name, factionId - for i = 1, GetNumFactions() do - name, _, _, _, _, _, _, _, _, _, _, _, _, factionId = GetFactionInfo(i) - if faction == name and paragonFactions[factionId] then + local factionData + for i = 1, C_Reputation.GetNumFactions() do + factionData = C_Reputation.GetFactionDataByIndex(i) + if faction == factionData.name and paragonFactions[factionData.factionId] then BWQ:UpdateParagonData() end end @@ -1379,6 +1379,7 @@ function BWQ:UpdateParagonData() local rowIndex = 0 local row + local factionId for _, factionId in next, paragonFactions.order do if IsFactionParagon(factionId) then @@ -1422,7 +1423,7 @@ function BWQ:UpdateParagonData() else row:SetPoint("TOP", BWQ.factionFramePool.rows[rowIndex - 1], "BOTTOM", 0, -5) end row:Show() - local name = GetFactionInfoByID(factionId) + local name = C_Reputation.GetFactionDataByID(factionId).name local current, threshold, rewardQuestId, hasRewardPending = GetFactionParagonInfo(factionId) local progress = 0 From a0264b7cd10875957905883a1464ac0425bbf375 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 14 Aug 2024 18:52:29 -0500 Subject: [PATCH 32/51] Fixed deprecated call to IsAddonLoaded() --- Broker_WorldQuests.toc | 4 ++-- CHANGELOG.md | 3 +++ WorldQuests.lua | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index c4eb026..bc05846 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ -## Interface: 110000, 110002 +## Interface: 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.0.2 +## Version: 11.0.2.0 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b0085c..d658d91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.0.2.0 +* Fixed deprecated call to IsAddonLoaded() + ### 11.0.0.2 * Updates to Faction related calls due to API changes with 11.0.0 diff --git a/WorldQuests.lua b/WorldQuests.lua index a589aff..c9191e6 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -2458,7 +2458,7 @@ BWQ:SetScript("OnEvent", function(self, event, arg1) BWQcache = BWQcache or {} BWQ:SwitchExpansion(C("expansion")) - if IsAddOnLoaded('Blizzard_SharedMapDataProviders') then + if C_AddOns.IsAddOnLoaded('Blizzard_SharedMapDataProviders') then BWQ:AddFlightMapHook() BWQ:UnregisterEvent("ADDON_LOADED") end From 1d97101c23c536d83e7f2b476bee4f41e34dde8d Mon Sep 17 00:00:00 2001 From: Amadeus Date: Thu, 15 Aug 2024 23:47:13 -0500 Subject: [PATCH 33/51] Preparatory Updates in anticipation of The War Within release --- Constants.lua | 10 +++++++++- WorldQuests.lua | 50 ++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/Constants.lua b/Constants.lua index 23ec506..8a9bfd8 100644 --- a/Constants.lua +++ b/Constants.lua @@ -1,12 +1,12 @@ local _, addon = ... local CONSTANTS = {} - CONSTANTS.EXPANSIONS = { LEGION = "LEGION", BFA = "BFA", SHADOWLANDS = "SHADOWLANDS", DRAGONFLIGHT = "DRAGONFLIGHT", + THEWARWITHIN = "THEWARWITHIN" } CONSTANTS.FACTIONS = { NEUTRAL = 0, @@ -123,6 +123,10 @@ CONSTANTS.CURRENCIES_AFFECTED_BY_WARMODE = { [2123] = true, -- Bloody Tokens (dragonflight) } +CONSTANTS.THEWARWITHIN_REPUTATION_CURRENCY_IDS = { +-- TODO +} + CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS = { [2107] = true, -- Artisan's Consortium [2108] = true, -- Maruuk Centaur @@ -181,6 +185,7 @@ CONSTANTS.FAMILY_FAMILIAR_QUEST_IDS = { -- WQ pet battle achievement CONSTANTS.ACHIEVEMENT_IDS = { PET_BATTLE_WQ = { + [CONSTANTS.EXPANSIONS.THEWARWITHIN] = 0, -- TODO [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = 16464, [CONSTANTS.EXPANSIONS.SHADOWLANDS] = 14625, [CONSTANTS.EXPANSIONS.BFA] = 12936, @@ -367,6 +372,9 @@ CONSTANTS.PARAGON_FACTIONS = { [2564] = "ui_majorfaction_niffen", -- Loamm Niffen [2574] = "ui_majorfaction_denizens", -- Dream Wardens }, + thewarwithin = { -- TODO + order = {}, + }, } addon.CONSTANTS = CONSTANTS diff --git a/WorldQuests.lua b/WorldQuests.lua index c9191e6..87dd7b9 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -2,10 +2,10 @@ -- -- Broker_WorldQuests -- --- World of Warcraft addon to display Legion world quests in convenient list form. --- Doesn't do anything on its own; requires a data broker addon! +-- World of Warcraft addon to display world quests in convenient list form. +-- It doesn't do anything on its own; requires a data broker addon! -- --- Author: myno +-- Original Author: myno -- --]]---- @@ -73,6 +73,9 @@ local isHorde = UnitFactionGroup("player") == "Horde" -- When adding zones to MAP_ZONES, be sure to also add the zoneID to MAP_ZONES_SORT immediately below local MAP_ZONES = { + [CONSTANTS.EXPANSIONS.THEWARWITHIN] = { + -- TODO + }, [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { [2022] = { id = 2022, name = GetMapInfo(2022).name, quests = {}, buttons = {}, }, -- The Waking Shores 10.0 [2023] = { id = 2023, name = GetMapInfo(2023).name, quests = {}, buttons = {}, }, -- Ohn'ahran Plains 10.0 @@ -121,6 +124,9 @@ local MAP_ZONES = { }, } local MAP_ZONES_SORT = { + [CONSTANTS.EXPANSIONS.THEWARWITHIN] = { + -- TODO + }, [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { 2022, 2023, 2024, 2025, 2085, 2151, 2133, 2200 }, @@ -141,7 +147,7 @@ local defaultConfig = { attachToWorldMap = false, showOnClick = false, usePerCharacterSettings = false, - expansion = CONSTANTS.EXPANSIONS.DRAGONFLIGHT, + expansion = CONSTANTS.EXPANSIONS.DRAGONFLIGHT, -- TODO enableClickToOpenMap = false, enableTomTomWaypointsOnClick = true, alwaysShowBountyQuests = true, @@ -311,6 +317,17 @@ BWQ:SetBackdropBorderColor(0, 0, 0, 1) BWQ:SetClampedToScreen(true) BWQ:Hide() +BWQ.buttonTheWarWithin = CreateFrame("Button", nil, BWQ, "BackdropTemplate") +BWQ.buttonTheWarWithin:SetSize(20, 15) +BWQ.buttonTheWarWithin:SetPoint("TOPRIGHT", BWQ, "TOPRIGHT", -146, -8) +BWQ.buttonTheWarWithin:SetBackdrop({bgFile = "Interface\\ChatFrame\\ChatFrameBackground", tile = false, tileSize = 0, edgeSize = 2, insets = { left = 0, right = 0, top = 0, bottom = 0 }, }) +BWQ.buttonTheWarWithin:SetBackdropColor(0.1, 0.1, 0.1) +BWQ.buttonTheWarWithin.texture = BWQ.buttonTheWarWithin:CreateTexture(nil, "OVERLAY") +BWQ.buttonTheWarWithin.texture:SetPoint("TOPLEFT", 1, -1) +BWQ.buttonTheWarWithin.texture:SetPoint("BOTTOMRIGHT", -1, 1) +BWQ.buttonTheWarWithin.texture:SetTexture("Interface\\Calendar\\Holidays\\Calendar_WeekendTheWarWithinStart") -- Use https://github.com/Marlamin/wow.tools.local to find textures +BWQ.buttonTheWarWithin.texture:SetTexCoord(0.15, 0.55, 0.23, 0.47) + BWQ.buttonDragonflight = CreateFrame("Button", nil, BWQ, "BackdropTemplate") BWQ.buttonDragonflight:SetSize(20, 15) BWQ.buttonDragonflight:SetPoint("TOPRIGHT", BWQ, "TOPRIGHT", -119, -8) @@ -319,7 +336,7 @@ BWQ.buttonDragonflight:SetBackdropColor(0.1, 0.1, 0.1) BWQ.buttonDragonflight.texture = BWQ.buttonDragonflight:CreateTexture(nil, "OVERLAY") BWQ.buttonDragonflight.texture:SetPoint("TOPLEFT", 1, -1) BWQ.buttonDragonflight.texture:SetPoint("BOTTOMRIGHT", -1, 1) -BWQ.buttonDragonflight.texture:SetTexture("Interface\\Calendar\\Holidays\\Calendar_dragonflightstart") -- Search with https://wow.tools/files to find textures +BWQ.buttonDragonflight.texture:SetTexture("Interface\\Calendar\\Holidays\\Calendar_dragonflightstart") BWQ.buttonDragonflight.texture:SetTexCoord(0.15, 0.55, 0.23, 0.47) BWQ.buttonShadowlands = CreateFrame("Button", nil, BWQ, "BackdropTemplate") @@ -355,6 +372,7 @@ BWQ.buttonLegion.texture:SetPoint("BOTTOMRIGHT", -1, 1) BWQ.buttonLegion.texture:SetTexture("Interface\\Calendar\\Holidays\\Calendar_WeekendLegionStart") BWQ.buttonLegion.texture:SetTexCoord(0.15, 0.55, 0.23, 0.47) +BWQ.buttonTheWarWithin:SetScript("OnClick", function(self) BWQ:SwitchExpansion(CONSTANTS.EXPANSIONS.THEWARWITHIN) end) BWQ.buttonDragonflight:SetScript("OnClick", function(self) BWQ:SwitchExpansion(CONSTANTS.EXPANSIONS.DRAGONFLIGHT) end) BWQ.buttonShadowlands:SetScript("OnClick", function(self) BWQ:SwitchExpansion(CONSTANTS.EXPANSIONS.SHADOWLANDS) end) BWQ.buttonBFA:SetScript("OnClick", function(self) BWQ:SwitchExpansion(CONSTANTS.EXPANSIONS.BFA) end) @@ -414,7 +432,9 @@ end local hasUnlockedWorldQuests function BWQ:WorldQuestsUnlocked() if not hasUnlockedWorldQuests then - if (expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT) then + if (expansion == CONSTANTS.EXPANSIONS.THEWARWITHIN) then + hasUnlockedWorldQuests = UnitLevel("player") >= 78 and IsQuestFlaggedCompleted(84022) and IsQuestFlaggedCompleted(80592) -- https://www.wowhead.com/beta/quest=84022/uniting-severed-threads and https://www.wowhead.com/quest=80592/forge-a-pact + elseif (expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT) then _, _, _, hasUnlockedWorldQuests = GetAchievementInfo(16326) if not hasUnlockedWorldQuests then hasUnlockedWorldQuests = UnitLevel("player") >= 68 and IsQuestFlaggedCompleted(66221) @@ -433,7 +453,9 @@ function BWQ:WorldQuestsUnlocked() if not BWQ.errorFS then CreateErrorFS() end local level, quest, errorText - if expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT then + if expansion == CONSTANTS.EXPANSIONS.THEWARWITHIN then + errorText = "You need to unlock The War Within World Quests\non one of your characters." + elseif expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT then errorText = "You need to unlock Dragonflight World Quests\non one of your characters." elseif expansion == CONSTANTS.EXPANSIONS.SHADOWLANDS then errorText = "You need to unlock Shadowlands World Quests\non one of your characters." @@ -474,7 +496,7 @@ function BWQ:ShowNoWorldQuestsInfo() end function BWQ:SetErrorFSPosition(offsetTop) - if (expansion == CONSTANTS.EXPANSIONS.SHADOWLANDS or expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT) then -- TODO: We are not supporting bounty quests for these expansions atm, so the ErrorFS position should be at the top of BWQ + if (expansion == CONSTANTS.EXPANSIONS.SHADOWLANDS or expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT or expansion == CONSTANTS.EXPANSIONS.THEWARWITHIN) then -- TODO: We are not supporting bounty quests for these expansions atm, so the ErrorFS position should be at the top of BWQ BWQ.errorFS:SetPoint("TOP", BWQ, "TOP", 0, offsetTop) else if BWQ.factionDisplay:IsShown() then @@ -1203,6 +1225,13 @@ end BWQ.bountyCache = {} BWQ.bountyDisplay = CreateFrame("Frame", "BWQ_BountyDisplay", BWQ) function BWQ:UpdateBountyData() + if expansion == CONSTANTS.EXPANSIONS.THEWARWITHIN then -- TODO: get map id for retrieving bounties + BWQ.bountyDisplay:Hide() + for i, item in pairs(BWQ.bountyCache) do + item.button:Hide() + end + return + end if expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT then -- TODO: get map id for retrieving bounties BWQ.bountyDisplay:Hide() for i, item in pairs(BWQ.bountyCache) do @@ -1335,7 +1364,9 @@ local factionIncreaseString2 = FACTION_STANDING_INCREASED_ACH_BONUS:gsub("%%d", local factionIncreaseString3 = FACTION_STANDING_INCREASED_GENERIC:gsub("%%s", "(.*)"):gsub(" %(%+.*%)" ,"") function BWQ:SetParagonFactionsByActiveExpansion() - if expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT then + if expansion == CONSTANTS.EXPANSIONS.THEWARWITHIN then + paragonFactions = CONSTANTS.PARAGON_FACTIONS.thewarwithin + elseif expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT then paragonFactions = CONSTANTS.PARAGON_FACTIONS.dragonflight elseif expansion == CONSTANTS.EXPANSIONS.SHADOWLANDS then paragonFactions = CONSTANTS.PARAGON_FACTIONS.shadowlands @@ -1628,6 +1659,7 @@ function BWQ:SwitchExpansion(expac) end BWQ:SetParagonFactionsByActiveExpansion() + BWQ.buttonTheWarWithin:SetAlpha(expac == CONSTANTS.EXPANSIONS.THEWARWITHIN and 1 or 0.4) BWQ.buttonDragonflight:SetAlpha(expac == CONSTANTS.EXPANSIONS.DRAGONFLIGHT and 1 or 0.4) BWQ.buttonShadowlands:SetAlpha(expac == CONSTANTS.EXPANSIONS.SHADOWLANDS and 1 or 0.4) BWQ.buttonBFA:SetAlpha(expac == CONSTANTS.EXPANSIONS.BFA and 1 or 0.4) From 43af0e317ed3c6e1e80ccda11b6bd00164bc03d0 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Fri, 16 Aug 2024 19:51:35 -0500 Subject: [PATCH 34/51] New users will be set to the expansion appropriate to their current level instead of defaulting to the latest expansion. --- CHANGELOG.md | 5 +++++ WorldQuests.lua | 41 +++++++++++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d658d91..0c29318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +### 11.0.2.1 +* Initial updates required for The War Within +* New users will be set to the expansion appropriate to their current level instead of defaulting + to the latest expansion. + ### 11.0.2.0 * Fixed deprecated call to IsAddonLoaded() diff --git a/WorldQuests.lua b/WorldQuests.lua index 87dd7b9..5e2ef53 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -9,6 +9,18 @@ -- --]]---- +local GetAchievementInfo + = GetAchievementInfo + +local REPUTATION + = REPUTATION + +local _, addon = ... +local CONSTANTS = addon.CONSTANTS +local DEBUG = true + +local isHorde = UnitFactionGroup("player") == "Horde" + local ITEM_QUALITY_COLORS, WORLD_QUEST_QUALITY_COLORS, UnitLevel = ITEM_QUALITY_COLORS, WORLD_QUEST_QUALITY_COLORS, UnitLevel @@ -59,18 +71,6 @@ if not GetNumQuestLogRewardCurrencies then end end -local GetAchievementInfo - = GetAchievementInfo - -local REPUTATION - = REPUTATION - -local _, addon = ... -local CONSTANTS = addon.CONSTANTS -local DEBUG = true - -local isHorde = UnitFactionGroup("player") == "Horde" - -- When adding zones to MAP_ZONES, be sure to also add the zoneID to MAP_ZONES_SORT immediately below local MAP_ZONES = { [CONSTANTS.EXPANSIONS.THEWARWITHIN] = { @@ -147,7 +147,6 @@ local defaultConfig = { attachToWorldMap = false, showOnClick = false, usePerCharacterSettings = false, - expansion = CONSTANTS.EXPANSIONS.DRAGONFLIGHT, -- TODO enableClickToOpenMap = false, enableTomTomWaypointsOnClick = true, alwaysShowBountyQuests = true, @@ -2488,7 +2487,21 @@ BWQ:SetScript("OnEvent", function(self, event, arg1) if BWQcfgPerCharacter[i] == nil then BWQcfgPerCharacter[i] = v end end BWQcache = BWQcache or {} - BWQ:SwitchExpansion(C("expansion")) + if not C("expansion") then + if UnitLevel("player") >= 71 then + BWQ:SwitchExpansion(CONSTANTS.EXPANSIONS.THEWARWITHIN) + elseif UnitLevel("player") >= 61 then + BWQ:SwitchExpansion(CONSTANTS.EXPANSIONS.DRAGONFLIGHT) + elseif UnitLevel("player") >= 51 then + BWQ:SwitchExpansion(CONSTANTS.EXPANSIONS.SHADOWLANDS) + elseif UnitLevel("player") >= 41 then + BWQ:SwitchExpansion(CONSTANTS.EXPANSIONS.BFA) + else + BWQ:SwitchExpansion(CONSTANTS.EXPANSIONS.LEGION) + end + else + BWQ:SwitchExpansion(C("expansion")) + end if C_AddOns.IsAddOnLoaded('Blizzard_SharedMapDataProviders') then BWQ:AddFlightMapHook() From f1460b535c7abf3782c43ef705a73d53fc63425b Mon Sep 17 00:00:00 2001 From: Amadeus Date: Fri, 23 Aug 2024 16:30:27 -0500 Subject: [PATCH 35/51] Added zone IDs for first four TWW zones --- Broker_WorldQuests.toc | 2 +- WorldQuests.lua | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index bc05846..fee1833 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.2.0 +## Version: 11.0.2.1 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/WorldQuests.lua b/WorldQuests.lua index 5e2ef53..c539c48 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -72,9 +72,13 @@ if not GetNumQuestLogRewardCurrencies then end -- When adding zones to MAP_ZONES, be sure to also add the zoneID to MAP_ZONES_SORT immediately below +-- The simplest way to get the MapID for the zone you are currently in is to enter "/dump C_Map.GetBestMapForUnit("player")" local MAP_ZONES = { [CONSTANTS.EXPANSIONS.THEWARWITHIN] = { - -- TODO + [2248] = { id = 2248, name = GetMapInfo(2248).name, quests = {}, buttons = {}, }, -- Isle of Dorn 11.0 + [2214] = { id = 2214, name = GetMapInfo(2214).name, quests = {}, buttons = {}, }, -- The Ringing Deeps 11.0 + [2215] = { id = 2215, name = GetMapInfo(2215).name, quests = {}, buttons = {}, }, -- Hallowfall 11.0 + [2255] = { id = 2255, name = GetMapInfo(2255).name, quests = {}, buttons = {}, }, -- Azj-Kahet 11.0 }, [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { [2022] = { id = 2022, name = GetMapInfo(2022).name, quests = {}, buttons = {}, }, -- The Waking Shores 10.0 @@ -125,7 +129,7 @@ local MAP_ZONES = { } local MAP_ZONES_SORT = { [CONSTANTS.EXPANSIONS.THEWARWITHIN] = { - -- TODO + 2248, 2214, 2215, 2255 }, [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { 2022, 2023, 2024, 2025, 2085, 2151, 2133, 2200 @@ -1395,8 +1399,10 @@ function BWQ:OnFactionUpdate(msg) local factionData for i = 1, C_Reputation.GetNumFactions() do factionData = C_Reputation.GetFactionDataByIndex(i) - if faction == factionData.name and paragonFactions[factionData.factionId] then - BWQ:UpdateParagonData() + if factionData then + if faction == factionData.name and paragonFactions[factionData.factionId] then + BWQ:UpdateParagonData() + end end end end From 6b3a971b70b5910475a2d1f2def820e9341053cc Mon Sep 17 00:00:00 2001 From: Amadeus Date: Sat, 24 Aug 2024 23:01:47 -0500 Subject: [PATCH 36/51] Unlock criteria for TWW World Quests fixed --- WorldQuests.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index c539c48..d62a0fb 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -436,7 +436,7 @@ local hasUnlockedWorldQuests function BWQ:WorldQuestsUnlocked() if not hasUnlockedWorldQuests then if (expansion == CONSTANTS.EXPANSIONS.THEWARWITHIN) then - hasUnlockedWorldQuests = UnitLevel("player") >= 78 and IsQuestFlaggedCompleted(84022) and IsQuestFlaggedCompleted(80592) -- https://www.wowhead.com/beta/quest=84022/uniting-severed-threads and https://www.wowhead.com/quest=80592/forge-a-pact + hasUnlockedWorldQuests = IsQuestFlaggedCompleted(79197) -- https://www.wowhead.com/quest=79197/surface-bound elseif (expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT) then _, _, _, hasUnlockedWorldQuests = GetAchievementInfo(16326) if not hasUnlockedWorldQuests then From ec28d71639a4576539860ac237b6ed8062a0b6b3 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Sat, 24 Aug 2024 23:34:45 -0500 Subject: [PATCH 37/51] Added First Two TWW Currencies: Resonance Crystals and The Assembly of the Deeps. --- Constants.lua | 6 +++-- WorldQuests.lua | 62 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/Constants.lua b/Constants.lua index 8a9bfd8..99474fd 100644 --- a/Constants.lua +++ b/Constants.lua @@ -75,6 +75,8 @@ CONSTANTS.REWARD_TYPES = { WYRMS_AWAKENED_CREST = 29, ASPECTS_AWAKENED_CREST = 30, MYSTERIOUS_FRAGMENT = 31, + RESONANCE_CRYSTALS = 32, + THE_ASSEMBLY_OF_THE_DEEPS = 33, } CONSTANTS.QUEST_TYPES = { @@ -124,7 +126,7 @@ CONSTANTS.CURRENCIES_AFFECTED_BY_WARMODE = { } CONSTANTS.THEWARWITHIN_REPUTATION_CURRENCY_IDS = { --- TODO + [2902] = true, -- The Assembly of the Deeps } CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS = { @@ -185,7 +187,7 @@ CONSTANTS.FAMILY_FAMILIAR_QUEST_IDS = { -- WQ pet battle achievement CONSTANTS.ACHIEVEMENT_IDS = { PET_BATTLE_WQ = { - [CONSTANTS.EXPANSIONS.THEWARWITHIN] = 0, -- TODO + [CONSTANTS.EXPANSIONS.THEWARWITHIN] = 40153, [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = 16464, [CONSTANTS.EXPANSIONS.SHADOWLANDS] = 14625, [CONSTANTS.EXPANSIONS.BFA] = 12936, diff --git a/WorldQuests.lua b/WorldQuests.lua index d62a0fb..592caae 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -187,6 +187,8 @@ local defaultConfig = { brokerShowWyrmsAwakenedCrest = true, brokerShowAspectsAwakenedCrest = true, brokerShowMysteriousFragment = true, + brokerShowResonanceCrystals = true, + brokerShowTheAssemblyoftheDeeps = true, brokerShowBloodyTokens = true, brokerShowPolishedPetCharms = false, sortByTimeRemaining = false, @@ -203,6 +205,8 @@ local defaultConfig = { showWyrmsAwakenedCrest = true, showAspectsAwakenedCrest = true, showMysteriousFragment = true, + showResonanceCrystals = true, + showTheAssemblyoftheDeeps = true, showBloodyTokens = true, showArtifactPower = true, showPrismaticManapearl = true, @@ -215,6 +219,7 @@ local defaultConfig = { showConduits = true, showMarkOfHonor = true, showOtherItems = true, + showTWWReputation = true, showDFReputation = true, showSLReputation = true, showBFAReputation = true, @@ -904,6 +909,10 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ARTIFACTPOWER quest.reward.azeriteAmount = currency.amount -- todo: improve broker text values? if C("showArtifactPower") then quest.hide = false end + elseif CONSTANTS.THEWARWITHIN_REPUTATION_CURRENCY_IDS[currencyId] then + currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT + if C("showTWWReputation") then quest.hide = false end elseif CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS[currencyId] then currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT @@ -1006,6 +1015,14 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.MYSTERIOUS_FRAGMENT quest.reward.MysteriousFragmentAmount = currency.amount if C("showMysteriousFragment") then quest.hide = false end + elseif currencyId == 2815 then -- Resonance Crystals + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.RESONANCE_CRYSTALS + quest.reward.ResonanceCrystalsAmount = currency.amount + if C("showResonanceCrystals") then quest.hide = false end + elseif currencyId == 2902 then -- The Assembly of the Deeps + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.THE_ASSEMBLY_OF_THE_DEEPS + quest.TheAssemblyoftheDeepsAmount = currency.amount + if C("showTheAssemblyoftheDeeps") then quest.hide = false end else if DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -1191,6 +1208,10 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalAspectsAwakenedCrest = BWQ.totalAspectsAwakenedCrest + quest.reward.AspectsAwakenedCrestAmount elseif rtype == CONSTANTS.REWARD_TYPES.MYSTERIOUS_FRAGMENT then BWQ.totalMysteriousFragment = BWQ.totalMysteriousFragment + quest.reward.MysteriousFragmentAmount + elseif rtype == CONSTANTS.REWARD_TYPES.RESONANCE_CRYSTALS then + BWQ.totalResonanceCrystals = BWQ.totalResonanceCrystals + quest.reward.ResonanceCrystalsAmount + elseif rtype == CONSTANTS.REWARD_TYPES.THE_ASSEMBLY_OF_THE_DEEPS then + BWQ.totalTheAssemblyOfTheDeeps = BWQ.totalTheAssemblyOfTheDeeps + quest.reward.TheAssemblyoftheDeepsAmount elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM then BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmsAmount end @@ -1526,7 +1547,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalWhelplingsAwakenedCrest, BWQ.totalDrakesAwakenedCrest, BWQ.totalWyrmsAwakenedCrest, BWQ.totalAspectsAwakenedCrest, BWQ.totalMysteriousFragment, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalWhelplingsAwakenedCrest, BWQ.totalDrakesAwakenedCrest, BWQ.totalWyrmsAwakenedCrest, BWQ.totalAspectsAwakenedCrest, BWQ.totalMysteriousFragment, BWQ.totalResonanceCrystals, BWQ.totalTheAssemblyOfTheDeeps, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -2077,6 +2098,8 @@ function BWQ:UpdateBlock() if C("brokerShowWyrmsAwakenedCrest") and BWQ.totalWyrmsAwakenedCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_wyrmsawakenedcrest:16:16|t %d ", brokerString, BWQ.totalWyrmsAwakenedCrest) end if C("brokerShowAspectsAwakenedCrest") and BWQ.totalAspectsAwakenedCrest > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_gearupgrade_aspectsawakenedcrest:16:16|t %d ", brokerString, BWQ.totalAspectsAwakenedCrest) end if C("brokerShowMysteriousFragment") and BWQ.totalMysteriousFragment > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_7_0raid_trinket_05a:16:16|t %d ", brokerString, BWQ.totalMysteriousFragment) end + if C("brokerShowResonanceCrystals") and BWQ.totalResonanceCrystals > 0 then brokerString = string.format("%s|TInterface\\Icons\\spell_azerite_essence14:16:16|t %d ", brokerString, BWQ.totalResonanceCrystals) end + if C("brokerShowTheAssemblyoftheDeeps") and BWQ.totalTheAssemblyOfTheDeeps > 0 then brokerString = string.format("%s|TInterface\\Icons\\ui_majorfactions_candle:16:16|t %d ", brokerString, BWQ.totalTheAssemblyOfTheDeeps) end if C("brokerShowPolishedPetCharms") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then @@ -2135,6 +2158,8 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Wyrms Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsAwakenedcrest"), check = "brokerShowWyrmsAwakenedCrest" }, { text = ("|T%1$s:16:16|t Aspects Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsAwakenedcrest"), check = "brokerShowAspectsAwakenedCrest" }, { text = ("|T%1$s:16:16|t Mysterious Fragment"):format("Interface\\Icons\\Inv_7_0raid_trinket_05a"), check = "brokerShowMysteriousFragment" }, + { text = ("|T%1$s:16:16|t Resonance Crystals"):format("Interface\\Icons\\spell_azerite_essence14"), check = "brokerShowResonanceCrystals" }, + { text = ("|T%1$s:16:16|t The Assembly of the Deeps"):format("Interface\\Icons\\ui_majorfactions_candle"), check = "brokerShowTheAssemblyoftheDeeps" }, { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharms" }, } }, @@ -2148,23 +2173,32 @@ function BWQ:SetupConfigMenu() { text = "Other", check = "showOtherItems" }, } }, - { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showDFReputation" }, - { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "showDragonIslesSupplies" }, - { text = ("|T%1$s:16:16|t Elemental Overflow"):format("Interface\\Icons\\inv_misc_powder_thorium"), check = "ShowElementalOverflow" }, - { text = ("|T%1$s:16:16|t Flightstones"):format("Interface\\Icons\\flightstone-dragonflight"), check = "showFlightstones" }, - { text = ("|T%1$s:16:16|t Whelplings Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_whelplingsdreamingcrest"), check = "showWhelplingsDreamingCrest" }, - { text = ("|T%1$s:16:16|t Drakes Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest"), check = "showDrakesDreamingCrest" }, - { text = ("|T%1$s:16:16|t Wyrms Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest"), check = "showWyrmsDreamingCrest" }, - { text = ("|T%1$s:16:16|t Aspects Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest"), check = "showAspectsDreamingCrest" }, - { text = ("|T%1$s:16:16|t Whelplings Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_whelplingsAwakenedcrest"), check = "showWhelplingsAwakenedCrest" }, - { text = ("|T%1$s:16:16|t Drakes Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesAwakenedcrest"), check = "showDrakesAwakenedCrest" }, - { text = ("|T%1$s:16:16|t Wyrms Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsAwakenedcrest"), check = "showWyrmsAwakenedCrest" }, - { text = ("|T%1$s:16:16|t Aspects Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsAwakenedcrest"), check = "showAspectsAwakenedCrest" }, - { text = ("|T%1$s:16:16|t Mysterious Fragment"):format("Interface\\Icons\\Inv_7_0raid_trinket_05a"), check = "showMysteriousFragment" }, { text = ("|T%1$s:16:16|t Bloody Tokens"):format("Interface\\Icons\\inv_10_dungeonjewelry_titan_trinket_2_color2"), check = "showBloodyTokens" }, { text = ("|T%1$s:16:16|t Honor"):format("Interface\\Icons\\Achievement_LegionPVPTier4"), check = "showHonor" }, { text = ("|T%1$s:16:16|t Low gold reward"):format("Interface\\GossipFrame\\auctioneerGossipIcon"), check = "showLowGold" }, { text = ("|T%1$s:16:16|t High gold reward"):format("Interface\\GossipFrame\\auctioneerGossipIcon"), check = "showHighGold" }, + { text = " The War Within", submenu = { + { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showTWWReputation" }, + { text = ("|T%s$s:16:16|t Resonance Crystals"):format("Interface\\Icons\\spell_azerite_essence14"), check = "showResonanceCrystals" }, + { text = ("|T%s$s:16:16|t The Assembly of the Deeps"):format("Interface\\Icons\\ui_majorfactions_candle"), check = "showTheAssemblyoftheDeeps" }, + } + }, + { text = " Dragonflight", submenu = { + { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showDFReputation" }, + { text = ("|T%1$s:16:16|t Dragon Isles Supplies"):format("Interface\\Icons\\inv_faction_warresources"), check = "showDragonIslesSupplies" }, + { text = ("|T%1$s:16:16|t Elemental Overflow"):format("Interface\\Icons\\inv_misc_powder_thorium"), check = "ShowElementalOverflow" }, + { text = ("|T%1$s:16:16|t Flightstones"):format("Interface\\Icons\\flightstone-dragonflight"), check = "showFlightstones" }, + { text = ("|T%1$s:16:16|t Whelplings Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_whelplingsdreamingcrest"), check = "showWhelplingsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Drakes Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesdreamingcrest"), check = "showDrakesDreamingCrest" }, + { text = ("|T%1$s:16:16|t Wyrms Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsdreamingcrest"), check = "showWyrmsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Aspects Dreaming Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsdreamingcrest"), check = "showAspectsDreamingCrest" }, + { text = ("|T%1$s:16:16|t Whelplings Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_whelplingsAwakenedcrest"), check = "showWhelplingsAwakenedCrest" }, + { text = ("|T%1$s:16:16|t Drakes Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_drakesAwakenedcrest"), check = "showDrakesAwakenedCrest" }, + { text = ("|T%1$s:16:16|t Wyrms Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_wyrmsAwakenedcrest"), check = "showWyrmsAwakenedCrest" }, + { text = ("|T%1$s:16:16|t Aspects Awakened Crest"):format("Interface\\Icons\\Inv_10_gearupgrade_aspectsAwakenedcrest"), check = "showAspectsAwakenedCrest" }, + { text = ("|T%1$s:16:16|t Mysterious Fragment"):format("Interface\\Icons\\Inv_7_0raid_trinket_05a"), check = "showMysteriousFragment" }, + } + }, { text = " Shadowlands", submenu = { { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showSLReputation" }, { text = ("|T%s$s:16:16|t Anima Item"):format("3528288"), check = "showAnima" }, From d1adbe9c72b88fab9411f285f95f52ebaff902e5 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Sat, 24 Aug 2024 23:42:01 -0500 Subject: [PATCH 38/51] Updated Broker_WorldQuests.toc and CHANGELOG.md for Version 11.0.2.2 --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index fee1833..5202565 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.2.1 +## Version: 11.0.2.2 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c29318..db595de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +### 11.0.2.2 +* Fixed criteria for unlocking World Quests in The War Within +* Added support for currency: Resonance Crystals +* Added support for currency: The Assembly of the Deeps + ### 11.0.2.1 * Initial updates required for The War Within * New users will be set to the expansion appropriate to their current level instead of defaulting From f1f2f39070e465ea3ad41c256312b106995f58fe Mon Sep 17 00:00:00 2001 From: Amadeus Date: Sun, 25 Aug 2024 01:23:42 -0500 Subject: [PATCH 39/51] Disabled text notification for unhandled currency --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 3 +++ WorldQuests.lua | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 5202565..81a3b50 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.2.2 +## Version: 11.0.2.3 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index db595de..b07909d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.0.2.3 +* Disabled text notification for unhandled currency. This is intended for developers. + ### 11.0.2.2 * Fixed criteria for unlocking World Quests in The War Within * Added support for currency: Resonance Crystals diff --git a/WorldQuests.lua b/WorldQuests.lua index 592caae..0a21558 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -17,7 +17,7 @@ local REPUTATION local _, addon = ... local CONSTANTS = addon.CONSTANTS -local DEBUG = true +local DEBUG = false local isHorde = UnitFactionGroup("player") == "Horde" From 50e9e2f84f094f1755ae1b0b07213a07ae27cb9c Mon Sep 17 00:00:00 2001 From: Amadeus Date: Sun, 25 Aug 2024 20:13:34 -0500 Subject: [PATCH 40/51] World Quests will now properly unlock for all appropriate characters in The War Within --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 3 +++ WorldQuests.lua | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 81a3b50..5ad5227 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.2.3 +## Version: 11.0.2.4 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index b07909d..14850d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.0.2.4 +* World Quests will now properly unlock for all appropriate characters in The War Within + ### 11.0.2.3 * Disabled text notification for unhandled currency. This is intended for developers. diff --git a/WorldQuests.lua b/WorldQuests.lua index 0a21558..cf9abc3 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -441,7 +441,7 @@ local hasUnlockedWorldQuests function BWQ:WorldQuestsUnlocked() if not hasUnlockedWorldQuests then if (expansion == CONSTANTS.EXPANSIONS.THEWARWITHIN) then - hasUnlockedWorldQuests = IsQuestFlaggedCompleted(79197) -- https://www.wowhead.com/quest=79197/surface-bound + hasUnlockedWorldQuests = IsQuestFlaggedCompleted(79573) -- See effect #1 under https://www.wowhead.com/spell=434027/world-quests-adventure-mode elseif (expansion == CONSTANTS.EXPANSIONS.DRAGONFLIGHT) then _, _, _, hasUnlockedWorldQuests = GetAchievementInfo(16326) if not hasUnlockedWorldQuests then From f830fe3edfbc16f6725023ef2ffcc8fa3ad2fc43 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Tue, 27 Aug 2024 00:49:15 -0500 Subject: [PATCH 41/51] It appears that Azj-Kahet doesn't have world quests in 11.0 after all. --- WorldQuests.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index cf9abc3..531bb61 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -78,7 +78,6 @@ local MAP_ZONES = { [2248] = { id = 2248, name = GetMapInfo(2248).name, quests = {}, buttons = {}, }, -- Isle of Dorn 11.0 [2214] = { id = 2214, name = GetMapInfo(2214).name, quests = {}, buttons = {}, }, -- The Ringing Deeps 11.0 [2215] = { id = 2215, name = GetMapInfo(2215).name, quests = {}, buttons = {}, }, -- Hallowfall 11.0 - [2255] = { id = 2255, name = GetMapInfo(2255).name, quests = {}, buttons = {}, }, -- Azj-Kahet 11.0 }, [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { [2022] = { id = 2022, name = GetMapInfo(2022).name, quests = {}, buttons = {}, }, -- The Waking Shores 10.0 From 9f8c2815357b92ab76b735f38cdebab9e9efce4b Mon Sep 17 00:00:00 2001 From: Amadeus Date: Tue, 27 Aug 2024 11:29:44 -0500 Subject: [PATCH 42/51] Linting --- WorldQuests.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index 531bb61..f1e004d 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -128,7 +128,7 @@ local MAP_ZONES = { } local MAP_ZONES_SORT = { [CONSTANTS.EXPANSIONS.THEWARWITHIN] = { - 2248, 2214, 2215, 2255 + 2248, 2214, 2215 }, [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { 2022, 2023, 2024, 2025, 2085, 2151, 2133, 2200 From 81803ecb24b1b287f4e5b812e0ce18c7bc9ddd0f Mon Sep 17 00:00:00 2001 From: Amadeus Date: Tue, 27 Aug 2024 11:48:57 -0500 Subject: [PATCH 43/51] Added support for Hallowfall Arathi currency --- Constants.lua | 10 +++++++--- WorldQuests.lua | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Constants.lua b/Constants.lua index 99474fd..92ff3e1 100644 --- a/Constants.lua +++ b/Constants.lua @@ -77,6 +77,7 @@ CONSTANTS.REWARD_TYPES = { MYSTERIOUS_FRAGMENT = 31, RESONANCE_CRYSTALS = 32, THE_ASSEMBLY_OF_THE_DEEPS = 33, + HALLOWFALL_ARATHI = 34, } CONSTANTS.QUEST_TYPES = { @@ -127,6 +128,7 @@ CONSTANTS.CURRENCIES_AFFECTED_BY_WARMODE = { CONSTANTS.THEWARWITHIN_REPUTATION_CURRENCY_IDS = { [2902] = true, -- The Assembly of the Deeps + [2899] = true, -- Hallowfall Arathi } CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS = { @@ -374,9 +376,11 @@ CONSTANTS.PARAGON_FACTIONS = { [2564] = "ui_majorfaction_niffen", -- Loamm Niffen [2574] = "ui_majorfaction_denizens", -- Dream Wardens }, - thewarwithin = { -- TODO - order = {}, + thewarwithin = { + order = {2902, 2899 }, + [2902] = "ui_majorfactions_candle", -- The Assembly of the Deeps + [2899] = "ui_majorfactions_flame", -- Hallowfall Arathi }, } -addon.CONSTANTS = CONSTANTS +addon.CONSTANTS = CONSTANTS \ No newline at end of file diff --git a/WorldQuests.lua b/WorldQuests.lua index f1e004d..8b506dc 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -188,6 +188,7 @@ local defaultConfig = { brokerShowMysteriousFragment = true, brokerShowResonanceCrystals = true, brokerShowTheAssemblyoftheDeeps = true, + brokerShowHallowfallArathi = true, brokerShowBloodyTokens = true, brokerShowPolishedPetCharms = false, sortByTimeRemaining = false, @@ -206,6 +207,7 @@ local defaultConfig = { showMysteriousFragment = true, showResonanceCrystals = true, showTheAssemblyoftheDeeps = true, + showHallowfallArathi = true, showBloodyTokens = true, showArtifactPower = true, showPrismaticManapearl = true, @@ -1020,8 +1022,12 @@ local RetrieveWorldQuests = function(mapId) if C("showResonanceCrystals") then quest.hide = false end elseif currencyId == 2902 then -- The Assembly of the Deeps rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.THE_ASSEMBLY_OF_THE_DEEPS - quest.TheAssemblyoftheDeepsAmount = currency.amount + quest.reward.TheAssemblyoftheDeepsAmount = currency.amount if C("showTheAssemblyoftheDeeps") then quest.hide = false end + elseif currencyId == 2899 then -- Hallowfall Arathi + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.HALLOWFALL_ARATHI + quest.reward.HallowfallArathiAmount = currency.amount + if C("showHallowfallArathi") then quest.hide = false end else if DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -1211,6 +1217,8 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalResonanceCrystals = BWQ.totalResonanceCrystals + quest.reward.ResonanceCrystalsAmount elseif rtype == CONSTANTS.REWARD_TYPES.THE_ASSEMBLY_OF_THE_DEEPS then BWQ.totalTheAssemblyOfTheDeeps = BWQ.totalTheAssemblyOfTheDeeps + quest.reward.TheAssemblyoftheDeepsAmount + elseif rtype == CONSTANTS.REWARD_TYPES.HALLOWFALL_ARATHI then + BWQ.totalHallowfallArathi = BWQ.totalHallowfallArathi + quest.reward.HallowfallArathiAmount elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM then BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmsAmount end @@ -1546,7 +1554,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalWhelplingsAwakenedCrest, BWQ.totalDrakesAwakenedCrest, BWQ.totalWyrmsAwakenedCrest, BWQ.totalAspectsAwakenedCrest, BWQ.totalMysteriousFragment, BWQ.totalResonanceCrystals, BWQ.totalTheAssemblyOfTheDeeps, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalWhelplingsAwakenedCrest, BWQ.totalDrakesAwakenedCrest, BWQ.totalWyrmsAwakenedCrest, BWQ.totalAspectsAwakenedCrest, BWQ.totalMysteriousFragment, BWQ.totalResonanceCrystals, BWQ.totalTheAssemblyOfTheDeeps, BWQ.totalHallowfallArathi, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -2099,6 +2107,7 @@ function BWQ:UpdateBlock() if C("brokerShowMysteriousFragment") and BWQ.totalMysteriousFragment > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_7_0raid_trinket_05a:16:16|t %d ", brokerString, BWQ.totalMysteriousFragment) end if C("brokerShowResonanceCrystals") and BWQ.totalResonanceCrystals > 0 then brokerString = string.format("%s|TInterface\\Icons\\spell_azerite_essence14:16:16|t %d ", brokerString, BWQ.totalResonanceCrystals) end if C("brokerShowTheAssemblyoftheDeeps") and BWQ.totalTheAssemblyOfTheDeeps > 0 then brokerString = string.format("%s|TInterface\\Icons\\ui_majorfactions_candle:16:16|t %d ", brokerString, BWQ.totalTheAssemblyOfTheDeeps) end + if C("brokerShowHallowfallArathi") and BWQ.totalHallowfallArathi > 0 then brokerString = string.format("%s|TInterface\\Icons\\ui_majorfactions_flame:16:16|t %d ", brokerString, BWQ.totalHallowfallArathi) end if C("brokerShowPolishedPetCharms") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then @@ -2159,6 +2168,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Mysterious Fragment"):format("Interface\\Icons\\Inv_7_0raid_trinket_05a"), check = "brokerShowMysteriousFragment" }, { text = ("|T%1$s:16:16|t Resonance Crystals"):format("Interface\\Icons\\spell_azerite_essence14"), check = "brokerShowResonanceCrystals" }, { text = ("|T%1$s:16:16|t The Assembly of the Deeps"):format("Interface\\Icons\\ui_majorfactions_candle"), check = "brokerShowTheAssemblyoftheDeeps" }, + { text = ("|T%1$s:16:16|t Hallowfall Arathi"):format("Interface\\Icons\\ui_majorfactions_flame"), check = "brokerShowHallowfallArathi" }, { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharms" }, } }, @@ -2180,6 +2190,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Reputation Tokens"):format("Interface\\Icons\\inv_scroll_11"), check = "showTWWReputation" }, { text = ("|T%s$s:16:16|t Resonance Crystals"):format("Interface\\Icons\\spell_azerite_essence14"), check = "showResonanceCrystals" }, { text = ("|T%s$s:16:16|t The Assembly of the Deeps"):format("Interface\\Icons\\ui_majorfactions_candle"), check = "showTheAssemblyoftheDeeps" }, + { text = ("|T%s$s:16:16|t Hallowfall Arathi"):format("Interface\\Icons\\ui_majorfactions_flame"), check = "showHallowfallArathi" }, } }, { text = " Dragonflight", submenu = { From a0ae637afbbef5f62850f00e00cb602494c82f9d Mon Sep 17 00:00:00 2001 From: Amadeus Date: Tue, 27 Aug 2024 11:49:53 -0500 Subject: [PATCH 44/51] 11.0.2.5 --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 5ad5227..00acc92 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.2.4 +## Version: 11.0.2.5 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 14850d2..5ad9c0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.0.2.5 +* Added support for Hallowfall Arathi currency + ### 11.0.2.4 * World Quests will now properly unlock for all appropriate characters in The War Within From 6d3ddc8fd133c508933cf636332609d25196adb0 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 28 Aug 2024 01:28:37 -0500 Subject: [PATCH 45/51] Added support for Azj-Kahet --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 3 +++ WorldQuests.lua | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 00acc92..f96a6fa 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.2.5 +## Version: 11.0.2.6 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ad9c0c..adfbb79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.0.2.6 +* Added support for Azj-Kahet + ### 11.0.2.5 * Added support for Hallowfall Arathi currency diff --git a/WorldQuests.lua b/WorldQuests.lua index 8b506dc..a32d219 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -17,7 +17,7 @@ local REPUTATION local _, addon = ... local CONSTANTS = addon.CONSTANTS -local DEBUG = false +local DEBUG = true local isHorde = UnitFactionGroup("player") == "Horde" @@ -78,6 +78,7 @@ local MAP_ZONES = { [2248] = { id = 2248, name = GetMapInfo(2248).name, quests = {}, buttons = {}, }, -- Isle of Dorn 11.0 [2214] = { id = 2214, name = GetMapInfo(2214).name, quests = {}, buttons = {}, }, -- The Ringing Deeps 11.0 [2215] = { id = 2215, name = GetMapInfo(2215).name, quests = {}, buttons = {}, }, -- Hallowfall 11.0 + [2255] = { id = 2255, name = GetMapInfo(2255).name, quests = {}, buttons = {}, }, -- Azj-Kahet 11.0 }, [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { [2022] = { id = 2022, name = GetMapInfo(2022).name, quests = {}, buttons = {}, }, -- The Waking Shores 10.0 @@ -128,7 +129,7 @@ local MAP_ZONES = { } local MAP_ZONES_SORT = { [CONSTANTS.EXPANSIONS.THEWARWITHIN] = { - 2248, 2214, 2215 + 2248, 2214, 2215, 2255 }, [CONSTANTS.EXPANSIONS.DRAGONFLIGHT] = { 2022, 2023, 2024, 2025, 2085, 2151, 2133, 2200 From bc43ab228897623ae9d2285856786f896981a4fa Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 28 Aug 2024 18:24:30 -0500 Subject: [PATCH 46/51] Added support for Valorstones currency --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 3 +++ Constants.lua | 1 + WorldQuests.lua | 15 +++++++++++++-- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index f96a6fa..55f7fbf 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.2.6 +## Version: 11.0.2.7 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index adfbb79..15de934 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.0.2.7 +* Added support for Valorstones currency + ### 11.0.2.6 * Added support for Azj-Kahet diff --git a/Constants.lua b/Constants.lua index 92ff3e1..a7b5b2c 100644 --- a/Constants.lua +++ b/Constants.lua @@ -78,6 +78,7 @@ CONSTANTS.REWARD_TYPES = { RESONANCE_CRYSTALS = 32, THE_ASSEMBLY_OF_THE_DEEPS = 33, HALLOWFALL_ARATHI = 34, + VALORSTONES = 35, } CONSTANTS.QUEST_TYPES = { diff --git a/WorldQuests.lua b/WorldQuests.lua index a32d219..08d3bde 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -17,7 +17,7 @@ local REPUTATION local _, addon = ... local CONSTANTS = addon.CONSTANTS -local DEBUG = true +local DEBUG = false local isHorde = UnitFactionGroup("player") == "Horde" @@ -189,6 +189,7 @@ local defaultConfig = { brokerShowMysteriousFragment = true, brokerShowResonanceCrystals = true, brokerShowTheAssemblyoftheDeeps = true, + brokerShowValorstones = true, brokerShowHallowfallArathi = true, brokerShowBloodyTokens = true, brokerShowPolishedPetCharms = false, @@ -209,6 +210,7 @@ local defaultConfig = { showResonanceCrystals = true, showTheAssemblyoftheDeeps = true, showHallowfallArathi = true, + showValorstones = true, showBloodyTokens = true, showArtifactPower = true, showPrismaticManapearl = true, @@ -1029,6 +1031,10 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.HALLOWFALL_ARATHI quest.reward.HallowfallArathiAmount = currency.amount if C("showHallowfallArathi") then quest.hide = false end + elseif currencyId == 3008 then -- Valorstones + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.VALORSTONES + quest.reward.ValorstonesAmount = currency.amount + if C("showValorstones") then quest.hide = false end else if DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -1220,6 +1226,8 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalTheAssemblyOfTheDeeps = BWQ.totalTheAssemblyOfTheDeeps + quest.reward.TheAssemblyoftheDeepsAmount elseif rtype == CONSTANTS.REWARD_TYPES.HALLOWFALL_ARATHI then BWQ.totalHallowfallArathi = BWQ.totalHallowfallArathi + quest.reward.HallowfallArathiAmount + elseif rtype == CONSTANTS.REWARD_TYPES.VALORSTONES then + BWQ.totalValorstones = BWQ.totalValorstones + quest.reward.ValorstonesAmount elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM then BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmsAmount end @@ -1555,7 +1563,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalWhelplingsAwakenedCrest, BWQ.totalDrakesAwakenedCrest, BWQ.totalWyrmsAwakenedCrest, BWQ.totalAspectsAwakenedCrest, BWQ.totalMysteriousFragment, BWQ.totalResonanceCrystals, BWQ.totalTheAssemblyOfTheDeeps, BWQ.totalHallowfallArathi, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalWhelplingsAwakenedCrest, BWQ.totalDrakesAwakenedCrest, BWQ.totalWyrmsAwakenedCrest, BWQ.totalAspectsAwakenedCrest, BWQ.totalMysteriousFragment, BWQ.totalResonanceCrystals, BWQ.totalTheAssemblyOfTheDeeps, BWQ.totalHallowfallArathi, BWQ.totalValorstones, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -2109,6 +2117,7 @@ function BWQ:UpdateBlock() if C("brokerShowResonanceCrystals") and BWQ.totalResonanceCrystals > 0 then brokerString = string.format("%s|TInterface\\Icons\\spell_azerite_essence14:16:16|t %d ", brokerString, BWQ.totalResonanceCrystals) end if C("brokerShowTheAssemblyoftheDeeps") and BWQ.totalTheAssemblyOfTheDeeps > 0 then brokerString = string.format("%s|TInterface\\Icons\\ui_majorfactions_candle:16:16|t %d ", brokerString, BWQ.totalTheAssemblyOfTheDeeps) end if C("brokerShowHallowfallArathi") and BWQ.totalHallowfallArathi > 0 then brokerString = string.format("%s|TInterface\\Icons\\ui_majorfactions_flame:16:16|t %d ", brokerString, BWQ.totalHallowfallArathi) end + if C("brokerShowValorstones") and BWQ.totalValorstones > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_valorstone_base:16:16|t %d ", brokerString, BWQ.totalValorstones) end if C("brokerShowPolishedPetCharms") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then @@ -2170,6 +2179,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Resonance Crystals"):format("Interface\\Icons\\spell_azerite_essence14"), check = "brokerShowResonanceCrystals" }, { text = ("|T%1$s:16:16|t The Assembly of the Deeps"):format("Interface\\Icons\\ui_majorfactions_candle"), check = "brokerShowTheAssemblyoftheDeeps" }, { text = ("|T%1$s:16:16|t Hallowfall Arathi"):format("Interface\\Icons\\ui_majorfactions_flame"), check = "brokerShowHallowfallArathi" }, + { text = ("|T%1$s:16:16|t Valorstones"):format("Interface\\Icons\\inv_valorstone_base"), check = "brokerShowValorstones" }, { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharms" }, } }, @@ -2192,6 +2202,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%s$s:16:16|t Resonance Crystals"):format("Interface\\Icons\\spell_azerite_essence14"), check = "showResonanceCrystals" }, { text = ("|T%s$s:16:16|t The Assembly of the Deeps"):format("Interface\\Icons\\ui_majorfactions_candle"), check = "showTheAssemblyoftheDeeps" }, { text = ("|T%s$s:16:16|t Hallowfall Arathi"):format("Interface\\Icons\\ui_majorfactions_flame"), check = "showHallowfallArathi" }, + { text = ("|T%1$s:16:16|t Valorstones"):format("Interface\\Icons\\inv_valorstone_base"), check = "brokerShowValorstones" }, } }, { text = " Dragonflight", submenu = { From 6d5eb3356483bae78ea4a5bb34fc8ca589d711e9 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 28 Aug 2024 18:26:19 -0500 Subject: [PATCH 47/51] Renamed variable DEBUG to WQB_DEBUG to ensure no conflicts with other addons. --- WorldQuests.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index 08d3bde..d3e0b90 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -17,7 +17,7 @@ local REPUTATION local _, addon = ... local CONSTANTS = addon.CONSTANTS -local DEBUG = false +local WQB_DEBUG = false local isHorde = UnitFactionGroup("player") == "Horde" @@ -1036,7 +1036,7 @@ local RetrieveWorldQuests = function(mapId) quest.reward.ValorstonesAmount = currency.amount if C("showValorstones") then quest.hide = false end else - if DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end + if WQB_DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end quest.reward.currencies[#quest.reward.currencies + 1] = currency @@ -1048,7 +1048,7 @@ local RetrieveWorldQuests = function(mapId) end end - if DEBUG and not hasReward and not HaveQuestData(quest.questId) then + if WQB_DEBUG and not hasReward and not HaveQuestData(quest.questId) then print(string.format("[BWQ] Quest with no reward found: ID %s (%s)", quest.questId, quest.title)) end if not hasReward then needsRefresh = true end -- in most cases no reward means api returned incomplete data From aa4a35f3e04dcb6b7f2af058f0181000e505d1fe Mon Sep 17 00:00:00 2001 From: Amadeus Date: Fri, 30 Aug 2024 19:40:58 -0500 Subject: [PATCH 48/51] Added support for Kej currency --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 3 +++ Constants.lua | 1 + WorldQuests.lua | 13 ++++++++++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 55f7fbf..3f58650 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.2.7 +## Version: 11.0.2.8 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/CHANGELOG.md b/CHANGELOG.md index 15de934..04277d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.0.2.8 +* Added support for Kej currency + ### 11.0.2.7 * Added support for Valorstones currency diff --git a/Constants.lua b/Constants.lua index a7b5b2c..edba27a 100644 --- a/Constants.lua +++ b/Constants.lua @@ -79,6 +79,7 @@ CONSTANTS.REWARD_TYPES = { THE_ASSEMBLY_OF_THE_DEEPS = 33, HALLOWFALL_ARATHI = 34, VALORSTONES = 35, + KEJ = 36, } CONSTANTS.QUEST_TYPES = { diff --git a/WorldQuests.lua b/WorldQuests.lua index d3e0b90..d607e35 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -190,6 +190,7 @@ local defaultConfig = { brokerShowResonanceCrystals = true, brokerShowTheAssemblyoftheDeeps = true, brokerShowValorstones = true, + brokerShowKej = true, brokerShowHallowfallArathi = true, brokerShowBloodyTokens = true, brokerShowPolishedPetCharms = false, @@ -211,6 +212,7 @@ local defaultConfig = { showTheAssemblyoftheDeeps = true, showHallowfallArathi = true, showValorstones = true, + showKej = true, showBloodyTokens = true, showArtifactPower = true, showPrismaticManapearl = true, @@ -1035,6 +1037,10 @@ local RetrieveWorldQuests = function(mapId) rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.VALORSTONES quest.reward.ValorstonesAmount = currency.amount if C("showValorstones") then quest.hide = false end + elseif currencyId == 3056 then -- Kej + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.KEJ + quest.reward.KejAmount = currency.amount + if C("showKej") then quest.hide = false end else if WQB_DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -1228,6 +1234,8 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalHallowfallArathi = BWQ.totalHallowfallArathi + quest.reward.HallowfallArathiAmount elseif rtype == CONSTANTS.REWARD_TYPES.VALORSTONES then BWQ.totalValorstones = BWQ.totalValorstones + quest.reward.ValorstonesAmount + elseif rtype == CONSTANTS.REWARD_TYPES.KEJ then + BWQ.totalKej = BWQ.totalKej + quest.reward.KejAmount elseif rtype == CONSTANTS.REWARD_TYPES.POLISHED_PET_CHARM then BWQ.totalPolishedPetCharms = BWQ.totalPolishedPetCharms + quest.reward.polishedPetCharmsAmount end @@ -1563,7 +1571,7 @@ end local originalMap, originalContinent, originalDungeonLevel function BWQ:UpdateQuestData() questIds = BWQcache.questIds or {} - BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalWhelplingsAwakenedCrest, BWQ.totalDrakesAwakenedCrest, BWQ.totalWyrmsAwakenedCrest, BWQ.totalAspectsAwakenedCrest, BWQ.totalMysteriousFragment, BWQ.totalResonanceCrystals, BWQ.totalTheAssemblyOfTheDeeps, BWQ.totalHallowfallArathi, BWQ.totalValorstones, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + BWQ.totalArtifactPower, BWQ.totalGold, BWQ.totalWarResources, BWQ.totalServiceMedals, BWQ.totalResources, BWQ.totalLegionfallSupplies, BWQ.totalHonor, BWQ.totalGear, BWQ.totalHerbalism, BWQ.totalMining, BWQ.totalFishing, BWQ.totalSkinning, BWQ.totalBloodOfSargeras, BWQ.totalWakeningEssences, BWQ.totalMarkOfHonor, BWQ.totalPrismaticManapearl, BWQ.totalCyphersOfTheFirstOnes, BWQ.totalGratefulOffering, BWQ.totalBloodyTokens, BWQ.totalDragonIslesSupplies, BWQ.totalElementalOverflow, BWQ.totalFlightstones, BWQ.totalWhelplingsDreamingCrest, BWQ.totalDrakesDreamingCrest, BWQ.totalWyrmsDreamingCrest, BWQ.totalAspectsDreamingCrest, BWQ.totalWhelplingsAwakenedCrest, BWQ.totalDrakesAwakenedCrest, BWQ.totalWyrmsAwakenedCrest, BWQ.totalAspectsAwakenedCrest, BWQ.totalMysteriousFragment, BWQ.totalResonanceCrystals, BWQ.totalTheAssemblyOfTheDeeps, BWQ.totalHallowfallArathi, BWQ.totalValorstones, BWQ.totalKej, BWQ.totalPolishedPetCharms = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do RetrieveWorldQuests(mapId) @@ -2118,6 +2126,7 @@ function BWQ:UpdateBlock() if C("brokerShowTheAssemblyoftheDeeps") and BWQ.totalTheAssemblyOfTheDeeps > 0 then brokerString = string.format("%s|TInterface\\Icons\\ui_majorfactions_candle:16:16|t %d ", brokerString, BWQ.totalTheAssemblyOfTheDeeps) end if C("brokerShowHallowfallArathi") and BWQ.totalHallowfallArathi > 0 then brokerString = string.format("%s|TInterface\\Icons\\ui_majorfactions_flame:16:16|t %d ", brokerString, BWQ.totalHallowfallArathi) end if C("brokerShowValorstones") and BWQ.totalValorstones > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_valorstone_base:16:16|t %d ", brokerString, BWQ.totalValorstones) end + if C("brokerShowKej") and BWQ.totalKej > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_10_tailoring_silkrare_color3:16:16|t %d ", brokerString, BWQ.totalKej) end if C("brokerShowPolishedPetCharms") and BWQ.totalPolishedPetCharms > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_currency_petbattle:16:16|t %d ", brokerString, BWQ.totalPolishedPetCharms) end if brokerString and brokerString ~= "" then @@ -2180,6 +2189,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t The Assembly of the Deeps"):format("Interface\\Icons\\ui_majorfactions_candle"), check = "brokerShowTheAssemblyoftheDeeps" }, { text = ("|T%1$s:16:16|t Hallowfall Arathi"):format("Interface\\Icons\\ui_majorfactions_flame"), check = "brokerShowHallowfallArathi" }, { text = ("|T%1$s:16:16|t Valorstones"):format("Interface\\Icons\\inv_valorstone_base"), check = "brokerShowValorstones" }, + { text = ("|T%1$s:16:16|t Kej"):format("Interface\\Icons\\inv_10_tailoring_silkrare_color3"), check = "brokerShowKej" }, { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharms" }, } }, @@ -2203,6 +2213,7 @@ function BWQ:SetupConfigMenu() { text = ("|T%s$s:16:16|t The Assembly of the Deeps"):format("Interface\\Icons\\ui_majorfactions_candle"), check = "showTheAssemblyoftheDeeps" }, { text = ("|T%s$s:16:16|t Hallowfall Arathi"):format("Interface\\Icons\\ui_majorfactions_flame"), check = "showHallowfallArathi" }, { text = ("|T%1$s:16:16|t Valorstones"):format("Interface\\Icons\\inv_valorstone_base"), check = "brokerShowValorstones" }, + { text = ("|T%1$s:16:16|t Kej"):format("Interface\\Icons\\inv_10_tailoring_silkrare_color3"), check = "brokerShowKej" }, } }, { text = " Dragonflight", submenu = { From 9025b2ddf6ed9c1d25a779b52e7271daa571db17 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Sun, 1 Sep 2024 00:12:08 -0500 Subject: [PATCH 49/51] Fixed currencies being incorrect or showing as zero (i.e., updated API calls to 11.0) Increased the max width of the BWQ window. Increased the size of the red highlight arrow (that appears on the map when you click on a WQ in the addon) by 35%. --- CHANGELOG.md | 6 + WorldQuests.lua | 358 +++++++++++++++++++++++------------------------- 2 files changed, 174 insertions(+), 190 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04277d4..4719296 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### 11.0.2.9 +* Fixed currencies being incorrect or showing as zero. +* Increased the max width of the BWQ window. +* Increased the size of the red highlight arrow (that appears on the map + when you click on a WQ in the addon) by 35%. + ### 11.0.2.8 * Added support for Kej currency diff --git a/WorldQuests.lua b/WorldQuests.lua index d607e35..2b72a75 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -17,7 +17,7 @@ local REPUTATION local _, addon = ... local CONSTANTS = addon.CONSTANTS -local WQB_DEBUG = false +local WQB_DEBUG = true local isHorde = UnitFactionGroup("player") == "Horde" @@ -45,32 +45,6 @@ local IsWarModeDesired local GetQuestObjectiveInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, HaveQuestData = GetQuestObjectiveInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, HaveQuestData -local GetNumQuestLogRewardCurrencies, GetQuestLogRewardCurrencyInfo = GetNumQuestLogRewardCurrencies, GetQuestLogRewardCurrencyInfo -if not GetNumQuestLogRewardCurrencies then - local reward_cache = {} - local function GetData(questID) - local data = reward_cache[questID] - local t = GetTime() - if not data or t > data.expTime then - data = C_QuestLog.GetQuestRewardCurrencies(questID) - data.expTime = t + 5 - end - return data - end - function GetNumQuestLogRewardCurrencies(questID) - local data = GetData(questID) - return #data - end - function GetQuestLogRewardCurrencyInfo(i, questID) - local data = GetData(questID)[i] - if not data then - return - end - return data.name, data.texture, data.baseRewardAmount, data.currencyID - --data.totalRewardAmount - end -end - -- When adding zones to MAP_ZONES, be sure to also add the zoneID to MAP_ZONES_SORT immediately below -- The simplest way to get the MapID for the zone you are currently in is to enter "/dump C_Map.GetBestMapForUnit("player")" local MAP_ZONES = { @@ -657,7 +631,7 @@ end -- super track map ping local mapTextures = CreateFrame("Frame", "BWQ_MapTextures", WorldMapFrame:GetCanvas()) -mapTextures:SetSize(200,200) +mapTextures:SetSize(400,400) mapTextures:SetFrameStrata("DIALOG") mapTextures:SetFrameLevel(2001) local highlightArrow = mapTextures:CreateTexture("highlightArrow") @@ -721,7 +695,7 @@ local Row_OnClick = function(row) if row.quest.x and row.quest.y then local x, y = BWQ:CalculateMapPosition(row.quest.x, row.quest.y) local scale = WorldMapFrame:GetCanvasScale() - local size = 30 / scale + local size = 30 / scale * 1.35 BWQ.mapTextures:ClearAllPoints() BWQ.mapTextures.highlightArrow:SetSize(size, size) BWQ.mapTextures:SetPoint("CENTER", WorldMapFrame:GetCanvas(), "TOPLEFT", x, y + 25 + (scale < 0.5 and 50 or 0)) @@ -893,163 +867,169 @@ local RetrieveWorldQuests = function(mapId) if C("showHonor") then quest.hide = false end end -- currency reward - local numQuestCurrencies = GetNumQuestLogRewardCurrencies(quest.questId) - quest.reward.currencies = {} - for i = 1, numQuestCurrencies do - local name, texture, numItems, currencyId = GetQuestLogRewardCurrencyInfo(i, quest.questId) - if name then - hasReward = true - local currency = {} - if CONSTANTS.CURRENCIES_AFFECTED_BY_WARMODE[currencyId] then - currency.amount = BWQ:ValueWithWarModeBonus(quest.questId, numItems) - else - currency.amount = numItems - end - currency.name = string.format("%d %s", currency.amount, name) - currency.texture = texture - - --print(string.format("[BWQ] Quest %s - %s - %s - %s - %s - %s - %s", quest.questId, quest.title, name, currencyId, currency.name, currency.texture, currency.amount)) -- for debugging - - if currencyId == 1553 then -- azerite - currency.name = string.format("|cffe5cc80[%d %s]|r", currency.amount, name) - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ARTIFACTPOWER - quest.reward.azeriteAmount = currency.amount -- todo: improve broker text values? - if C("showArtifactPower") then quest.hide = false end - elseif CONSTANTS.THEWARWITHIN_REPUTATION_CURRENCY_IDS[currencyId] then - currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT - if C("showTWWReputation") then quest.hide = false end - elseif CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS[currencyId] then - currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT - if C("showDFReputation") then quest.hide = false end - elseif CONSTANTS.SHADOWLANDS_REPUTATION_CURRENCY_IDS[currencyId] then - currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT - if C("showSLReputation") then quest.hide = false end - elseif CONSTANTS.BFA_REPUTATION_CURRENCY_IDS[currencyId] then - currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT - if C("showBFAReputation") then quest.hide = false end - elseif currencyId == 1560 then -- war resources - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WAR_RESOURCES - quest.reward.warResourceAmount = currency.amount - if C("showWarResources") then quest.hide = false end - elseif currencyId == 1716 or currencyId == 1717 then -- service medals - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.SERVICE_MEDAL - quest.reward.serviceMedalAmount = currency.amount - if C("showBFAServiceMedals") then quest.hide = false end - elseif currencyId == 1220 then -- order hall resources - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.RESOURCES - quest.reward.resourceAmount = currency.amount - if C("showResources") then quest.hide = false end - elseif currencyId == 1342 then -- legionfall supplies - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.LEGIONFALL_SUPPLIES - quest.reward.legionfallSuppliesAmount = currency.amount - if C("showLegionfallSupplies") then quest.hide = false end - elseif currencyId == 1226 then -- nethershard - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.NETHERSHARD - if C("showNethershards") then quest.hide = false end - elseif currencyId == 1508 then -- argunite - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ARGUNITE - if C("showArgunite") then quest.hide = false end - elseif currencyId == 1533 then - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WAKENING_ESSENCE - quest.reward.wakeningEssencesAmount = currency.amount - if C("showWakeningEssences") then quest.hide = false end - elseif currencyId == 1721 then -- prismatic manapearl - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.PRISMATIC_MANAPEARL - quest.reward.prismaticManapearlAmount = currency.amount - if C("showPrismaticManapearl") then quest.hide = false end - elseif currencyId == 1979 then -- cyphers of the first ones (Zereth Mortis - 9.2) - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.CYPHERS_OF_THE_FIRST_ONES - quest.reward.cyphersOfTheFirstOnesAmount = currency.amount - if C("showCyphersOfTheFirstOnes") then quest.hide = false end - elseif currencyId == 1885 then -- grateful offering - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.GRATEFUL_OFFERING - quest.reward.gratefulOfferingAmount = currency.amount - if C("showGratefulOffering") then quest.hide = false end - elseif currencyId == 2123 then -- bloody tokens - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.BLOODY_TOKENS - quest.reward.bloodyTokensAmount = currency.amount - if C("showBloodyTokens") then quest.hide = false end - elseif currencyId == 2003 then -- dragon isles supplies - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DRAGON_ISLES_SUPPLIES - quest.reward.dragonIslesSuppliesAmount = currency.amount - if C("showDragonIslesSupplies") then quest.hide = false end - elseif currencyId == 2118 then -- elemental overflow - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ELEMENTAL_OVERFLOW - quest.reward.elementalOverflowAmount = currency.amount - if C("showElementalOverflow") then quest.hide = false end - elseif currencyId == 2245 then -- flightstones - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.FLIGHTSTONES - quest.reward.flightstonesAmount = currency.amount - if C("showFlightstones") then quest.hide = false end - elseif currencyId == 2706 then -- Whelplings Dreaming Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WHELPLINGS_DREAMING_CREST - quest.reward.WhelplingsDreamingCrestAmount = currency.amount - if C("showWhelplingsDreamingCrest") then quest.hide = false end - elseif currencyId == 2707 then -- Drakes Dreaming Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DRAKES_DREAMING_CREST - quest.reward.DrakesDreamingCrestAmount = currency.amount - if C("showDrakesDreamingCrest") then quest.hide = false end - elseif currencyId == 2708 then -- Wyrms Dreaming Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WYRMS_DREAMING_CREST - quest.reward.WyrmsDreamingCrestAmount = currency.amount - if C("showWyrmsDreamingCrest") then quest.hide = false end - elseif currencyId == 2709 then -- Aspects Dreaming Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ASPECTS_DREAMING_CREST - quest.reward.AspectsDreamingCrestAmount = currency.amount - if C("showAspectsDreamingCrest") then quest.hide = false end - elseif currencyId == 2806 then -- Whelplings Awakened Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WHELPLINGS_Awakened_CREST - quest.reward.WhelplingsAwakenedCrestAmount = currency.amount - if C("showWhelplingsAwakenedCrest") then quest.hide = false end - elseif currencyId == 2807 then -- Drakes Awakened Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DRAKES_Awakened_CREST - quest.reward.DrakesAwakenedCrestAmount = currency.amount - if C("showDrakesAwakenedCrest") then quest.hide = false end - elseif currencyId == 2809 then -- Wyrms Awakened Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WYRMS_Awakened_CREST - quest.reward.WyrmsAwakenedCrestAmount = currency.amount - if C("showWyrmsAwakenedCrest") then quest.hide = false end - elseif currencyId == 2812 then -- Aspects Awakened Crest - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ASPECTS_Awakened_CREST - quest.reward.AspectsAwakenedCrestAmount = currency.amount - if C("showAspectsAwakenedCrest") then quest.hide = false end - elseif currencyId == 2657 then -- Mysterious Fragment - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.MYSTERIOUS_FRAGMENT - quest.reward.MysteriousFragmentAmount = currency.amount - if C("showMysteriousFragment") then quest.hide = false end - elseif currencyId == 2815 then -- Resonance Crystals - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.RESONANCE_CRYSTALS - quest.reward.ResonanceCrystalsAmount = currency.amount - if C("showResonanceCrystals") then quest.hide = false end - elseif currencyId == 2902 then -- The Assembly of the Deeps - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.THE_ASSEMBLY_OF_THE_DEEPS - quest.reward.TheAssemblyoftheDeepsAmount = currency.amount - if C("showTheAssemblyoftheDeeps") then quest.hide = false end - elseif currencyId == 2899 then -- Hallowfall Arathi - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.HALLOWFALL_ARATHI - quest.reward.HallowfallArathiAmount = currency.amount - if C("showHallowfallArathi") then quest.hide = false end - elseif currencyId == 3008 then -- Valorstones - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.VALORSTONES - quest.reward.ValorstonesAmount = currency.amount - if C("showValorstones") then quest.hide = false end - elseif currencyId == 3056 then -- Kej - rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.KEJ - quest.reward.KejAmount = currency.amount - if C("showKej") then quest.hide = false end - else - if WQB_DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end - end - quest.reward.currencies[#quest.reward.currencies + 1] = currency + local rewardCurrencies = C_QuestInfoSystem.GetQuestRewardCurrencies(quest.questId) + if rewardCurrencies then + quest.reward.currencies = {} + for i, currencyInfo in ipairs(rewardCurrencies) do + local name = currencyInfo.name + local texture = currencyInfo.texture + local numItems = currencyInfo.totalRewardAmount + local currencyId = currencyInfo.currencyID + --print(string.format("[BWQ] currencyInfo: %d - %s - %d - %d - %d", i, name, texture, numItems, currencyId)) -- Debugging + if name then + hasReward = true + local currency = {} + if CONSTANTS.CURRENCIES_AFFECTED_BY_WARMODE[currencyId] then + currency.amount = BWQ:ValueWithWarModeBonus(quest.questId, numItems) + else + currency.amount = numItems + end + currency.name = string.format("%d %s", currency.amount, name) + currency.texture = texture + + --print(string.format("[BWQ] Quest %s - %s - %s - %s - %s - %s - %s", quest.questId, quest.title, name, currencyId, currency.name, currency.texture, currency.amount)) -- for debugging + + if currencyId == 1553 then -- azerite + currency.name = string.format("|cffe5cc80[%d %s]|r", currency.amount, name) + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ARTIFACTPOWER + quest.reward.azeriteAmount = currency.amount -- todo: improve broker text values? + if C("showArtifactPower") then quest.hide = false end + elseif CONSTANTS.THEWARWITHIN_REPUTATION_CURRENCY_IDS[currencyId] then + currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT + if C("showTWWReputation") then quest.hide = false end + elseif CONSTANTS.DRAGONFLIGHT_REPUTATION_CURRENCY_IDS[currencyId] then + currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT + if C("showDFReputation") then quest.hide = false end + elseif CONSTANTS.SHADOWLANDS_REPUTATION_CURRENCY_IDS[currencyId] then + currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT + if C("showSLReputation") then quest.hide = false end + elseif CONSTANTS.BFA_REPUTATION_CURRENCY_IDS[currencyId] then + currency.name = string.format("%s: %d %s", name, currency.amount, REPUTATION) + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.IRRELEVANT + if C("showBFAReputation") then quest.hide = false end + elseif currencyId == 1560 then -- war resources + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WAR_RESOURCES + quest.reward.warResourceAmount = currency.amount + if C("showWarResources") then quest.hide = false end + elseif currencyId == 1716 or currencyId == 1717 then -- service medals + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.SERVICE_MEDAL + quest.reward.serviceMedalAmount = currency.amount + if C("showBFAServiceMedals") then quest.hide = false end + elseif currencyId == 1220 then -- order hall resources + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.RESOURCES + quest.reward.resourceAmount = currency.amount + if C("showResources") then quest.hide = false end + elseif currencyId == 1342 then -- legionfall supplies + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.LEGIONFALL_SUPPLIES + quest.reward.legionfallSuppliesAmount = currency.amount + if C("showLegionfallSupplies") then quest.hide = false end + elseif currencyId == 1226 then -- nethershard + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.NETHERSHARD + if C("showNethershards") then quest.hide = false end + elseif currencyId == 1508 then -- argunite + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ARGUNITE + if C("showArgunite") then quest.hide = false end + elseif currencyId == 1533 then + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WAKENING_ESSENCE + quest.reward.wakeningEssencesAmount = currency.amount + if C("showWakeningEssences") then quest.hide = false end + elseif currencyId == 1721 then -- prismatic manapearl + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.PRISMATIC_MANAPEARL + quest.reward.prismaticManapearlAmount = currency.amount + if C("showPrismaticManapearl") then quest.hide = false end + elseif currencyId == 1979 then -- cyphers of the first ones (Zereth Mortis - 9.2) + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.CYPHERS_OF_THE_FIRST_ONES + quest.reward.cyphersOfTheFirstOnesAmount = currency.amount + if C("showCyphersOfTheFirstOnes") then quest.hide = false end + elseif currencyId == 1885 then -- grateful offering + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.GRATEFUL_OFFERING + quest.reward.gratefulOfferingAmount = currency.amount + if C("showGratefulOffering") then quest.hide = false end + elseif currencyId == 2123 then -- bloody tokens + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.BLOODY_TOKENS + quest.reward.bloodyTokensAmount = currency.amount + if C("showBloodyTokens") then quest.hide = false end + elseif currencyId == 2003 then -- dragon isles supplies + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DRAGON_ISLES_SUPPLIES + quest.reward.dragonIslesSuppliesAmount = currency.amount + if C("showDragonIslesSupplies") then quest.hide = false end + elseif currencyId == 2118 then -- elemental overflow + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ELEMENTAL_OVERFLOW + quest.reward.elementalOverflowAmount = currency.amount + if C("showElementalOverflow") then quest.hide = false end + elseif currencyId == 2245 then -- flightstones + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.FLIGHTSTONES + quest.reward.flightstonesAmount = currency.amount + if C("showFlightstones") then quest.hide = false end + elseif currencyId == 2706 then -- Whelplings Dreaming Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WHELPLINGS_DREAMING_CREST + quest.reward.WhelplingsDreamingCrestAmount = currency.amount + if C("showWhelplingsDreamingCrest") then quest.hide = false end + elseif currencyId == 2707 then -- Drakes Dreaming Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DRAKES_DREAMING_CREST + quest.reward.DrakesDreamingCrestAmount = currency.amount + if C("showDrakesDreamingCrest") then quest.hide = false end + elseif currencyId == 2708 then -- Wyrms Dreaming Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WYRMS_DREAMING_CREST + quest.reward.WyrmsDreamingCrestAmount = currency.amount + if C("showWyrmsDreamingCrest") then quest.hide = false end + elseif currencyId == 2709 then -- Aspects Dreaming Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ASPECTS_DREAMING_CREST + quest.reward.AspectsDreamingCrestAmount = currency.amount + if C("showAspectsDreamingCrest") then quest.hide = false end + elseif currencyId == 2806 then -- Whelplings Awakened Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WHELPLINGS_Awakened_CREST + quest.reward.WhelplingsAwakenedCrestAmount = currency.amount + if C("showWhelplingsAwakenedCrest") then quest.hide = false end + elseif currencyId == 2807 then -- Drakes Awakened Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.DRAKES_Awakened_CREST + quest.reward.DrakesAwakenedCrestAmount = currency.amount + if C("showDrakesAwakenedCrest") then quest.hide = false end + elseif currencyId == 2809 then -- Wyrms Awakened Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.WYRMS_Awakened_CREST + quest.reward.WyrmsAwakenedCrestAmount = currency.amount + if C("showWyrmsAwakenedCrest") then quest.hide = false end + elseif currencyId == 2812 then -- Aspects Awakened Crest + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.ASPECTS_Awakened_CREST + quest.reward.AspectsAwakenedCrestAmount = currency.amount + if C("showAspectsAwakenedCrest") then quest.hide = false end + elseif currencyId == 2657 then -- Mysterious Fragment + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.MYSTERIOUS_FRAGMENT + quest.reward.MysteriousFragmentAmount = currency.amount + if C("showMysteriousFragment") then quest.hide = false end + elseif currencyId == 2815 then -- Resonance Crystals + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.RESONANCE_CRYSTALS + quest.reward.ResonanceCrystalsAmount = currency.amount + if C("showResonanceCrystals") then quest.hide = false end + elseif currencyId == 2902 then -- The Assembly of the Deeps + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.THE_ASSEMBLY_OF_THE_DEEPS + quest.reward.TheAssemblyoftheDeepsAmount = currency.amount + if C("showTheAssemblyoftheDeeps") then quest.hide = false end + elseif currencyId == 2899 then -- Hallowfall Arathi + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.HALLOWFALL_ARATHI + quest.reward.HallowfallArathiAmount = currency.amount + if C("showHallowfallArathi") then quest.hide = false end + elseif currencyId == 3008 then -- Valorstones + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.VALORSTONES + quest.reward.ValorstonesAmount = currency.amount + if C("showValorstones") then quest.hide = false end + elseif currencyId == 3056 then -- Kej + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.KEJ + quest.reward.KejAmount = currency.amount + if C("showKej") then quest.hide = false end + else + if WQB_DEBUG then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end + end + quest.reward.currencies[#quest.reward.currencies + 1] = currency - if currencyId == 1553 then - quest.sort = quest.sort > CONSTANTS.SORT_ORDER.ARTIFACTPOWER and quest.sort or CONSTANTS.SORT_ORDER.ARTIFACTPOWER - else - quest.sort = quest.sort > CONSTANTS.SORT_ORDER.RESOURCES and quest.sort or CONSTANTS.SORT_ORDER.RESOURCES + if currencyId == 1553 then + quest.sort = quest.sort > CONSTANTS.SORT_ORDER.ARTIFACTPOWER and quest.sort or CONSTANTS.SORT_ORDER.ARTIFACTPOWER + else + quest.sort = quest.sort > CONSTANTS.SORT_ORDER.RESOURCES and quest.sort or CONSTANTS.SORT_ORDER.RESOURCES + end end end end @@ -1767,8 +1747,6 @@ function BWQ:UpdateBlock() return end - - local titleMaxWidth, bountyMaxWidth, factionMaxWidth, rewardMaxWidth, timeLeftMaxWidth = 0, 0, 0, 0, 0 for mapId in next, MAP_ZONES[expansion] do local buttonIndex = 1 @@ -1976,13 +1954,13 @@ function BWQ:UpdateBlock() if button.quest.reward.currencies then for _, currency in next, button.quest.reward.currencies do local currencyText = string.format("|T%1$s:14:14|t %s", currency.texture, currency.name) - rewardText = string.format( "%s%s%s", rewardText, rewardText ~= "" and " " or "", -- insert some space between rewards currencyText ) + end end @@ -2052,8 +2030,8 @@ function BWQ:UpdateBlock() end end -- maps loop - titleMaxWidth = 125 - rewardMaxWidth = rewardMaxWidth < 100 and 100 or rewardMaxWidth > 250 and 250 or rewardMaxWidth + titleMaxWidth = 300 + rewardMaxWidth = rewardMaxWidth < 225 and 225 or rewardMaxWidth > 375 and 375 or rewardMaxWidth factionMaxWidth = C("hideFactionColumn") and 0 or factionMaxWidth < 100 and 100 or factionMaxWidth timeLeftMaxWidth = 65 totalWidth = titleMaxWidth + bountyMaxWidth + factionMaxWidth + rewardMaxWidth + timeLeftMaxWidth + 80 From 8ec20057f44386884f7334aba00441688c296b8c Mon Sep 17 00:00:00 2001 From: Amadeus Date: Sun, 1 Sep 2024 00:13:44 -0500 Subject: [PATCH 50/51] Shortened "Reputation" to "Rep." in quest reward text to avoid long strings --- Broker_WorldQuests.toc | 2 +- WorldQuests.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 3f58650..f12b29d 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110002 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.2.8 +## Version: 11.0.2.9 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## Notes: Broker plugin to display world quests as a list. diff --git a/WorldQuests.lua b/WorldQuests.lua index 2b72a75..4e839b8 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -1960,7 +1960,8 @@ function BWQ:UpdateBlock() rewardText ~= "" and " " or "", -- insert some space between rewards currencyText ) - + -- Replace "Reputation" with "Rep." to shorten strings + rewardText = rewardText:gsub("Reputation", "Rep.") end end From 89377826dd6fd94e8cf3d1b5cab1dfbafc4f2e76 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Sun, 1 Sep 2024 00:14:05 -0500 Subject: [PATCH 51/51] Linting --- WorldQuests.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WorldQuests.lua b/WorldQuests.lua index 4e839b8..9fa253a 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -17,7 +17,7 @@ local REPUTATION local _, addon = ... local CONSTANTS = addon.CONSTANTS -local WQB_DEBUG = true +local WQB_DEBUG = false local isHorde = UnitFactionGroup("player") == "Horde"