Use MAX_MON_MOVES constants
This commit is contained in:
+3
-3
@@ -298,13 +298,13 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
u16 species;
|
||||
u32 personality, pokerus;
|
||||
u8 i, friendship, language, gameMet, markings, obedience;
|
||||
u16 moves[4];
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u32 ivs[NUM_STATS];
|
||||
|
||||
|
||||
species = GetMonData(egg, MON_DATA_SPECIES);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
moves[i] = GetMonData(egg, MON_DATA_MOVE1 + i);
|
||||
}
|
||||
@@ -324,7 +324,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
|
||||
CreateMon(temp, species, EGG_HATCH_LEVEL, 32, TRUE, personality, OT_ID_PLAYER_ID, 0);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
SetMonData(temp, MON_DATA_MOVE1 + i, &moves[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user