Fix gen4 encoding of ?

This commit is contained in:
Kurt 2024-01-21 23:44:12 -08:00
parent 3b1f8b225f
commit 560320e2cc
4 changed files with 5 additions and 5 deletions

View file

@ -68,7 +68,7 @@ public sealed class EvolutionForwardPersonal(EvolutionMethod[][] Entries, IPerso
Method = method.Method,
// Temporarily store these and overwrite them when we clean the list.
LevelMin = Math.Max(min, method.Level),
LevelMin = Math.Max((byte)(min + method.LevelUp), method.Level),
LevelUpRequired = GetLevelUp(method.LevelUp, currentMaxLevel, tweak),
};

View file

@ -69,7 +69,7 @@ public sealed class EvolutionForwardSpecies(EvolutionMethod[][] Entries) : IEvol
Method = method.Method,
// Temporarily store these and overwrite them when we clean the list.
LevelMin = Math.Max(min, method.Level),
LevelMin = Math.Max((byte)(min + method.LevelUp), method.Level),
LevelUpRequired = method.LevelUp, // No need to tweak this, all games of this Type have the same default behavior.
};
}

View file

@ -9,7 +9,7 @@ namespace PKHeX.Core;
/// </summary>
public static class StringConverter4
{
private const ushort Terminator = 0xFFFF;
public const ushort Terminator = 0xFFFF;
/// <summary>Converts Generation 4 encoded data to decoded string.</summary>
/// <param name="data">Encoded data</param>

View file

@ -68,8 +68,8 @@ public static class StringConverter4Util
private const int TableKORStart = 0x400;
private const int TableKOREnd = 0xD65;
private const ushort SaveInvalidAs = 0x0428; // '?'
private const char NUL = '?';
private const ushort SaveInvalidAs = 0x1AC; // '?'
private const char NUL = (char)StringConverter4.Terminator;
private const char EMP = NUL; // Empty, not available on keyboard.
private const char YEN = NUL; // Yen, not available on keyboard.