mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 06:34:19 +00:00
SAV1/2: Force zeroed slots to be FF
Deleting a slot shouldn't leave a level 0 nameless speciesless mon
This commit is contained in:
parent
ca85fba061
commit
a4a0337162
2 changed files with 4 additions and 0 deletions
|
@ -227,6 +227,8 @@ public static class PokeList1
|
|||
{
|
||||
var single = input.Slice(i * size, size);
|
||||
var marker = single[1]; // assume correct, don't look in body data.
|
||||
if (marker is 0) // Ensure deleted (zeroed) slots act as an Empty (FF) slot.
|
||||
marker = SlotEmpty;
|
||||
|
||||
var index = IsPresent(marker) ? ctr++ : emptyIndex++;
|
||||
output[1 + index] = marker;
|
||||
|
|
|
@ -230,6 +230,8 @@ public static class PokeList2
|
|||
{
|
||||
var single = input.Slice(i * size, size);
|
||||
var marker = single[1]; // assume correct, don't look in body data.
|
||||
if (marker is 0) // Ensure deleted (zeroed) slots act as an Empty (FF) slot.
|
||||
marker = SlotEmpty;
|
||||
|
||||
var index = IsPresent(marker) ? ctr++ : emptyIndex++;
|
||||
output[1 + index] = marker;
|
||||
|
|
Loading…
Reference in a new issue