PKHeX/PKHeX.Core/Legality/Encounters/EncounterRejected.cs
Kurt 1486b7f14a Misc style & minor tweaks
Remove move combobox flicker hack (no longer necessary)
Add more Array.Empty usages
cache mysterygift sizes
seal some classes

no functionality changes
2018-08-02 20:11:42 -07:00

28 lines
No EOL
941 B
C#

using System;
namespace PKHeX.Core
{
/// <summary>
/// Rejected Encounter Data containing a reason why the encounter was rejected (not compatible).
/// </summary>
public class EncounterRejected : IEncounterable
{
public readonly IEncounterable Encounter;
public readonly CheckResult Check;
public string Reason => Check.Comment;
public int Species => Encounter.Species;
public string Name => Encounter.Name;
public bool EggEncounter => Encounter.EggEncounter;
public int LevelMin => Encounter.LevelMin;
public int LevelMax => Encounter.LevelMax;
public EncounterRejected(IEncounterable encounter, CheckResult check)
{
Encounter = encounter;
Check = check;
}
public PKM ConvertToPKM(ITrainerInfo SAV) => throw new ArgumentException($"Cannot convert an {nameof(EncounterRejected)} to PKM.");
}
}