mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-14 15:43:43 +01:00
Remove unnecessary subtraction in switch
This commit is contained in:
parent
5cf5adf7d7
commit
eba7933c0c
@ -1221,16 +1221,16 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr)
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (gPartyMenu.action - 3)
|
||||
switch (gPartyMenu.action)
|
||||
{
|
||||
case PARTY_ACTION_SOFTBOILED - 3:
|
||||
case PARTY_ACTION_SOFTBOILED:
|
||||
if (IsSelectedMonNotEgg((u8*)slotPtr))
|
||||
{
|
||||
PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]);
|
||||
Task_TryUseSoftboiledOnPartyMon(taskId);
|
||||
}
|
||||
break;
|
||||
case PARTY_ACTION_USE_ITEM - 3:
|
||||
case PARTY_ACTION_USE_ITEM:
|
||||
if (IsSelectedMonNotEgg((u8*)slotPtr))
|
||||
{
|
||||
if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_BATTLE)
|
||||
@ -1240,7 +1240,7 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr)
|
||||
gItemUseCB(taskId, Task_ClosePartyMenuAfterText);
|
||||
}
|
||||
break;
|
||||
case PARTY_ACTION_MOVE_TUTOR - 3:
|
||||
case PARTY_ACTION_MOVE_TUTOR:
|
||||
if (IsSelectedMonNotEgg((u8*)slotPtr))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
@ -1248,7 +1248,7 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr)
|
||||
TryTutorSelectedMon(taskId);
|
||||
}
|
||||
break;
|
||||
case PARTY_ACTION_GIVE_MAILBOX_MAIL - 3:
|
||||
case PARTY_ACTION_GIVE_MAILBOX_MAIL:
|
||||
if (IsSelectedMonNotEgg((u8*)slotPtr))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
@ -1256,8 +1256,8 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr)
|
||||
TryGiveMailToSelectedMon(taskId);
|
||||
}
|
||||
break;
|
||||
case PARTY_ACTION_GIVE_ITEM - 3:
|
||||
case PARTY_ACTION_GIVE_PC_ITEM - 3:
|
||||
case PARTY_ACTION_GIVE_ITEM:
|
||||
case PARTY_ACTION_GIVE_PC_ITEM:
|
||||
if (IsSelectedMonNotEgg((u8*)slotPtr))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
@ -1265,23 +1265,23 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr)
|
||||
TryGiveItemOrMailToSelectedMon(taskId);
|
||||
}
|
||||
break;
|
||||
case PARTY_ACTION_SWITCH - 3:
|
||||
case PARTY_ACTION_SWITCH:
|
||||
PlaySE(SE_SELECT);
|
||||
SwitchSelectedMons(taskId);
|
||||
break;
|
||||
case PARTY_ACTION_CHOOSE_AND_CLOSE - 3:
|
||||
case PARTY_ACTION_CHOOSE_AND_CLOSE:
|
||||
PlaySE(SE_SELECT);
|
||||
Task_ClosePartyMenu(taskId);
|
||||
break;
|
||||
case PARTY_ACTION_MINIGAME - 3:
|
||||
case PARTY_ACTION_MINIGAME:
|
||||
if (IsSelectedMonNotEgg((u8*)slotPtr))
|
||||
{
|
||||
TryEnterMonForMinigame(taskId, (u8)*slotPtr);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
case PARTY_ACTION_ABILITY_PREVENTS - 3:
|
||||
case PARTY_ACTION_SWITCHING - 3:
|
||||
case PARTY_ACTION_ABILITY_PREVENTS:
|
||||
case PARTY_ACTION_SWITCHING:
|
||||
PlaySE(SE_SELECT);
|
||||
Task_TryCreateSelectionWindow(taskId);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user