Handle off by 1 for box/slot differently

Does the opposite as was implemented in 16c8a18928 by updating all downstream users -- batch filters only.
This commit is contained in:
Kurt 2021-07-20 23:53:33 -07:00
parent 5615d24c9c
commit 51616cc7f9
2 changed files with 3 additions and 3 deletions

View file

@ -22,10 +22,10 @@ namespace PKHeX.Core
(obj, cmd) => obj is SlotCache s && s.Identify().Contains(cmd.PropertyValue) == cmd.Evaluator),
new MetaFilter(nameof(SlotInfoBox.Box),
(obj, cmd) => obj is SlotCache { Source: SlotInfoBox b } && int.TryParse(cmd.PropertyValue, out var box) && b.Box == box),
(obj, cmd) => obj is SlotCache { Source: SlotInfoBox b } && int.TryParse(cmd.PropertyValue, out var box) && b.Box + 1 == box),
new MetaFilter(nameof(ISlotInfo.Slot),
(obj, cmd) => obj is SlotCache s && int.TryParse(cmd.PropertyValue, out var slot) && s.Source.Slot == slot),
(obj, cmd) => obj is SlotCache s && int.TryParse(cmd.PropertyValue, out var slot) && s.Source.Slot + 1 == slot),
};
}
}

View file

@ -123,7 +123,7 @@ namespace PKHeX.Core
{
for (int slot = 0; slot < sc; slot++, ctr++)
{
var ident = new SlotInfoBox(box + 1, slot + 1);
var ident = new SlotInfoBox(box, slot);
var result = new SlotCache(ident, bd[ctr], sav);
db.Add(result);
}