Skip to content

Commit

Permalink
fix(server/inventory): load inventories without dbIds
Browse files Browse the repository at this point in the history
Temporary stashes/datastores don't have dbIds.
Resolves #1437.
  • Loading branch information
thelindat committed Aug 8, 2023
1 parent 97bc7bb commit 8e27832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/inventory/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ function Inventory.Create(id, label, invType, slots, weight, maxWeight, owner, i
end

if not items then
self.items, self.weight = Inventory.Load(self.dbId, invType, owner)
self.items, self.weight = Inventory.Load(self.dbId or self.id, invType, owner)
elseif weight == 0 and next(items) then
self.weight = Inventory.CalculateWeight(items)
end
Expand Down

0 comments on commit 8e27832

Please sign in to comment.