Skip to content

Commit

Permalink
2.6.1
Browse files Browse the repository at this point in the history
Added options for Reagent and Warband banks (thanks b-morgan)
  • Loading branch information
Noshei committed Oct 20, 2024
1 parent 68f7668 commit f107826
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
26 changes: 26 additions & 0 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ GT.defaults = {
groupType = 0,
stacksOnIcon = false,
includeBank = false,
includeReagent = false,
includeWarband = false,
tsmPrice = 1,
ignoreAmount = 0,
perItemPrice = false,
Expand Down Expand Up @@ -530,6 +532,30 @@ local generalOptions = {
end,
order = 204
},
includeReagent = {
type = "toggle",
name = "Include Reagent Bank",
desc = "If selected displayed values will include items in your reagent bank.",
width = 1.70,
get = function() return GT.db.profile.General.includeReagent end,
set = function(_, key)
GT.db.profile.General.includeReagent = key
GT:InventoryUpdate("Include Reagent", true)
end,
order = 205
},
includeWarband = {
type = "toggle",
name = "Include Warband Bank",
desc = "If selected displayed values will include items in your Warband bank.",
width = 1.70,
get = function() return GT.db.profile.General.includeWarband end,
set = function(_, key)
GT.db.profile.General.includeWarband = key
GT:InventoryUpdate("Include Warband", true)
end,
order = 206
},
header2 = {
type = "header",
name = "Session Display Options",
Expand Down
16 changes: 14 additions & 2 deletions GatheringTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,13 @@ function GT:ProcessSoloData(event)
itemCount = itemCount + C_Container.GetContainerNumFreeSlots(bagIndex)
end
else
itemCount = GetItemCount(id, GT.db.profile.General.includeBank, false)
itemCount = C_Item.GetItemCount(
id,
GT.db.profile.General.includeBank,
false,
GT.db.profile.General.includeReagent,
GT.db.profile.General.includeWarband
)
end

if itemCount > 0 or GT.db.profile.General.allFiltered then
Expand Down Expand Up @@ -912,7 +918,13 @@ function GT:CreateDataMessage(event, wait)
itemCount = itemCount + C_Container.GetContainerNumFreeSlots(bagIndex)
end
else
itemCount = GetItemCount(id, GT.db.profile.General.includeBank, false)
itemCount = C_Item.GetItemCount(
id,
GT.db.profile.General.includeBank,
false,
GT.db.profile.General.includeReagent,
GT.db.profile.General.includeWarband
)
end

if itemCount > 0 then
Expand Down
2 changes: 1 addition & 1 deletion GatheringTracker.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: Gathering Tracker
## Notes: Addon for tracking gathered items, supports solo players and groups
## Author: Noshei
## Version: 2.6.0
## Version: 2.6.1
## OptionalDeps: TradeSkillMaster, RECrystallize, Auctionator
## SavedVariables: GatheringTrackerDB
## AddonCompartmentFunc: GatheringTracker_OnAddonCompartmentClick
Expand Down

0 comments on commit f107826

Please sign in to comment.