Move Shiny override set to constructor

This commit is contained in:
Kurt 2020-12-21 14:40:34 -08:00
parent b58f3bbc22
commit 8a0e7d90e0
3 changed files with 15 additions and 9 deletions

View file

@ -19,9 +19,11 @@ namespace PKHeX.Core
public int CNT_Tough { get; set; } public int CNT_Tough { get; set; }
public int CNT_Sheen { get; set; } public int CNT_Sheen { get; set; }
public EncounterTrade3(uint pid) => PID = pid; public EncounterTrade3(uint pid)
{
public override Shiny Shiny { get; set; } = Shiny.FixedValue; PID = pid;
Shiny = Shiny.FixedValue;
}
public override bool IsMatch(PKM pkm, DexLevel evo) public override bool IsMatch(PKM pkm, DexLevel evo)
{ {

View file

@ -11,7 +11,11 @@ namespace PKHeX.Core
/// </summary> /// </summary>
public readonly uint PID; public readonly uint PID;
public EncounterTrade4PID(uint pid) => PID = pid; public EncounterTrade4PID(uint pid)
{
PID = pid;
Shiny = Shiny.FixedValue;
}
internal IReadOnlyList<int> Contest { set => this.SetContestStats(value); } internal IReadOnlyList<int> Contest { set => this.SetContestStats(value); }
public int CNT_Cool { get; set; } public int CNT_Cool { get; set; }
@ -21,8 +25,6 @@ namespace PKHeX.Core
public int CNT_Tough { get; set; } public int CNT_Tough { get; set; }
public int CNT_Sheen { get; set; } public int CNT_Sheen { get; set; }
public override Shiny Shiny { get; set; } = Shiny.FixedValue;
public override bool IsMatch(PKM pkm, DexLevel evo) public override bool IsMatch(PKM pkm, DexLevel evo)
{ {
if (!base.IsMatch(pkm, evo)) if (!base.IsMatch(pkm, evo))

View file

@ -14,9 +14,11 @@
/// </summary> /// </summary>
public readonly uint PID; public readonly uint PID;
public EncounterTrade5PID(uint pid) => PID = pid; public EncounterTrade5PID(uint pid)
{
public override Shiny Shiny { get; set; } = Shiny.FixedValue; PID = pid;
Shiny = Shiny.FixedValue;
}
protected override void SetPINGA(PKM pk, EncounterCriteria criteria) protected override void SetPINGA(PKM pk, EncounterCriteria criteria)
{ {