Small CanFirstMonBoostHeldItemRarity optimization (#4008)

This commit is contained in:
Eduardo Quezada D'Ottone 2024-01-16 13:45:09 -03:00 committed by GitHub
parent bb190d33dd
commit e1cd7b61ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5487,11 +5487,14 @@ static s32 GetWildMonTableIdInAlteringCave(u16 species)
static inline bool32 CanFirstMonBoostHeldItemRarity(void)
{
u32 ability;
if (GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG))
return FALSE;
else if ((OW_COMPOUND_EYES < GEN_9) && GetMonAbility(&gPlayerParty[0]) == ABILITY_COMPOUND_EYES)
ability = GetMonAbility(&gPlayerParty[0]);
if ((OW_COMPOUND_EYES < GEN_9) && ability == ABILITY_COMPOUND_EYES)
return TRUE;
else if ((OW_SUPER_LUCK == GEN_8) && GetMonAbility(&gPlayerParty[0]) == ABILITY_SUPER_LUCK)
else if ((OW_SUPER_LUCK == GEN_8) && ability == ABILITY_SUPER_LUCK)
return TRUE;
return FALSE;
}