mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 09:46:42 -05: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:
@@ -389,7 +389,13 @@ public override PKM ConvertToPKM(ITrainerInfo sav, EncounterCriteria criteria)
|
||||
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 @@ protected override bool IsMatchExact(PKM pkm, DexLevel evo)
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user