Disallow matching if notradeback loc wiped

Closes #3710
This commit is contained in:
Kurt
2023-01-21 22:01:50 -08:00
parent 7b910504ce
commit 5de825de51
2 changed files with 7 additions and 2 deletions

View File

@@ -71,8 +71,13 @@ protected override bool IsMatchLocation(PKM pk)
return true;
if (Location == 0)
return true;
if (pk is ICaughtData2 {CaughtData: not 0})
return Location == pk.Met_Location;
if (pk is ICaughtData2 c2)
{
if (c2.CaughtData is not 0)
return Location == pk.Met_Location;
if (pk.Species == (int)Core.Species.Celebi)
return false; // Cannot reset the Met data
}
return true;
}