Updated tutorial for compatibility with pokeemerald-expansion + specify where to place CB2_ReturnToPartyMenuUsingRareCandy.

Eduardo Quezada D'Ottone 2022-08-09 18:15:27 -04:00
parent f5457905b2
commit 27a1a0ab95
1 changed files with 5 additions and 1 deletions

@ -105,7 +105,11 @@ You may also want to use this for Rare Candies, so what you have to do is find `
static void PartyMenuTryEvolution(u8 taskId)
{
struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId];
#ifdef POKEMON_EXPANSION
u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_NORMAL, ITEM_NONE, NULL);
#else
u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_NORMAL, ITEM_NONE);
#endif
if (targetSpecies != SPECIES_NONE)
{
@ -126,7 +130,7 @@ static void PartyMenuTryEvolution(u8 taskId)
}
}
```
Then add the function, `CB2_ReturnToPartyMenuUsingRareCandy`, somewhere in the file:
Then add the function, `CB2_ReturnToPartyMenuUsingRareCandy`, somewhere in the file above `PartyMenuTryEvolution`:
```c
static void CB2_ReturnToPartyMenuUsingRareCandy(void)
{