Skip to content

Commit

Permalink
Support for retail v10.2.6 and fix localization bug related to top co…
Browse files Browse the repository at this point in the history
…ntributors
  • Loading branch information
clocklear committed Mar 20, 2024
1 parent 9fa9cfc commit a794c45
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@
"CreateFont",
"Minimap",
"sort",
"AddonCompartmentFrame"
"AddonCompartmentFrame",
"pairs",
"ipairs",
"table",
"select",
"tonumber",
"math",
"string"
]
}
4 changes: 2 additions & 2 deletions BagAppraiser.toc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Interface-Retail: 100205
## Interface-Retail: 100206
## Interface-Classic: 11500
## Interface-BCC: 20504
## Interface-Wrath: 30403
## Title: BagAppraiser
## Notes: Provides simple valuation of bag contents
## Author: clocklear
## Version: v10.2.5-1
## Version: v10.2.6-1
## OptionalDependencies: TradeSkillMaster, OribosExchange, Auctionator, AuctionDB
## SavedVariables: BagAppraiserDB
## X-Embeds: Ace3, LibDataBroker-1.1, CallbackHandler-1.0
Expand Down
4 changes: 2 additions & 2 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ function Addon.HandleWhatsNew()
-- Advertised localizations?
if not Addon.GetFromDb("newFeatures", "localization") then
Addon:Print(L["feature_localization"]);
Addon.db.profile.localization = true;
Addon.db.profile.newFeatures.localization = true;
end

-- Advertised additional price sources?
if not Addon.GetFromDb("newFeatures", "expandedPricingSources") then
Addon:Print(L["feature_pricing_sources"]);
Addon.db.profile.expandedPricingSources = true;
Addon.db.profile.newFeatures.expandedPricingSources = true;
end
end

Expand Down
12 changes: 10 additions & 2 deletions databroker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ function Addon.DisplayToolTip(tooltip)
tooltip:AddDoubleLine(ADDON_NAME, ldbLabelText, 1, 1, 1)
tooltip:AddLine(" ");
tooltip:AddDoubleLine(L["bags"] .. ":", bagTotal, 1, 1, 1)
private.addTopContributorSection(tooltip, L["bag"])
private.addTopContributorSection(tooltip, "Bag")
tooltip:AddDoubleLine(L["bank"] .. ":", bankTotal, 1, 1, 1)
private.addTopContributorSection(tooltip, L["bank"])
private.addTopContributorSection(tooltip, "Bank")
if Addon.GetFromDb("guildBank", "enabled") and IsInGuild() then
tooltip:AddDoubleLine(L["guild_bank"] .. ":", gbankTotal, 1, 1, 1)
private.addTopContributorSection(tooltip, "GuildBank")
Expand All @@ -54,7 +54,14 @@ function Addon.DisplayToolTip(tooltip)
end

function private.addTopContributorSection(tooltip, source)
-- Addon.Debug.Log("attempting to add top contributor section for " .. source .. " to tooltip")
-- bSettingEnabled = Addon.GetFromDb("topContributors", "enabled")
-- Addon.Debug.Log("topContributors setting is " .. tostring(bSettingEnabled))
-- Addon.Debug.Log("topContributors table is " .. tostring(topContributors))
-- Addon.Debug.Log("topContributors table size is " .. tostring(Addon:tableSize(topContributors)))
-- Addon.Debug.Log("topContributors table source size is " .. tostring(Addon:tableSize(topContributors[source])))
if Addon.GetFromDb("topContributors", "enabled") and topContributors and topContributors[source] and Addon:tableSize(topContributors[source]) > 0 then
-- Addon.Debug.Log("topContributors section is enabled and has data")
local precision = Addon.GetFromDb("moneyPrecision", "tooltip")
tooltip:AddLine(format(L["top_contributors"], Addon.GetFromDb("topContributors", "limit")))
for k, v in ipairs(topContributors[source]) do
Expand All @@ -63,6 +70,7 @@ function private.addTopContributorSection(tooltip, source)
end
tooltip:AddLine(" ");
end
-- Addon.Debug.Log("end top contributor section for " .. source)
end

function Addon:InitializeDataBroker()
Expand Down

0 comments on commit a794c45

Please sign in to comment.