mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-22 06:34:05 -05:00
Handle ZA's EOL revision (2)
When throwing arg out of range, pass the value so it's obvious the number
This commit is contained in:
@@ -36,7 +36,7 @@ public SAV8LA()
|
||||
{
|
||||
0 => "-Base", // Vanilla
|
||||
1 => "-DB", // DLC 1: Daybreak
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
|
||||
};
|
||||
|
||||
public override string GetString(ReadOnlySpan<byte> data)
|
||||
|
||||
@@ -45,7 +45,7 @@ public override void CopyChangesFrom(SaveFile sav)
|
||||
0 => "-Base", // Vanilla
|
||||
1 => "-IoA", // DLC 1: Isle of Armor
|
||||
2 => "-CT", // DLC 2: Crown Tundra
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
|
||||
};
|
||||
|
||||
public override bool ChecksumsValid => true;
|
||||
@@ -111,7 +111,7 @@ private void Initialize()
|
||||
0 => (Legal.MaxMoveID_8_O0, Legal.MaxSpeciesID_8_O0, Legal.MaxItemID_8_O0, Legal.MaxAbilityID_8_O0),
|
||||
1 => (Legal.MaxMoveID_8_R1, Legal.MaxSpeciesID_8_R1, Legal.MaxItemID_8_R1, Legal.MaxAbilityID_8_R1),
|
||||
2 => (Legal.MaxMoveID_8_R2, Legal.MaxSpeciesID_8_R2, Legal.MaxItemID_8_R2, Legal.MaxAbilityID_8_R2),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public override void CopyChangesFrom(SaveFile sav)
|
||||
0 => "-Base", // Vanilla
|
||||
1 => "-TM", // Teal Mask
|
||||
2 => "-ID", // Indigo Disk
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
|
||||
};
|
||||
|
||||
public override bool ChecksumsValid => true;
|
||||
@@ -118,7 +118,7 @@ private void Initialize()
|
||||
0 => (Legal.MaxMoveID_9_T0, Legal.MaxSpeciesID_9_T0, Legal.MaxItemID_9_T0, Legal.MaxAbilityID_9_T0),
|
||||
1 => (Legal.MaxMoveID_9_T1, Legal.MaxSpeciesID_9_T1, Legal.MaxItemID_9_T1, Legal.MaxAbilityID_9_T1),
|
||||
2 => (Legal.MaxMoveID_9_T2, Legal.MaxSpeciesID_9_T2, Legal.MaxItemID_9_T2, Legal.MaxAbilityID_9_T2),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,8 @@ public override void CopyChangesFrom(SaveFile sav)
|
||||
{
|
||||
0 => "-Base", // Vanilla
|
||||
1 => "-MD", // Mega Dimension
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision)),
|
||||
2 => "-EOL", // End of Life
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(SaveRevision), SaveRevision, null),
|
||||
};
|
||||
|
||||
public override bool ChecksumsValid => true;
|
||||
|
||||
Reference in New Issue
Block a user