Apply suggestions from code review
This commit is contained in:
parent
0266d3ff82
commit
07a4576ff3
1 changed files with 2 additions and 2 deletions
|
@ -5180,7 +5180,7 @@ static void CB2_ReturnToPartyMenuWhileLearningMove(void)
|
|||
{
|
||||
if (sFinalLevel != 0)
|
||||
SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sFinalLevel); // to avoid displaying incorrect level
|
||||
if (gSpecialVar_ItemId >= ITEM_RARE_CANDY && gSpecialVar_ItemId <= ITEM_DYNAMAX_CANDY && gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD && CheckBagHasItem(gSpecialVar_ItemId, 1))
|
||||
if (ItemId_GetFieldFunc(gSpecialVar_ItemId) == ItemUseOutOfBattle_RareCandy && gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD && CheckBagHasItem(gSpecialVar_ItemId, 1))
|
||||
InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_USE_ITEM, TRUE, PARTY_MSG_NONE, Task_ReturnToPartyMenuWhileLearningMove, gPartyMenu.exitCallback);
|
||||
else
|
||||
InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, TRUE, PARTY_MSG_NONE, Task_ReturnToPartyMenuWhileLearningMove, gPartyMenu.exitCallback);
|
||||
|
@ -5511,7 +5511,7 @@ static void PartyMenuTryEvolution(u8 taskId)
|
|||
if (targetSpecies != SPECIES_NONE)
|
||||
{
|
||||
FreePartyPointers();
|
||||
if (gSpecialVar_ItemId >= ITEM_RARE_CANDY && gSpecialVar_ItemId <= ITEM_DYNAMAX_CANDY && gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD && CheckBagHasItem(gSpecialVar_ItemId, 1))
|
||||
if (ItemId_GetFieldFunc(gSpecialVar_ItemId) == ItemUseOutOfBattle_RareCandy && gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD && CheckBagHasItem(gSpecialVar_ItemId, 1))
|
||||
gCB2_AfterEvolution = CB2_ReturnToPartyMenuUsingRareCandy;
|
||||
else
|
||||
gCB2_AfterEvolution = gPartyMenu.exitCallback;
|
||||
|
|
Loading…
Reference in a new issue