mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 04:23:12 +00:00
Add TSV=0 checks for WC8 home gifts
Don't match if TSV == 0 Don't assign at TSV of 0, randomize TID7 if it happens to be so. Closes #3007
This commit is contained in:
parent
cc3a807fa9
commit
eb6c570695
1 changed files with 9 additions and 0 deletions
|
@ -389,7 +389,13 @@ namespace PKHeX.Core
|
|||
pk.SID = sav.SID;
|
||||
|
||||
if (IsHOMEGift)
|
||||
{
|
||||
pk.TrainerSID7 = 0;
|
||||
while (pk.TSV == 0)
|
||||
{
|
||||
pk.TrainerID7 = Util.Rand.Next(16, 999_999);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Official code explicitly corrects for Meowstic
|
||||
|
@ -535,6 +541,9 @@ namespace PKHeX.Core
|
|||
if (EncryptionConstant != pkm.EncryptionConstant)
|
||||
return false;
|
||||
|
||||
if (pkm.TSV == 0) // HOME doesn't assign TSV=0 to accounts.
|
||||
return false;
|
||||
|
||||
if (IsShiny)
|
||||
{
|
||||
if (!pkm.IsShiny)
|
||||
|
|
Loading…
Reference in a new issue