Remove duplicate home tracker flagging

This commit is contained in:
Kurt 2022-04-02 17:58:17 -07:00
parent 77473476da
commit 647b5a3f87

View file

@ -57,9 +57,6 @@ namespace PKHeX.Core
if (Trainer.Generation >= 6)
CheckECReuse();
if (Trainer.Generation >= 8)
CheckHOMETrackerReuse();
CheckDuplicateOwnedGifts();
return Parse.All(z => z.Valid);
}
@ -166,30 +163,6 @@ namespace PKHeX.Core
}
}
private void CheckHOMETrackerReuse()
{
var dict = new Dictionary<ulong, SlotCache>();
for (int i = 0; i < AllData.Count; i++)
{
if (CloneFlags[i])
continue; // already flagged
var cp = AllData[i];
Debug.Assert(cp.Entity.Format >= 8);
Debug.Assert(cp.Entity is IHomeTrack);
var id = ((IHomeTrack)cp.Entity).Tracker;
if (id == 0)
continue;
if (!dict.TryGetValue(id, out var ps) || ps is null)
{
dict.Add(id, cp);
continue;
}
AddLine(ps, cp, "HOME Tracker sharing detected.", Misc);
}
}
private void CheckPIDReuse()
{
var dict = new Dictionary<uint, CombinedReference>();