Skip to content

Commit

Permalink
2.6.6
Browse files Browse the repository at this point in the history
Fixed issue causing session data to not be correct
  • Loading branch information
Noshei committed Oct 24, 2024
1 parent 87b0d53 commit 2ef5d08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions GatheringTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ function GT:ItemDataConstructor(itemID, senderIndex)
itemData.total = 0
itemData.startTotal = 0
itemData.startAmount = {}
itemData.startAmount[senderIndex] = 0
itemData.startAmount[senderIndex] = -1
itemData.sessionCounts = {}
itemData.sessionCounts[senderIndex] = 0
itemData.startTime = time()
Expand All @@ -1067,16 +1067,17 @@ end
---@param senderIndex integer
---@param itemTable table
function GT:UpdateInventoryData(senderIndex, itemTable)
GT.Debug("UpdateInventoryData", 1, senderIndex, itemTable)
GT.Debug("UpdateInventoryData", 1, senderIndex, GT.sender[senderIndex].name)
for itemID, value in pairs(itemTable) do
GT.Debug("UpdateInventoryData", 3, GT.sender[senderIndex].name, itemID, value)
local value = tonumber(value)
if GT:TableFind(GT.IDs, itemID) then
GT.InventoryData[itemID] = GT.InventoryData[itemID] or GT:ItemDataConstructor(itemID, senderIndex)
GT.InventoryData[itemID].counts[senderIndex] = value
GT.sender[senderIndex].inventoryData[itemID] = value

if not GT.InventoryData[itemID].startAmount[senderIndex] or
GT.InventoryData[itemID].startAmount[senderIndex] == 0 then
GT.InventoryData[itemID].startAmount[senderIndex] == -1 then
GT.InventoryData[itemID].startAmount[senderIndex] = value
end

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.5
## Version: 2.6.6
## OptionalDeps: TradeSkillMaster, RECrystallize, Auctionator
## SavedVariables: GatheringTrackerDB
## AddonCompartmentFunc: GatheringTracker_OnAddonCompartmentClick
Expand Down

0 comments on commit 2ef5d08

Please sign in to comment.