mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Minor clean
This commit is contained in:
parent
33ad654be6
commit
730640decc
4 changed files with 5 additions and 23 deletions
|
@ -285,12 +285,9 @@ namespace PKHeX.Core
|
|||
if (pkm.Species == (int)Species.Shedinja && info.Generation <= 4)
|
||||
ParseShedinjaEvolveMoves(pkm, res, source.CurrentMoves, info.EvoChainsAllGens);
|
||||
|
||||
// ReSharper disable once ConstantNullCoalescingCondition
|
||||
for (int m = 0; m < 4; m++)
|
||||
{
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||
if (res[m] == null)
|
||||
res[m] = new CheckMoveResult(Unknown, info.Generation, Invalid, LMoveSourceInvalid, Move);
|
||||
}
|
||||
res[m] ??= new CheckMoveResult(Unknown, info.Generation, Invalid, LMoveSourceInvalid, Move);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace PKHeX.Core
|
|||
(int)Species.Kingdra,
|
||||
(int)Species.Porygon2,
|
||||
(int)Species.Blissey,
|
||||
|
||||
(int)Species.Magnezone,
|
||||
(int)Species.Lickilicky,
|
||||
(int)Species.Rhyperior,
|
||||
|
|
|
@ -1,17 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace PKHeX.Core
|
||||
namespace PKHeX.Core
|
||||
{
|
||||
public interface IVersion
|
||||
{
|
||||
GameVersion Version { get; }
|
||||
}
|
||||
|
||||
internal interface IVersionSet
|
||||
{
|
||||
GameVersion Version { set; }
|
||||
}
|
||||
|
||||
public static partial class Extensions
|
||||
{
|
||||
private static bool CanBeReceivedBy(this IVersion ver, GameVersion game) => ver.Version.Contains(game);
|
||||
|
@ -23,15 +16,6 @@ namespace PKHeX.Core
|
|||
return ver.GetSingleVersion();
|
||||
}
|
||||
|
||||
internal static void SetVersion<T>(this IEnumerable<T> arr, GameVersion game) where T : IVersion, IVersionSet
|
||||
{
|
||||
foreach (var z in arr)
|
||||
{
|
||||
if (((IVersion)z).Version <= 0)
|
||||
((IVersionSet)z).Version = game;
|
||||
}
|
||||
}
|
||||
|
||||
private static GameVersion GetSingleVersion(this IVersion ver)
|
||||
{
|
||||
const int max = (int) GameVersion.RB;
|
||||
|
|
|
@ -487,7 +487,7 @@ namespace PKHeX.Core
|
|||
|
||||
#region Pokédex
|
||||
public int PokeDex { get; protected set; } = int.MinValue;
|
||||
public virtual bool HasPokeDex => PokeDex > -1;
|
||||
public bool HasPokeDex => PokeDex > -1;
|
||||
public virtual bool GetSeen(int species) => false;
|
||||
public virtual void SetSeen(int species, bool seen) { }
|
||||
public virtual bool GetCaught(int species) => false;
|
||||
|
|
Loading…
Add table
Reference in a new issue