From 494e8791d742f72273f65bf7edef9b240f05d38e Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 30 Aug 2022 21:18:54 -0400 Subject: [PATCH] Fixed tutors changing levels --- src/party_menu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/party_menu.c b/src/party_menu.c index 00224f6bd6..4d7f24883a 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5040,7 +5040,8 @@ static void CB2_ShowSummaryScreenToForgetMove(void) static void CB2_ReturnToPartyMenuWhileLearningMove(void) { - SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sFinalLevel); // to avoid displaying incorrect level + if (sFinalLevel != 0) + SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sFinalLevel); // to avoid displaying incorrect level InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, TRUE, PARTY_MSG_NONE, Task_ReturnToPartyMenuWhileLearningMove, gPartyMenu.exitCallback); } @@ -5313,6 +5314,10 @@ static void PartyMenuTryEvolution(u8 taskId) struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_NORMAL, ITEM_NONE, NULL); + // Resets values to 0 so other means of teaching moves doesn't overwrite levels + sInitialLevel = 0; + sFinalLevel = 0; + if (targetSpecies != SPECIES_NONE) { FreePartyPointers();