Fixed Frostbite icon appearing in AI Pary menu for mon without ailment

This commit is contained in:
Eduardo Quezada 2023-05-20 23:56:55 -04:00 committed by AgustinGDLV
parent de2d86408f
commit 05895c5308

View File

@ -1015,11 +1015,13 @@ static void Task_ShowAiParty(u8 taskId)
gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId].oam.priority = 0;
if (aiMons[i].isFainted)
ailment = AILMENT_FNT;
else if (aiMons[i].status)
ailment = GetAilmentFromStatus(aiMons[i].status);
else
ailment = AILMENT_FNT + 1; // blank
StartSpriteAnim(&gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId], ailment - 1);
ailment = GetAilmentFromStatus(aiMons[i].status);
if (ailment != AILMENT_NONE)
StartSpriteAnim(&gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId], ailment - 1);
else
gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId].invisible = TRUE;
}
for (; i < PARTY_SIZE; i++)
data->spriteIds.aiPartyIcons[i] = 0xFF;