mirror of
https://github.com/kwsch/pkNX.git
synced 2026-09-08 18:45:29 -05:00
Minor clean
This commit is contained in:
@@ -41,7 +41,7 @@ private static EvolutionMethod ReadEvolution(ReadOnlySpan<byte> entry)
|
||||
Argument = ReadUInt16LittleEndian(entry[2..]),
|
||||
Species = ReadUInt16LittleEndian(entry[4..]),
|
||||
Form = SByteToByte((sbyte)entry[6]),
|
||||
Level = entry[7]
|
||||
Level = entry[7],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -55,12 +55,11 @@ public static IReadOnlyList<EvolutionMethod[]> GetArray(BinLinkerAccessor data)
|
||||
|
||||
/// <summary>
|
||||
/// For evo set 7 sbyte is used for form, -1 means no forms are present.
|
||||
/// The remaining code expects to work with 0 for all base forms.
|
||||
/// This clamps the sbyte range to 0<>128, removing the negative range.
|
||||
/// The remaining code expects to work with 0 for all base forms.
|
||||
/// This clamps the sbyte range to [0-128), removing the negative range.
|
||||
/// </summary>
|
||||
private static byte SByteToByte(sbyte b)
|
||||
{
|
||||
return (byte)Math.Max(b, (sbyte)0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user