Fixed compile. I had these changes in a testing branch but forgot to add them back here.

This commit is contained in:
Eduardo Quezada D'Ottone 2022-04-16 15:57:38 -04:00
parent a6175d2622
commit 16283b47c7

View file

@ -3294,6 +3294,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
#if P_LEGENDARY_PERFECT_IVS >= GEN_6 #if P_LEGENDARY_PERFECT_IVS >= GEN_6
if (gBaseStats[species].flags & (FLAG_LEGENDARY | FLAG_MYTHICAL | FLAG_ULTRA_BEAST)) if (gBaseStats[species].flags & (FLAG_LEGENDARY | FLAG_MYTHICAL | FLAG_ULTRA_BEAST))
{ {
iv = MAX_PER_STAT_IVS;
// Initialize a list of IV indices. // Initialize a list of IV indices.
for (i = 0; i < NUM_STATS; i++) for (i = 0; i < NUM_STATS; i++)
{ {
@ -3312,24 +3313,22 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
switch (selectedIvs[i]) switch (selectedIvs[i])
{ {
case STAT_HP: case STAT_HP:
SetBoxMonData(boxMon, MON_DATA_HP_IV, MAX_PER_STAT_IVS); SetBoxMonData(boxMon, MON_DATA_HP_IV, &iv);
//iv = GetBoxMonData(&daycare->mons[whichParents[i]].mon, MON_DATA_HP_IV);
//SetMonData(egg, MON_DATA_HP_IV, &iv);
break; break;
case STAT_ATK: case STAT_ATK:
SetBoxMonData(boxMon, MON_DATA_ATK_IV, MAX_PER_STAT_IVS); SetBoxMonData(boxMon, MON_DATA_ATK_IV, &iv);
break; break;
case STAT_DEF: case STAT_DEF:
SetBoxMonData(boxMon, MON_DATA_DEF_IV, MAX_PER_STAT_IVS); SetBoxMonData(boxMon, MON_DATA_DEF_IV, &iv);
break; break;
case STAT_SPEED: case STAT_SPEED:
SetBoxMonData(boxMon, MON_DATA_SPEED_IV, MAX_PER_STAT_IVS); SetBoxMonData(boxMon, MON_DATA_SPEED_IV, &iv);
break; break;
case STAT_SPATK: case STAT_SPATK:
SetBoxMonData(boxMon, MON_DATA_SPATK_IV, MAX_PER_STAT_IVS); SetBoxMonData(boxMon, MON_DATA_SPATK_IV, &iv);
break; break;
case STAT_SPDEF: case STAT_SPDEF:
SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, MAX_PER_STAT_IVS); SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv);
break; break;
} }
} }