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; gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId].oam.priority = 0;
if (aiMons[i].isFainted) if (aiMons[i].isFainted)
ailment = AILMENT_FNT; ailment = AILMENT_FNT;
else if (aiMons[i].status)
ailment = GetAilmentFromStatus(aiMons[i].status);
else else
ailment = AILMENT_FNT + 1; // blank ailment = GetAilmentFromStatus(aiMons[i].status);
StartSpriteAnim(&gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId], ailment - 1);
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++) for (; i < PARTY_SIZE; i++)
data->spriteIds.aiPartyIcons[i] = 0xFF; data->spriteIds.aiPartyIcons[i] = 0xFF;