mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-16 21:38:40 +00:00
0 indexed -> 1 indexed
fixes regression from 2 days ago
e216c38151 (diff-37bd5b548e2b340e5c38fd0961a3eb04L165)
Thanks @ReignOfComputer for pointing this out:
https://github.com/kwsch/PKHeX/pull/1956
(also, update GetSprite since slot is 1-30; box is now -1(and below) if
not originating from a box. Now matches the legality check side
This commit is contained in:
parent
a81b43cd4f
commit
400774595e
3 changed files with 4 additions and 4 deletions
|
@ -168,8 +168,8 @@ namespace PKHeX.Core
|
|||
|
||||
data[i] = GetStoredSlot(ofs);
|
||||
data[i].Identifier = $"{GetBoxName(b)}:{s + 1:00}";
|
||||
data[i].Box = b;
|
||||
data[i].Slot = s;
|
||||
data[i].Box = b + 1;
|
||||
data[i].Slot = s + 1;
|
||||
data[i].Locked = IsSlotLocked(b, s);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace PKHeX.WinForms
|
|||
|
||||
if (flagIllegal)
|
||||
{
|
||||
if (slot < 30)
|
||||
if (box >= 0)
|
||||
pkm.Box = box;
|
||||
var la = new LegalityAnalysis(pkm, SAV.Personal);
|
||||
if (la.ParsedInvalid && pkm.Species != 0)
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace PKHeX.WinForms
|
|||
int ctr = 0;
|
||||
foreach (PKM pk in boxdata)
|
||||
{
|
||||
if (pk.Species == 0 || !pk.Valid || pk.Box != currentBox)
|
||||
if (pk.Species == 0 || !pk.Valid || pk.Box - 1 != currentBox)
|
||||
continue;
|
||||
|
||||
ctr++;
|
||||
|
|
Loading…
Add table
Reference in a new issue