mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Move reset action to class
This commit is contained in:
parent
09c6359e3a
commit
757456bf06
2 changed files with 14 additions and 6 deletions
|
@ -250,12 +250,7 @@ namespace PKHeX.Core
|
|||
if (pkm is IBattleVersion v && v.BattleVersion != 0)
|
||||
{
|
||||
reset = ((GameVersion) v.BattleVersion).GetGeneration();
|
||||
source.EggEventSource = Array.Empty<int>();
|
||||
source.Base = Array.Empty<int>();
|
||||
source.EggLevelUpSource = Array.Empty<int>();
|
||||
source.EggMoveSource = Array.Empty<int>();
|
||||
source.NonTradeBackLevelUpMoves = Array.Empty<int>();
|
||||
source.SpecialSource = Array.Empty<int>();
|
||||
source.ResetSources();
|
||||
}
|
||||
|
||||
// Check empty moves and relearn moves before generation specific moves
|
||||
|
|
|
@ -18,5 +18,18 @@ namespace PKHeX.Core
|
|||
public int[] EggLevelUpSource { get; set; } = Empty;
|
||||
public int[] EggMoveSource { get; set; } = Empty;
|
||||
public IReadOnlyList<int> EggEventSource { get; set; } = Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Clears all sources except for the <see cref="CurrentMoves"/>.
|
||||
/// </summary>
|
||||
public void ResetSources()
|
||||
{
|
||||
EggEventSource = Empty;
|
||||
Base = Empty;
|
||||
EggLevelUpSource = Empty;
|
||||
EggMoveSource = Empty;
|
||||
NonTradeBackLevelUpMoves = Empty;
|
||||
SpecialSource = Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue