mirror of
https://github.com/kwsch/PKHeX
synced 2024-09-20 06:11:55 +00:00
SAV1: Use current box span for source of boxdata
Maybe only a GSC thing where Stadium 2 doesn't know better?
This commit is contained in:
parent
5af96eab95
commit
8b68a07dbd
1 changed files with 6 additions and 4 deletions
|
@ -85,10 +85,12 @@ public sealed class SAV1 : SaveFile, ILangDeviantSave, IEventFlagArray, IEventWo
|
|||
var dest = BoxBuffer[(i * SIZE_BOX_AS_SINGLES)..];
|
||||
PokeList1.Unpack(src, dest, StringLength, capacity, false);
|
||||
}
|
||||
|
||||
// Don't treat the CurrentBox segment as valid; Stadium ignores it and will de-synchronize it.
|
||||
// The main box data segment is the truth, the CurrentBox copy is not always up-to-date.
|
||||
// When exporting an updated save file in this program, be nice and re-synchronize.
|
||||
if (CurrentBox < BoxCount) // Load Current Box
|
||||
{
|
||||
var src = Data.AsSpan(Offsets.CurrentBox, stored);
|
||||
var dest = BoxBuffer[(CurrentBox * SIZE_BOX_AS_SINGLES)..];
|
||||
PokeList1.Unpack(src, dest, StringLength, capacity, false);
|
||||
}
|
||||
|
||||
// Stash party immediately after.
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue