From e5f43384132d78a0fde363810e5ddb1b72750ff4 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Wed, 23 Oct 2024 01:47:20 -0500 Subject: [PATCH] Added support for Bronze Celebration Token currency --- Broker_WorldQuests.toc | 2 +- CHANGELOG.md | 3 +++ Config.lua | 12 ++++++++---- Constants.lua | 1 + WorldQuests.lua | 11 +++++++++-- 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Broker_WorldQuests.toc b/Broker_WorldQuests.toc index 801867d..a26650a 100644 --- a/Broker_WorldQuests.toc +++ b/Broker_WorldQuests.toc @@ -1,7 +1,7 @@ ## Interface: 110005 ## Author: myno (original author; up through 8.x), Amadeus (maintainer since 9.0) ## Title: Broker_WorldQuests -## Version: 11.0.5.1 +## Version: 11.0.5.2 ## SavedVariables: BWQcfg ## SavedVariablesPerCharacter: BWQcache, BWQcfgPerCharacter ## OptionalDeps: TomTom diff --git a/CHANGELOG.md b/CHANGELOG.md index a5b2372..9ecb2b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.0.5.2 +* Added support for Bronze Celebration Token currency + ### 11.0.5.1 * Fixed error caused by recent World of Warcraft patch. diff --git a/Config.lua b/Config.lua index e5a15a8..5c49210 100644 --- a/Config.lua +++ b/Config.lua @@ -27,6 +27,7 @@ function BWQ:SetupConfigMenu() { text = "Only show world quests with |cff0070ddrare|r or above quality", check = "onlyShowRareOrAbove" }, { text = "Don't filter quests for active bounties", check = "alwaysShowBountyQuests" }, { text = "Show total counts in broker text", check = "showTotalsInBrokerText", submenu = { + { text = ("|T%1$s:16:16|t Bronze Celebration Token"):format("Interface\\Icons\\inv_10_dungeonjewelry_dragon_necklace_1_bronze"), check = "brokerShowBronzeCelebrationToken" }, { text = ("|T%1$s:16:16|t Polished Pet Charms"):format("Interface\\Icons\\inv_currency_petbattle"), check = "brokerShowPolishedPetCharms" }, { text = ("|T%1$s:16:16|t Artifact Power"):format("Interface\\Icons\\inv_smallazeriteshard"), check = "brokerShowAP" }, { text = ("|T%1$s:16:16|t Service Medals"):format(self.isHorde and "Interface\\Icons\\ui_horde_honorboundmedal" or "Interface\\Icons\\ui_alliance_7legionmedal"), check = "brokerShowServiceMedals" }, @@ -79,6 +80,7 @@ function BWQ:SetupConfigMenu() { 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%1$s:16:16|t Mark Of Honor"):format("Interface\\Icons\\ability_pvp_gladiatormedallion"), check = "showMarkOfHonor" }, + { text = ("|T%1$s:16:16|t Bronze Celebration Token"):format("Interface\\Icons\\inv_10_dungeonjewelry_dragon_necklace_1_bronze"), check = "showBronzeCelebrationToken" }, { text = "Other", check = "showOtherItems" }, } }, @@ -95,9 +97,9 @@ function BWQ:SetupConfigMenu() { text = ("|T%1$s:16:16|t Valorstones"):format("Interface\\Icons\\inv_valorstone_base"), check = "showValorstones" }, { text = ("|T%1$s:16:16|t Kej"):format("Interface\\Icons\\inv_10_tailoring_silkrare_color3"), check = "showKej" }, { text = ("|T%1$s:16:16|t Council of Dornogal"):format("Interface\\Icons\\ui_majorfactions_storm"), check = "showCouncilofDornogal" }, - { text = ("|T%1$s:16:16|t The Weaver"):format("Interface\\Icons\\ui_notoriety_theweaver"), check = "ShowTheWeaver" }, - { text = ("|T%1$s:16:16|t The General"):format("Interface\\Icons\\ui_notoriety_thegeneral"), check = "ShowTheGeneral" }, - { text = ("|T%1$s:16:16|t The Vizier"):format("Interface\\Icons\\ui_notoriety_thevizier"), check = "ShowTheVizier" }, + { text = ("|T%1$s:16:16|t The Weaver"):format("Interface\\Icons\\ui_notoriety_theweaver"), check = "showTheWeaver" }, + { text = ("|T%1$s:16:16|t The General"):format("Interface\\Icons\\ui_notoriety_thegeneral"), check = "showTheGeneral" }, + { text = ("|T%1$s:16:16|t The Vizier"):format("Interface\\Icons\\ui_notoriety_thevizier"), check = "showTheVizier" }, } }, { text = " Dragonflight", submenu = { @@ -387,7 +389,8 @@ BWQ.defaultConfig = { brokerShowTheGeneral = true, brokerShowTheVizier = true, brokerShowBloodyTokens = true, - brokerShowPolishedPetCharms = false, + brokerShowPolishedPetCharms = true, + brokerShowBronzeCelebrationToken = true, sortByTimeRemaining = false, showNEWTextWhenAppropriate = true, -- reward type @@ -411,6 +414,7 @@ BWQ.defaultConfig = { showTheGeneral = true, showTheVizier = true, showValorstones = true, + showBronzeCelebrationToken = true, showKej = true, showBloodyTokens = true, showArtifactPower = true, diff --git a/Constants.lua b/Constants.lua index 6a06ab1..496c248 100644 --- a/Constants.lua +++ b/Constants.lua @@ -75,6 +75,7 @@ CONSTANTS.REWARD_TYPES = { THE_GENERAL = 39, THE_VIZIER = 40, XP = 41, + BRONZE_CELEBRATION_TOKEN = 42, } CONSTANTS.QUEST_TYPES = { diff --git a/WorldQuests.lua b/WorldQuests.lua index 7efd3b0..6e647af 100644 --- a/WorldQuests.lua +++ b/WorldQuests.lua @@ -559,7 +559,11 @@ local RetrieveWorldQuests = function(mapId) elseif currencyId == 3004 then -- The Vizier rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.THE_VIZIER quest.reward.TheVizierAmount = currency.amount - if BWQ:C("showTheVizier") then quest.hide = false end + if BWQ:C("showTheVizier") then quest.hide = false end + elseif currencyId == 3100 then -- Bronze Celebration Token + rewardType[#rewardType+1] = CONSTANTS.REWARD_TYPES.BRONZE_CELEBRATION_TOKEN + quest.reward.BronzeCelebrationTokenAmount = currency.amount + if BWQ:C("showBronzeCelebrationToken") then quest.hide = false end else if BWQcfg.spewDebugInfo then print(string.format("[BWQ] Unhandled currency: ID %s", currencyId)) end end @@ -780,6 +784,8 @@ local RetrieveWorldQuests = function(mapId) BWQ.totalTheGeneral = BWQ.totalTheGeneral + quest.reward.TheGeneralAmount elseif rtype == CONSTANTS.REWARD_TYPES.THE_VIZIER then BWQ.totalTheVizier = BWQ.totalTheVizier + quest.reward.TheVizierAmount + elseif rtype == CONSTANTS.REWARD_TYPES.BRONZE_CELEBRATION_TOKEN then + BWQ.totalBronzeCelebrationToken = BWQ.totalBronzeCelebrationToken + quest.reward.BronzeCelebrationTokenAmount end end end @@ -944,7 +950,7 @@ function BWQ:UpdateQuestData() BWQ.totalDrakesAwakenedCrest, BWQ.totalWyrmsAwakenedCrest, BWQ.totalAspectsAwakenedCrest, BWQ.totalMysteriousFragment = 0, 0, 0, 0 BWQ.totalResonanceCrystals, BWQ.totalTheAssemblyOfTheDeeps, BWQ.totalHallowfallArathi, BWQ.totalValorstones, BWQ.totalKej = 0, 0, 0, 0, 0 BWQ.totalPolishedPetCharms, BWQ.totalCouncilofDornogal, BWQ.totalTheWeaver, BWQ.totalTheGeneral, BWQ.totalTheVizier = 0, 0, 0, 0, 0 - BWQ.totalXP = 0 + BWQ.totalXP, BWQ.totalBronzeCelebrationToken = 0, 0 for mapId in next, BWQ.MAP_ZONES[BWQ.expansion] do RetrieveWorldQuests(mapId) @@ -1502,6 +1508,7 @@ function BWQ:UpdateBlock() if BWQ:C("showTotalsInBrokerText") then local brokerString = "" + if BWQ:C("brokerShowBronzeCelebrationToken") and BWQ.totalBronzeCelebrationToken > 0 then brokerString = string.format("%s|TInterface\\Icons\\Inv_10_dungeonjewelry_dragon_necklace_1_bronze:16:16|t %d ", brokerString, BWQ.totalBronzeCelebrationToken) end if BWQ: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 BWQ:C("brokerShowAP") and BWQ.totalArtifactPower > 0 then brokerString = string.format("%s|TInterface\\Icons\\inv_smallazeriteshard:16:16|t %s ", brokerString, BWQ:AbbreviateNumber(BWQ.totalArtifactPower)) end if BWQ:C("brokerShowServiceMedals") and BWQ.totalServiceMedals > 0 then brokerString = string.format("%s|T%s:16:16|t %s ", brokerString, self.isHorde and "Interface\\Icons\\ui_horde_honorboundmedal" or "Interface\\Icons\\ui_alliance_7legionmedal", BWQ.totalServiceMedals) end