mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
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:
parent
5615d24c9c
commit
51616cc7f9
2 changed files with 3 additions and 3 deletions
|
@ -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),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue