mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-26 10:47:24 -05:00
Clamp roto rally score to 99_999
https://github.com/kwsch/PKHeX/issues/2639#issuecomment-575863541
This commit is contained in:
@@ -19,11 +19,15 @@ public int TrainerID
|
||||
set => SAV.SetData(Data, BitConverter.GetBytes(value), 0x1C);
|
||||
}
|
||||
|
||||
public const int RotoRallyScoreMax = 99_999;
|
||||
|
||||
public int RotoRallyScore
|
||||
{
|
||||
get => BitConverter.ToInt32(Data, 0x28);
|
||||
set
|
||||
{
|
||||
if (value > RotoRallyScoreMax)
|
||||
value = RotoRallyScoreMax;
|
||||
var data = BitConverter.GetBytes(value);
|
||||
SAV.SetData(Data, data, 0x28);
|
||||
// set to the other block since it doesn't have an accessor
|
||||
|
||||
Reference in New Issue
Block a user