private PersonalTable(byte[] data, GameVersion ver) { int size = 0; switch (ver) { case GameVersion.ORAS: size = PersonalInfoORAS.SIZE; break; case GameVersion.SM: size = PersonalInfoSM.SIZE; break; } byte[][] entries = splitBytes(data, size); PersonalInfo[] d = new PersonalInfo[data.Length / size]; switch (ver) { case GameVersion.ORAS: for (int i = 0; i < d.Length; i++) { d[i] = new PersonalInfoORAS(entries[i]); } break; case GameVersion.SM: for (int i = 0; i < d.Length; i++) { d[i] = new PersonalInfoSM(entries[i]); } break; } Table = d; }
private static bool GetIsNative(PersonalInfo personalInfo, int s) { return(personalInfo switch { PersonalInfoSM _ => s > 721 || Legal.PastGenAlolanNatives.Contains(s), PersonalInfoSWSH ss => ss.PokeDexIndex > 0, _ => true, });