mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 22:54:14 +00:00
parent
ef35055d4e
commit
36515b8178
2 changed files with 7 additions and 3 deletions
|
@ -170,7 +170,7 @@ namespace PKHeX.WinForms
|
||||||
else if (!SAV.SwapBox(index, index + dir)) // valid but locked
|
else if (!SAV.SwapBox(index, index + dir)) // valid but locked
|
||||||
{
|
{
|
||||||
MoveItem(-dir); // undo
|
MoveItem(-dir); // undo
|
||||||
WinFormsUtil.Alert("Locked slots prevent movement of box(es).");
|
WinFormsUtil.Alert("Locked/Team slots prevent movement of box(es).");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
changeBox(null, null);
|
changeBox(null, null);
|
||||||
|
|
|
@ -414,12 +414,16 @@ namespace PKHeX.Core
|
||||||
|
|
||||||
int min = BoxSlotCount * box1;
|
int min = BoxSlotCount * box1;
|
||||||
int max = BoxSlotCount * box1 + BoxSlotCount;
|
int max = BoxSlotCount * box1 + BoxSlotCount;
|
||||||
if (LockedSlots.Any(slot => min <= slot && slot < max)) // slots locked within box
|
if (LockedSlots.Any(slot => min <= slot && slot < max)) // locked slot within box
|
||||||
|
return false;
|
||||||
|
if (TeamSlots.Any(slot => min <= slot && slot < max)) // team slot within box
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
min = BoxSlotCount * box2;
|
min = BoxSlotCount * box2;
|
||||||
max = BoxSlotCount * box2 + BoxSlotCount;
|
max = BoxSlotCount * box2 + BoxSlotCount;
|
||||||
if (LockedSlots.Any(slot => min <= slot && slot < max)) // slots locked within box
|
if (LockedSlots.Any(slot => min <= slot && slot < max)) // locked slot within box
|
||||||
|
return false;
|
||||||
|
if (TeamSlots.Any(slot => min <= slot && slot < max)) // team slot within box
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Data
|
// Data
|
||||||
|
|
Loading…
Reference in a new issue