mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Misc optimization
This commit is contained in:
@@ -152,10 +152,10 @@ namespace ArchiSteamFarm {
|
||||
Dictionary<(uint AppID, Steam.Asset.EType Type), List<uint>> finalSets = GetInventorySets(inventory);
|
||||
|
||||
// Once we have both states, we can check overall fairness
|
||||
foreach (((uint AppID, Steam.Asset.EType Type) set, List<uint> afterAmounts) in finalSets) {
|
||||
if (!initialSets.TryGetValue(set, out List<uint> beforeAmounts)) {
|
||||
// If we have no info about this set, then it has to be a donation
|
||||
continue;
|
||||
foreach (((uint AppID, Steam.Asset.EType Type) set, List<uint> beforeAmounts) in initialSets) {
|
||||
if (!finalSets.TryGetValue(set, out List<uint> afterAmounts)) {
|
||||
// If we have no info about this set, then it has to be a bad one
|
||||
return false;
|
||||
}
|
||||
|
||||
// If amount of unique items in the set decreases, this is always a bad trade (e.g. 1 1 -> 0 2)
|
||||
|
||||
Reference in New Issue
Block a user