diff options
Diffstat (limited to 'src/com/sneed/pkrandom/SettingsUpdater.java')
-rw-r--r-- | src/com/sneed/pkrandom/SettingsUpdater.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/sneed/pkrandom/SettingsUpdater.java b/src/com/sneed/pkrandom/SettingsUpdater.java index 5b638d4..b775814 100644 --- a/src/com/sneed/pkrandom/SettingsUpdater.java +++ b/src/com/sneed/pkrandom/SettingsUpdater.java @@ -292,7 +292,6 @@ public class SettingsUpdater { } if (oldVersion < 319) { - // 5-10 custom starters, offset by 1 because of new "Random" option int starter1 = FileFunctions.read2ByteInt(dataBlock, 5); int starter2 = FileFunctions.read2ByteInt(dataBlock, 7); @@ -310,6 +309,14 @@ public class SettingsUpdater { insertExtraByte(50, (byte) 0); } + if (oldVersion < 321) { + // Minimum Catch Rate got moved around to give it more space for Guaranteed Catch. + // Read the old one, clear it out, then write it to the new location. + int oldMinimumCatchRate = ((dataBlock[16] & 0x60) >> 5) + 1; + dataBlock[16] &= ~0x60; + dataBlock[50] |= ((oldMinimumCatchRate - 1) << 3); + } + // fix checksum CRC32 checksum = new CRC32(); checksum.update(dataBlock, 0, actualDataLength - 8); |