Skip to content

Commit

Permalink
Added support for Bronze Celebration Token currency
Browse files Browse the repository at this point in the history
  • Loading branch information
Amadeus- committed Oct 23, 2024
1 parent b2e384b commit e5f4338
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Broker_WorldQuests.toc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
12 changes: 8 additions & 4 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down Expand Up @@ -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" },
}
},
Expand All @@ -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 = {
Expand Down Expand Up @@ -387,7 +389,8 @@ BWQ.defaultConfig = {
brokerShowTheGeneral = true,
brokerShowTheVizier = true,
brokerShowBloodyTokens = true,
brokerShowPolishedPetCharms = false,
brokerShowPolishedPetCharms = true,
brokerShowBronzeCelebrationToken = true,
sortByTimeRemaining = false,
showNEWTextWhenAppropriate = true,
-- reward type
Expand All @@ -411,6 +414,7 @@ BWQ.defaultConfig = {
showTheGeneral = true,
showTheVizier = true,
showValorstones = true,
showBronzeCelebrationToken = true,
showKej = true,
showBloodyTokens = true,
showArtifactPower = true,
Expand Down
1 change: 1 addition & 0 deletions Constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ CONSTANTS.REWARD_TYPES = {
THE_GENERAL = 39,
THE_VIZIER = 40,
XP = 41,
BRONZE_CELEBRATION_TOKEN = 42,
}

CONSTANTS.QUEST_TYPES = {
Expand Down
11 changes: 9 additions & 2 deletions WorldQuests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e5f4338

Please sign in to comment.