From cb930fcaab58372fe20cbf9d3d5633eaee125222 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 21 Apr 2018 09:18:48 -0700 Subject: [PATCH] Show g7 tid on mystery gifts originating from g7+ --- PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.cs index 7f806644f..f0ab11cae 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.cs @@ -489,9 +489,13 @@ namespace PKHeX.WinForms { try { + int TID7() => (int)((uint)(gift.TID | (gift.SID << 16)) % 1000000); + int SID7() => (int)((uint)(gift.TID | (gift.SID << 16)) / 1000000); + var id = gift.Format < 7 ? $"{gift.TID:D5}/{gift.SID:D5}" : $"[{SID7():D4}]{TID7():D6}"; + var first = $"{GameInfo.Strings.specieslist[gift.Species]} @ {GameInfo.Strings.itemlist[gift.HeldItem]} --- " - + (gift.IsEgg ? GameInfo.Strings.eggname : $"{gift.OT_Name} - {gift.TID:00000}/{gift.SID:00000}"); + + (gift.IsEgg ? GameInfo.Strings.eggname : $"{gift.OT_Name} - {id}"); result.Add(first); result.Add(string.Join(" / ", gift.Moves.Select(z => GameInfo.Strings.movelist[z])));