summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-11-15 10:57:06 -0500
committerGriffinR <griffin.g.richards@gmail.com>2021-11-15 10:57:06 -0500
commit65d3b583748bf1a8e03bc55baa31760bd5bdc384 (patch)
treee9a0b232711ce82ced478c4786c744eb27603b96 /src
parentf85de6eca57ee9497bf81f023bd7784b3115f2ce (diff)
Add PARTY_NOTHING_CHOSEN
Diffstat (limited to 'src')
-rw-r--r--src/mail_data.c3
-rwxr-xr-xsrc/party_menu.c8
2 files changed, 6 insertions, 5 deletions
diff --git a/src/mail_data.c b/src/mail_data.c
index 683bd854e..ca50a687e 100644
--- a/src/mail_data.c
+++ b/src/mail_data.c
@@ -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;
}
diff --git a/src/party_menu.c b/src/party_menu.c
index 43f522034..ad8d78ad3 100755
--- a/src/party_menu.c
+++ b/src/party_menu.c
@@ -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;