Fixed Trainer class ball not assigned to second Pokémon (#3203)

This commit is contained in:
Eclipse 2023-08-05 04:56:05 +02:00 committed by GitHub
parent dc1d44eefd
commit 5226935857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1964,7 +1964,6 @@ u8 CreateNPCTrainerPartyFromTrainer(struct Pokemon *party, const struct Trainer
u8 fixedIV;
s32 i, j;
u8 monsCount;
s32 ball = -1;
if (battleTypeFlags & BATTLE_TYPE_TRAINER && !(battleTypeFlags & (BATTLE_TYPE_FRONTIER
| BATTLE_TYPE_EREADER_TRAINER
| BATTLE_TYPE_TRAINER_HILL)))
@ -1986,6 +1985,7 @@ u8 CreateNPCTrainerPartyFromTrainer(struct Pokemon *party, const struct Trainer
for (i = 0; i < monsCount; i++)
{
s32 ball = -1;
u32 personalityHash = GeneratePartyHash(trainer, i);
if (trainer->doubleBattle == TRUE)
personalityValue = 0x80;