mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Update PKM.cs
This commit is contained in:
parent
e3b1a29ad6
commit
36031ad51f
1 changed files with 11 additions and 4 deletions
|
@ -257,16 +257,23 @@ public abstract class PKM : ISpeciesForm, ITrainerID, IGeneration, IShiny, ILang
|
|||
}
|
||||
}
|
||||
|
||||
private bool IsDisplay7 => Generation switch
|
||||
{
|
||||
>= 7 => true,
|
||||
-1 when IsEgg && this is PK9 => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
public int DisplayTID
|
||||
{
|
||||
get => Generation >= 7 ? TrainerID7 : TID;
|
||||
set { if (Generation >= 7) TrainerID7 = value; else TID = value; }
|
||||
get => IsDisplay7 ? TrainerID7 : TID;
|
||||
set { if (IsDisplay7) TrainerID7 = value; else TID = value; }
|
||||
}
|
||||
|
||||
public int DisplaySID
|
||||
{
|
||||
get => Generation >= 7 ? TrainerSID7 : SID;
|
||||
set { if (Generation >= 7) TrainerSID7 = value; else SID = value; }
|
||||
get => IsDisplay7 ? TrainerSID7 : SID;
|
||||
set { if (IsDisplay7) TrainerSID7 = value; else SID = value; }
|
||||
}
|
||||
|
||||
private void SetID7(int sid7, int tid7)
|
||||
|
|
Loading…
Reference in a new issue