personality in Cmd_trysetcaughtmondexflags

voloved 2023-07-27 23:49:15 -04:00
parent 3ba229657d
commit cb55e4d9c1
1 changed files with 2 additions and 1 deletions

@ -768,8 +768,9 @@ index b22577455..b8605454e 100644
static void Cmd_trysetcaughtmondexflags(void) static void Cmd_trysetcaughtmondexflags(void)
{ {
- u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL); - u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL);
- u32 personality = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY, NULL);
+ u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_SPECIES, NULL); + u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_SPECIES, NULL);
u32 personality = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY, NULL); + u32 personality = GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_PERSONALITY, NULL);
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT)) if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT))
{ {