Add Pokémon Legends: Arceus support

.NET5.0 -> .NET6.0

Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
This commit is contained in:
Kurt
2022-02-04 18:43:21 -08:00
parent d6c8780ed2
commit e432370a40
142 changed files with 7542 additions and 296 deletions

View File

@@ -16,22 +16,19 @@ public EvolutionSet8(byte[] data)
PossibleEvolutions = data.GetArray(GetEvo, ENTRY_SIZE);
}
private static EvolutionMethod GetEvo(byte[] data, int offset)
private static EvolutionMethod GetEvo(byte[] data, int offset) => new()
{
return new()
{
Method = (EvolutionType)BitConverter.ToUInt16(data, offset + 0),
Argument = BitConverter.ToUInt16(data, offset + 2),
Species = BitConverter.ToUInt16(data, offset + 4),
Form = (sbyte)data[offset + 6],
Level = data[offset + 7],
};
}
Method = (EvolutionType)BitConverter.ToUInt16(data, offset + 0),
Argument = BitConverter.ToUInt16(data, offset + 2),
Species = BitConverter.ToUInt16(data, offset + 4),
Form = (sbyte)data[offset + 6],
Level = data[offset + 7],
};
public override byte[] Write()
{
using MemoryStream ms = new MemoryStream();
using BinaryWriter bw = new BinaryWriter(ms);
using MemoryStream ms = new();
using BinaryWriter bw = new(ms);
foreach (EvolutionMethod evo in PossibleEvolutions)
{
bw.Write((ushort)evo.Method);