fix givemon not giving Cherish Ball (#5022)

This commit is contained in:
sneed 2024-07-24 21:37:46 +03:00 committed by GitHub
parent 7b2914c046
commit 298ee34097
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -368,7 +368,7 @@ u32 ScriptGiveMonParameterized(u16 species, u8 level, u16 item, u8 ball, u8 natu
SetMonData(&mon, MON_DATA_ABILITY_NUM, &abilityNum);
// ball
if (ball >= POKEBALL_COUNT)
if (ball > LAST_BALL)
ball = ITEM_POKE_BALL;
SetMonData(&mon, MON_DATA_POKEBALL, &ball);