From 8a0e7d90e0f5bc8f9a5b47af9d21604a90405a4d Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 21 Dec 2020 14:40:34 -0800 Subject: [PATCH] Move Shiny override set to constructor --- .../Legality/Encounters/EncounterTrade/EncounterTrade3.cs | 8 +++++--- .../Encounters/EncounterTrade/EncounterTrade4PID.cs | 8 +++++--- .../Legality/Encounters/EncounterTrade/EncounterTrade5.cs | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade3.cs b/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade3.cs index 83421aeb2..9c19a2e50 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade3.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade3.cs @@ -19,9 +19,11 @@ namespace PKHeX.Core public int CNT_Tough { get; set; } public int CNT_Sheen { get; set; } - public EncounterTrade3(uint pid) => PID = pid; - - public override Shiny Shiny { get; set; } = Shiny.FixedValue; + public EncounterTrade3(uint pid) + { + PID = pid; + Shiny = Shiny.FixedValue; + } public override bool IsMatch(PKM pkm, DexLevel evo) { diff --git a/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade4PID.cs b/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade4PID.cs index a58512702..4a3c7b660 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade4PID.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade4PID.cs @@ -11,7 +11,11 @@ namespace PKHeX.Core /// public readonly uint PID; - public EncounterTrade4PID(uint pid) => PID = pid; + public EncounterTrade4PID(uint pid) + { + PID = pid; + Shiny = Shiny.FixedValue; + } internal IReadOnlyList Contest { set => this.SetContestStats(value); } public int CNT_Cool { get; set; } @@ -21,8 +25,6 @@ namespace PKHeX.Core public int CNT_Tough { get; set; } public int CNT_Sheen { get; set; } - public override Shiny Shiny { get; set; } = Shiny.FixedValue; - public override bool IsMatch(PKM pkm, DexLevel evo) { if (!base.IsMatch(pkm, evo)) diff --git a/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade5.cs b/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade5.cs index b3a05b5ef..285bd2cd8 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade5.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterTrade/EncounterTrade5.cs @@ -14,9 +14,11 @@ /// public readonly uint PID; - public EncounterTrade5PID(uint pid) => PID = pid; - - public override Shiny Shiny { get; set; } = Shiny.FixedValue; + public EncounterTrade5PID(uint pid) + { + PID = pid; + Shiny = Shiny.FixedValue; + } protected override void SetPINGA(PKM pk, EncounterCriteria criteria) {