From ae773f189be5f92199cfdb081183d1a7a96cd136 Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 8 Nov 2017 01:25:10 -0800 Subject: [PATCH] add usum tutor data one large list at static.rodata:005E6860, formatted to look like AO table with deletions & insertions at the bottom. bitflags are used in one large set (not 4 chunks of 4 like prior). --- PKHeX.Core/Legality/Core.cs | 4 ++-- PKHeX.Core/Legality/Tables7.cs | 12 +++++++----- PKHeX.Core/PersonalInfo/PersonalInfoSM.cs | 8 +------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/PKHeX.Core/Legality/Core.cs b/PKHeX.Core/Legality/Core.cs index 40e1b52b3..e28401fc5 100644 --- a/PKHeX.Core/Legality/Core.cs +++ b/PKHeX.Core/Legality/Core.cs @@ -2202,10 +2202,10 @@ internal static IEnumerable GetTutorMoves(PKM pkm, int species, int form, b } return moves.Distinct(); - IEnumerable GetTutors(PersonalTable t, IReadOnlyList tutors) + IEnumerable GetTutors(PersonalTable t, params int[][] tutors) { var pi = t.GetFormeEntry(species, form); - for (int i = 0; i < tutors.Count; i++) + for (int i = 0; i < tutors.Length; i++) for (int b = 0; b < tutors[i].Length; b++) if (pi.SpecialTutors[i][b]) yield return tutors[i][b]; diff --git a/PKHeX.Core/Legality/Tables7.cs b/PKHeX.Core/Legality/Tables7.cs index ac82c7e63..54cf34ea0 100644 --- a/PKHeX.Core/Legality/Tables7.cs +++ b/PKHeX.Core/Legality/Tables7.cs @@ -51,12 +51,14 @@ public static partial class Legal #endregion - internal static readonly int[][] Tutors_USUM = + internal static readonly int[] Tutors_USUM = { - new int[0], // todo - new int[0], // todo - new int[0], // todo - new int[0], // todo + 450, 343, 162, 530, 324, 442, 402, 529, 340, 067, 441, 253, 009, 007, 008, + 277, 335, 414, 492, 356, 393, 334, 387, 276, 527, 196, 401, 428, 406, 304, 231, + 020, 173, 282, 235, 257, 272, 215, 366, 143, 220, 202, 409, 264, 351, 352, + 380, 388, 180, 495, 270, 271, 478, 472, 283, 200, 278, 289, 446, 285, + + 477, 502, 432, 710, 707, 675, 673 }; internal static readonly ushort[] Pouch_Regular_SM = // 00 { diff --git a/PKHeX.Core/PersonalInfo/PersonalInfoSM.cs b/PKHeX.Core/PersonalInfo/PersonalInfoSM.cs index ad74020ba..08f0ed460 100644 --- a/PKHeX.Core/PersonalInfo/PersonalInfoSM.cs +++ b/PKHeX.Core/PersonalInfo/PersonalInfoSM.cs @@ -20,10 +20,7 @@ public PersonalInfoSM(byte[] data) SpecialTutors = new[] { - GetBits(Data.Skip(0x3C).Take(0x04).ToArray()), - GetBits(Data.Skip(0x40).Take(0x04).ToArray()), - GetBits(Data.Skip(0x44).Take(0x04).ToArray()), - GetBits(Data.Skip(0x48).Take(0x04).ToArray()), + GetBits(Data.Skip(0x3C).Take(0x0A).ToArray()), }; } public override byte[] Write() @@ -31,9 +28,6 @@ public override byte[] Write() SetBits(TMHM).CopyTo(Data, 0x28); SetBits(TypeTutors).CopyTo(Data, 0x38); SetBits(SpecialTutors[0]).CopyTo(Data, 0x3C); - SetBits(SpecialTutors[1]).CopyTo(Data, 0x40); - SetBits(SpecialTutors[2]).CopyTo(Data, 0x44); - SetBits(SpecialTutors[3]).CopyTo(Data, 0x48); return Data; }