Use the correct constant for max-IV masks

This commit is contained in:
SphericalIce 2021-01-07 22:34:57 +00:00
parent 3c2a33b9b2
commit f02afc134b

View File

@ -4314,12 +4314,12 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
case MON_DATA_IVS:
{
u32 ivs = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);
substruct3->hpIV = ivs & MAX_PER_STAT_IVS;
substruct3->attackIV = (ivs >> 5) & MAX_PER_STAT_IVS;
substruct3->defenseIV = (ivs >> 10) & MAX_PER_STAT_IVS;
substruct3->speedIV = (ivs >> 15) & MAX_PER_STAT_IVS;
substruct3->spAttackIV = (ivs >> 20) & MAX_PER_STAT_IVS;
substruct3->spDefenseIV = (ivs >> 25) & MAX_PER_STAT_IVS;
substruct3->hpIV = ivs & MAX_IV_MASK;
substruct3->attackIV = (ivs >> 5) & MAX_IV_MASK;
substruct3->defenseIV = (ivs >> 10) & MAX_IV_MASK;
substruct3->speedIV = (ivs >> 15) & MAX_IV_MASK;
substruct3->spAttackIV = (ivs >> 20) & MAX_IV_MASK;
substruct3->spDefenseIV = (ivs >> 25) & MAX_IV_MASK;
break;
}
default: