Remove redundant calls to GetMonData in pokemon.c
This commit is contained in:
parent
85197eda5e
commit
c2f9162b1c
1 changed files with 0 additions and 8 deletions
|
@ -3985,12 +3985,8 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
|||
if (dataUnsigned != CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), temp2))
|
||||
{
|
||||
dataUnsigned += itemEffect[itemEffectParam];
|
||||
moveId = GetMonData(mon, MON_DATA_MOVE1 + temp2, NULL); // Redundant
|
||||
if (dataUnsigned > CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), temp2))
|
||||
{
|
||||
moveId = GetMonData(mon, MON_DATA_MOVE1 + temp2, NULL); // Redundant
|
||||
dataUnsigned = CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), temp2);
|
||||
}
|
||||
SetMonData(mon, MON_DATA_PP1 + temp2, &dataUnsigned);
|
||||
retVal = FALSE;
|
||||
}
|
||||
|
@ -4006,12 +4002,8 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
|||
if (dataUnsigned != CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex))
|
||||
{
|
||||
dataUnsigned += itemEffect[itemEffectParam++];
|
||||
moveId = GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL); // Redundant
|
||||
if (dataUnsigned > CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex))
|
||||
{
|
||||
moveId = GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL); // Redundant
|
||||
dataUnsigned = CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex);
|
||||
}
|
||||
SetMonData(mon, MON_DATA_PP1 + moveIndex, &dataUnsigned);
|
||||
retVal = FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue