Expand IdentifierContains feature

now behaves the same as a property filtering
This commit is contained in:
Kurt 2017-10-20 08:47:31 -07:00
parent ae0bf5c75c
commit 7c36190661
2 changed files with 7 additions and 2 deletions

View file

@ -746,7 +746,7 @@ namespace PKHeX.Core
byte[] xorkey = BitConverter.GetBytes(seed);
for (int i = 32; i < 80; i++)
ekm[i] ^= xorkey[i & 4];
ekm[i] ^= xorkey[i & 3];
return ShuffleArray3(ekm, PID%24);
}

View file

@ -496,7 +496,12 @@ namespace PKHeX.WinForms
foreach (var cmd in filters)
{
if (cmd.PropertyName == nameof(PKM.Identifier) + "Contains")
return pkm.Identifier.Contains(cmd.PropertyValue);
{
bool result = pkm.Identifier.Contains(cmd.PropertyValue);
if (result != cmd.Evaluator)
return false;
continue;
}
if (!pkm.GetType().HasPropertyAll(cmd.PropertyName))
return false;
try { if (pkm.GetType().IsValueEqual(pkm, cmd.PropertyName, cmd.PropertyValue) == cmd.Evaluator) continue; }