mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 09:24:19 +01:00
Use the correct constant for max-IV masks
This commit is contained in:
parent
3c2a33b9b2
commit
f02afc134b
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user