Skip to content

Commit

Permalink
Expand IdentifierContains feature
Browse files Browse the repository at this point in the history
now behaves the same as a property filtering
  • Loading branch information
kwsch committed Oct 20, 2017
1 parent ae0bf5c commit 7c36190
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PKHeX.Core/PKM/PKX.cs
Expand Up @@ -746,7 +746,7 @@ public static byte[] DecryptArray3(byte[] ekm)

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);
}

Expand Down
7 changes: 6 additions & 1 deletion PKHeX.WinForms/Subforms/SAV_Database.cs
Expand Up @@ -496,7 +496,12 @@ private static bool IsPKMFiltered(PKM pkm, IEnumerable<BatchEditor.StringInstruc
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; }
Expand Down

0 comments on commit 7c36190

Please sign in to comment.