diff --git a/PKHeX.Core/PKM/PKM.cs b/PKHeX.Core/PKM/PKM.cs index a37a9efae..1dc0cae8f 100644 --- a/PKHeX.Core/PKM/PKM.cs +++ b/PKHeX.Core/PKM/PKM.cs @@ -279,6 +279,18 @@ private byte[] Write() public int TrainerID7 { get => (int)((uint)(TID | (SID << 16)) % 1000000); set => SetID7(TrainerSID7, value); } public int TrainerSID7 { get => (int)((uint)(TID | (SID << 16)) / 1000000); set => SetID7(value, TrainerID7); } + public int DisplayTID + { + get => GenNumber >= 7 ? TrainerID7 : TID; + set => _ = GenNumber >= 7 ? (TrainerID7 = value) : (TID = value); + } + + public int DisplaySID + { + get => GenNumber >= 7 ? TrainerSID7 : SID; + set => _ = GenNumber >= 7 ? (TrainerSID7 = value) : (SID = value); + } + private void SetID7(int sid7, int tid7) { var oid = (sid7 * 1_000_000) + (tid7 % 1_000_000); diff --git a/PKHeX.WinForms/Subforms/Misc/PKMPreview.cs b/PKHeX.WinForms/Subforms/Misc/PKMPreview.cs index 01dc9aa91..edfa9b115 100644 --- a/PKHeX.WinForms/Subforms/Misc/PKMPreview.cs +++ b/PKHeX.WinForms/Subforms/Misc/PKMPreview.cs @@ -79,8 +79,8 @@ public class PKMPreview public bool IsNicknamed => pkm.IsNicknamed; public bool IsShiny => pkm.IsShiny; - public int TID => pkm.GenNumber >= 7 ? pkm.TrainerID7 : pkm.TID; - public int SID => pkm.GenNumber >= 7 ? pkm.TrainerSID7 : pkm.SID; + public int TID => pkm.DisplayTID; + public int SID => pkm.DisplaySID; public int TSV => pkm.TSV; public int Move1_PP => pkm.Move1_PP; public int Move2_PP => pkm.Move2_PP;