summaryrefslogtreecommitdiff
path: root/src/pokemon.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-02-22 11:26:52 -0500
committerGitHub <noreply@github.com>2021-02-22 11:26:52 -0500
commit12c7dab2194f707daf51a9da13b0b38e2f856a04 (patch)
treeb333d98e65ce3821061a1f956dd396a5bc688df9 /src/pokemon.c
parent5351028d7e00acb885bf81aab46b03d2be6f34d8 (diff)
parentfc16ee9498c8283a2bb520f524409999ba27612b (diff)
Merge pull request #396 from hjk321/storage-magic
Change embarassing magic numbers that should have been fixed a long time ago
Diffstat (limited to 'src/pokemon.c')
-rw-r--r--src/pokemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pokemon.c b/src/pokemon.c
index c0960f552..f58aee9b3 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -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());