From 0d4cff81c681f132f1c79b998f4eee7080e94c02 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 15 Feb 2020 14:29:23 -0800 Subject: [PATCH] Clean --- PKHeX.Core/Legality/Verifiers/BallVerifier.cs | 4 +--- PKHeX.Core/Legality/Verifiers/MiscVerifier.cs | 1 - PKHeX.Core/Saves/Substructures/Gen5/BattleSubway5.cs | 2 ++ PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Misc5.cs | 8 ++------ 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/PKHeX.Core/Legality/Verifiers/BallVerifier.cs b/PKHeX.Core/Legality/Verifiers/BallVerifier.cs index e8dbaf5c5..97bdc9196 100644 --- a/PKHeX.Core/Legality/Verifiers/BallVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/BallVerifier.cs @@ -343,9 +343,7 @@ public static bool IsGalarCapture(int species) if ((int)Species.Dracozolt <= species && species <= (int)Species.Arctovish) // fossil return false; var pt = PersonalTable.SWSH; - if (((PersonalInfoSWSH) pt.GetFormeEntry(species, 0)).PokeDexIndex != 0) - return true; - return false; + return ((PersonalInfoSWSH)pt.GetFormeEntry(species, 0)).PokeDexIndex != 0; } private CheckResult VerifyBallEquals(LegalityAnalysis data, int ball) => GetResult(ball == data.pkm.Ball); diff --git a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs index 2a21cb9ef..268b47e4c 100644 --- a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs @@ -317,7 +317,6 @@ private static bool IsCloseEnough(float a, float b) return Math.Abs(ia - ib) <= 7; } - private static readonly int[] tradeEvo7b = { 064, 067, 075, 093 }; private static bool IsStarter(PKM pb7) => (pb7.Species == (int)Species.Pikachu && pb7.AltForm == 8) || (pb7.Species == (int)Species.Eevee && pb7.AltForm == 1); private void VerifySWSHStats(LegalityAnalysis data, PK8 pk8) diff --git a/PKHeX.Core/Saves/Substructures/Gen5/BattleSubway5.cs b/PKHeX.Core/Saves/Substructures/Gen5/BattleSubway5.cs index b6e4a5e40..30bfd12ca 100644 --- a/PKHeX.Core/Saves/Substructures/Gen5/BattleSubway5.cs +++ b/PKHeX.Core/Saves/Substructures/Gen5/BattleSubway5.cs @@ -93,6 +93,7 @@ public int SuperDoubleRecord get => BitConverter.ToUInt16(Data, Offset + 0x26); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, Offset + 0x26); } + public int SuperMultiNPCPast { get => BitConverter.ToUInt16(Data, Offset + 0x16); @@ -104,6 +105,7 @@ public int SuperMultiNPCRecord get => BitConverter.ToUInt16(Data, Offset + 0x28); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, Offset + 0x28); } + public int SuperMultiFriendsPast { get => BitConverter.ToUInt16(Data, Offset + 0x18); diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Misc5.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Misc5.cs index 1738d1e52..9c58dbccf 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Misc5.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Misc5.cs @@ -40,7 +40,7 @@ private void B_Save_Click(object sender, EventArgs e) Origin.CopyChangesFrom(SAV); Close(); } - + private ComboBox[] cbr; private int ofsFly; private int[] FlyDestC; @@ -722,10 +722,9 @@ private void SetForms(EntreeSlot slot) private void ReadSubway() { sw = SAV.BattleSubway; - int swSuperCheck; // Figure out the Super Checks - swSuperCheck = sw.SuperCheck; + var swSuperCheck = sw.SuperCheck; if (swSuperCheck == 0x00) { CHK_SuperSingle.Checked = CHK_SuperDouble.Checked = CHK_SuperMulti.Checked = false; @@ -783,7 +782,6 @@ private void ReadSubway() // Multi Friends NUD_SMultiFriendsPast.Value = sw.SuperMultiFriendsPast; NUD_SMultiFriendsRecord.Value = sw.SuperMultiFriendsRecord; - } private void SaveSubway() @@ -824,8 +822,6 @@ private void SaveSubway() // Multi Friends sw.SuperMultiFriendsPast = (int)NUD_SMultiFriendsPast.Value; sw.SuperMultiFriendsRecord = (int)NUD_SMultiFriendsRecord.Value; - } - } }