mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-14 16:27:21 +00:00
Fix unused legality check (3/4/5th gen only)
Thanks Sabresite!
This commit is contained in:
parent
69e9192484
commit
284ea120b1
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ namespace PKHeX
|
|||
// If the PID is nonshiny->shiny, the top bit is flipped.
|
||||
|
||||
// Check to see if the PID and EC are properly configured.
|
||||
bool xorPID = ((pkm.TID ^ pkm.SID ^ (int)(pkm.PID & 0xFFFF) ^ (int)(pkm.PID >> 16)) & 0x7) == 8;
|
||||
bool xorPID = ((pkm.TID ^ pkm.SID ^ (int)(pkm.PID & 0xFFFF) ^ (int)(pkm.PID >> 16)) & ~0x7) == 8;
|
||||
bool valid = xorPID
|
||||
? pkm.EncryptionConstant == (pkm.PID ^ 0x8000000)
|
||||
: pkm.EncryptionConstant == pkm.PID;
|
||||
|
|
Loading…
Reference in a new issue