summaryrefslogtreecommitdiff
path: root/src/script_pokemon_util.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-10-08 10:38:29 -0400
committerGitHub <noreply@github.com>2021-10-08 10:38:29 -0400
commite26f9d10d7bebee5ea512fc4729ce6adafec66a0 (patch)
treeb868ba0c0b0618c38064037d840c52971ca10111 /src/script_pokemon_util.c
parent6012cf43cbfc27e37fedae41136e13a62ccdd61c (diff)
parent6e62c057f5123b458ebc7d74e60c7ce8fb32e980 (diff)
Merge pull request #1509 from GriffinRichards/doc-sprman
Document remaining symbols in pokemon.c
Diffstat (limited to 'src/script_pokemon_util.c')
-rwxr-xr-xsrc/script_pokemon_util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c
index 93a747772..07e86656e 100755
--- a/src/script_pokemon_util.c
+++ b/src/script_pokemon_util.c
@@ -65,17 +65,18 @@ u8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unused1, u32 unused2, u8 u
u8 heldItem[2];
struct Pokemon mon;
- CreateMon(&mon, species, level, USE_RANDOM_IVS, 0, 0, OT_ID_PLAYER_ID, 0);
+ CreateMon(&mon, species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0);
heldItem[0] = item;
heldItem[1] = item >> 8;
SetMonData(&mon, MON_DATA_HELD_ITEM, heldItem);
sentToPc = GiveMonToPlayer(&mon);
nationalDexNum = SpeciesToNationalPokedexNum(species);
+ // Don't set Pokédex flag for MON_CANT_GIVE
switch(sentToPc)
{
- case 0:
- case 1:
+ case MON_GIVEN_TO_PARTY:
+ case MON_GIVEN_TO_PC:
GetSetPokedexFlag(nationalDexNum, FLAG_SET_SEEN);
GetSetPokedexFlag(nationalDexNum, FLAG_SET_CAUGHT);
break;