Add PARTY_NOTHING_CHOSEN
This commit is contained in:
@@ -157,7 +157,7 @@ void ClearMailItemId(u8 mailId)
|
||||
gSaveBlock1Ptr->mail[mailId].itemId = ITEM_NONE;
|
||||
}
|
||||
|
||||
u8 TakeMailFromMon2(struct Pokemon *mon)
|
||||
u8 TakeMailFromMonAndSave(struct Pokemon *mon)
|
||||
{
|
||||
u8 i;
|
||||
u8 newHeldItem[2];
|
||||
@@ -179,6 +179,7 @@ u8 TakeMailFromMon2(struct Pokemon *mon)
|
||||
}
|
||||
}
|
||||
|
||||
// No space to save mail
|
||||
return MAIL_NONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -3343,7 +3343,7 @@ static void Task_HandleSendMailToPCYesNoInput(u8 taskId)
|
||||
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
||||
{
|
||||
case 0: // Yes, send to PC
|
||||
if (TakeMailFromMon2(&gPlayerParty[gPartyMenu.slotId]) != 0xFF)
|
||||
if (TakeMailFromMonAndSave(&gPlayerParty[gPartyMenu.slotId]) != MAIL_NONE)
|
||||
{
|
||||
DisplayPartyMenuMessage(gText_MailSentToPC, FALSE);
|
||||
gTasks[taskId].func = Task_UpdateHeldItemSprite;
|
||||
@@ -6133,7 +6133,7 @@ static void BufferMonSelection(void)
|
||||
{
|
||||
gSpecialVar_0x8004 = GetCursorSelectionMonId();
|
||||
if (gSpecialVar_0x8004 >= PARTY_SIZE)
|
||||
gSpecialVar_0x8004 = 0xFF;
|
||||
gSpecialVar_0x8004 = PARTY_NOTHING_CHOSEN;
|
||||
gFieldCallback2 = CB2_FadeFromPartyMenu;
|
||||
SetMainCallback2(CB2_ReturnToField);
|
||||
}
|
||||
@@ -6176,7 +6176,7 @@ static void CB2_ChooseContestMon(void)
|
||||
{
|
||||
gContestMonPartyIndex = GetCursorSelectionMonId();
|
||||
if (gContestMonPartyIndex >= PARTY_SIZE)
|
||||
gContestMonPartyIndex = 0xFF;
|
||||
gContestMonPartyIndex = PARTY_NOTHING_CHOSEN;
|
||||
gSpecialVar_0x8004 = gContestMonPartyIndex;
|
||||
gFieldCallback2 = CB2_FadeFromPartyMenu;
|
||||
SetMainCallback2(CB2_ReturnToField);
|
||||
@@ -6221,7 +6221,7 @@ static void CB2_ChooseMonForMoveRelearner(void)
|
||||
{
|
||||
gSpecialVar_0x8004 = GetCursorSelectionMonId();
|
||||
if (gSpecialVar_0x8004 >= PARTY_SIZE)
|
||||
gSpecialVar_0x8004 = 0xFF;
|
||||
gSpecialVar_0x8004 = PARTY_NOTHING_CHOSEN;
|
||||
else
|
||||
gSpecialVar_0x8005 = GetNumberOfRelearnableMoves(&gPlayerParty[gSpecialVar_0x8004]);
|
||||
gFieldCallback2 = CB2_FadeFromPartyMenu;
|
||||
|
||||
Reference in New Issue
Block a user