mirror of
https://github.com/Pathoschild/SMAPI.git
synced 2026-10-12 02:08:51 +00:00
remove Distinct() in inventory tracking
These cover very rare edge cases with invalid inventory data, so it's not really worth the added performance hit of handling them. The next commits will avoid the error if duplicates do occur.
This commit is contained in:
@@ -48,7 +48,6 @@ internal class ChestTracker : IDisposable
|
||||
|
||||
this.StackSizes = this.Chest.Items
|
||||
.Where(n => n != null)
|
||||
.Distinct()
|
||||
.ToDictionary(n => n, n => n.Stack);
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,6 @@ internal class PlayerTracker : IDisposable
|
||||
{
|
||||
return this.Player.Items
|
||||
.Where(n => n != null)
|
||||
.Distinct()
|
||||
.ToDictionary(n => n, n => n.Stack);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user