diff options
author | yenatch <yenatch@gmail.com> | 2018-04-18 21:54:39 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2018-04-18 21:54:39 -0400 |
commit | ff339287bfd16b39fad498c7866f2b5a29e38063 (patch) | |
tree | 9f029d2cd3b19f6ed4e7b5ddb957d805a09ba3ec | |
parent | 460fcf567ee43ccacb56da7b9fbbac58d4352008 (diff) |
use SPECIES_OLD_UNOWN constants in SpeciesToCryId
-rw-r--r-- | src/pokemon_3.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pokemon_3.c b/src/pokemon_3.c index ac739728e..abf1ef9c6 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -460,13 +460,13 @@ u16 HoennToNationalOrder(u16 hoennNum) u16 SpeciesToCryId(u16 species) { - if (species <= 250) + if (species < SPECIES_OLD_UNOWN_B - 1) return species; - if (species < 276) - return 200; + if (species <= SPECIES_OLD_UNOWN_Z - 1) + return SPECIES_UNOWN - 1; - return gSpeciesIdToCryId[species - 276]; + return gSpeciesIdToCryId[species - ((SPECIES_OLD_UNOWN_Z + 1) - 1)]; } void unref_sub_803F938(u16 species, u32 personality, u8 *dest) |