diff --git a/PKHeX.Core/Legality/BulkAnalysis.cs b/PKHeX.Core/Legality/BulkAnalysis.cs index 95bf808bc..a2dd6c0b4 100644 --- a/PKHeX.Core/Legality/BulkAnalysis.cs +++ b/PKHeX.Core/Legality/BulkAnalysis.cs @@ -14,6 +14,7 @@ namespace PKHeX.Core public readonly IReadOnlyList AllAnalysis; public readonly ITrainerInfo Trainer; public readonly List Parse = new List(); + public readonly Dictionary Trackers = new Dictionary(); public readonly bool Valid; private readonly bool[] CloneFlags; @@ -71,6 +72,17 @@ namespace PKHeX.Core var ca = AllAnalysis[i]; Debug.Assert(cp.Format == Trainer.Generation); + // Check the upload tracker to see if there's any duplication. + if (cp is PK8 pk8 && pk8.Tracker != 0) + { + var tracker = pk8.Tracker; + if (Trackers.TryGetValue(tracker, out var clone)) + AddLine(clone, cp, "Clone detected (Duplicate Tracker).", Encounter); + else + Trackers.Add(tracker, cp); + } + + // Hash Details like EC/IV to see if there's any duplication. var identity = SearchUtil.HashByDetails(cp); if (!dict.TryGetValue(identity, out var pa)) { @@ -79,7 +91,7 @@ namespace PKHeX.Core } CloneFlags[i] = true; - AddLine(pa.pkm, cp, "Clone detected.", Encounter); + AddLine(pa.pkm, cp, "Clone detected (Details).", Encounter); } }