Fixed filtered trait tracked item bug
Roland Solymosi [06-30-20 - 16:44]
Fixed filtered trait tracked item bug
diff --git a/MyCollection/Internals/Classes/Piece.lua b/MyCollection/Internals/Classes/Piece.lua
index b78ef26..3553cb6 100644
--- a/MyCollection/Internals/Classes/Piece.lua
+++ b/MyCollection/Internals/Classes/Piece.lua
@@ -50,7 +50,9 @@ function Piece:HasItem()
end
function Piece:AddReference(item)
- self.references[item:GetId()] = item
+ if self.traitType == nil or self.traitType == 0 or item.traitType == self.traitType then
+ self.references[item:GetId()] = item
+ end
if Logger ~= nil and item ~= nil then
local _, setName, _, _, _, _ = Dependencies.LibSets.IsSetByItemLink(item.link)