Fix storage magic numbers

I could *kinda* understand missing SendMonToPc, but IN THE STRUCT ITSELF?!
This commit is contained in:
hjk321
2021-02-22 10:04:27 -06:00
parent 33126a0633
commit fc16ee9498
2 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -3646,7 +3646,7 @@ static u8 SendMonToPC(struct Pokemon* mon)
do
{
for (boxPos = 0; boxPos < 30; boxPos++)
for (boxPos = 0; boxPos < IN_BOX_COUNT; boxPos++)
{
struct BoxPokemon* checkingMon = GetBoxedMonPtr(boxNo, boxPos);
if (GetBoxMonData(checkingMon, MON_DATA_SPECIES, NULL) == SPECIES_NONE)
@@ -3663,7 +3663,7 @@ static u8 SendMonToPC(struct Pokemon* mon)
}
boxNo++;
if (boxNo == 14)
if (boxNo == TOTAL_BOXES_COUNT)
boxNo = 0;
} while (boxNo != StorageGetCurrentBox());