mirror of
https://github.com/kwsch/pkNX.git
synced 2026-08-26 12:24:25 -05:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user