mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-04 02:10:01 +01:00
Fixed call to sExpCandyExperienceTable
This commit is contained in:
parent
6b414d9555
commit
57d583b783
@ -4894,7 +4894,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
|||||||
else if (param < ARRAY_COUNT(sExpCandyExperienceTable)) // EXP Candies
|
else if (param < ARRAY_COUNT(sExpCandyExperienceTable)) // EXP Candies
|
||||||
{
|
{
|
||||||
u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL);
|
u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL);
|
||||||
dataUnsigned = sExpCandyExperienceTable[param] + GetMonData(mon, MON_DATA_EXP, NULL);
|
dataUnsigned = sExpCandyExperienceTable[param - 1] + GetMonData(mon, MON_DATA_EXP, NULL);
|
||||||
if (dataUnsigned > gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL])
|
if (dataUnsigned > gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL])
|
||||||
dataUnsigned = gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL];
|
dataUnsigned = gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user