Fixed tutors changing levels
This commit is contained in:
parent
2cd01bd95d
commit
494e8791d7
1 changed files with 6 additions and 1 deletions
|
@ -5040,7 +5040,8 @@ static void CB2_ShowSummaryScreenToForgetMove(void)
|
||||||
|
|
||||||
static void CB2_ReturnToPartyMenuWhileLearningMove(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);
|
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];
|
struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId];
|
||||||
u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_NORMAL, ITEM_NONE, NULL);
|
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)
|
if (targetSpecies != SPECIES_NONE)
|
||||||
{
|
{
|
||||||
FreePartyPointers();
|
FreePartyPointers();
|
||||||
|
|
Loading…
Reference in a new issue