Fix error when compiling with P_FUSION_FORMS disabled (#8298)

This commit is contained in:
cawtds 2025-11-19 22:41:37 +01:00 committed by GitHub
parent a0780a6f91
commit 867b45a6f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6300,6 +6300,7 @@ static void DeleteInvalidFusionMoves(struct Pokemon *mon, u32 species)
}
}
#if P_FUSION_FORMS
static void SwapFusionMonMoves(struct Pokemon *mon, const u16 moveTable[][2], u32 mode)
{
u32 oldMoveIndex, newMoveIndex;
@ -6328,6 +6329,8 @@ static void SwapFusionMonMoves(struct Pokemon *mon, const u16 moveTable[][2], u3
}
}
#endif //P_FUSION_FORMS
static void Task_TryItemUseFusionChange(u8 taskId)
{
struct Pokemon *mon = &gPlayerParty[gTasks[taskId].firstFusionSlot];
@ -6421,6 +6424,7 @@ static void Task_TryItemUseFusionChange(u8 taskId)
{
if (gTasks[taskId].fusionType == FUSE_MON)
{
#if P_FUSION_FORMS
#if P_FAMILY_KYUREM
#if P_FAMILY_RESHIRAM
if (gTasks[taskId].tExtraMoveHandling == SWAP_EXTRA_MOVES_KYUREM_WHITE)
@ -6431,11 +6435,13 @@ static void Task_TryItemUseFusionChange(u8 taskId)
SwapFusionMonMoves(mon, gKyuremBlackSwapMoveTable, FUSE_MON);
#endif //P_FAMILY_ZEKROM
#endif //P_FAMILY_KYUREM
#endif //P_FUSION_FORMS
if (gTasks[taskId].moveToLearn != 0)
FormChangeTeachMove(taskId, gTasks[taskId].moveToLearn, gTasks[taskId].firstFusionSlot);
}
else //(gTasks[taskId].fusionType == UNFUSE_MON)
{
#if P_FUSION_FORMS
#if P_FAMILY_KYUREM
#if P_FAMILY_RESHIRAM
if (gTasks[taskId].tExtraMoveHandling == SWAP_EXTRA_MOVES_KYUREM_WHITE)
@ -6446,6 +6452,7 @@ static void Task_TryItemUseFusionChange(u8 taskId)
SwapFusionMonMoves(mon, gKyuremBlackSwapMoveTable, UNFUSE_MON);
#endif //P_FAMILY_ZEKROM
#endif //P_FAMILY_KYUREM
#endif //P_FUSION_FORMS
if ( gTasks[taskId].tExtraMoveHandling == FORGET_EXTRA_MOVES)
{
DeleteInvalidFusionMoves(mon, gTasks[taskId].fusionResult);