[Bug] Fixed a bug where genderless and non shiny pokemon could show the new gender or shiny indicator (#2090)

This commit is contained in:
Opaque02 2024-06-12 01:34:11 +10:00 committed by GitHub
parent 00aaeb5947
commit 576bcf7bdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -222,6 +222,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
this.pokemonGenderNewText.setShadowColor(getTextColor(TextStyle.SUMMARY_BLUE, true, this.scene.uiTheme));
this.pokemonGenderNewText.setVisible((newGender & caughtAttr) === BigInt(0));
} else {
this.pokemonGenderNewText.setVisible(false);
this.pokemonGenderText.setVisible(false);
}
@ -312,6 +313,8 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
this.pokemonShinyNewIcon.setShadowColor(getTextColor(TextStyle.SUMMARY_BLUE, true, this.scene.uiTheme));
const newShinyOrVariant = ((newShiny & caughtAttr) === BigInt(0)) || ((newVariant & caughtAttr) === BigInt(0));
this.pokemonShinyNewIcon.setVisible(!!newShinyOrVariant);
} else {
this.pokemonShinyNewIcon.setVisible(false);
}
this.pokemonFusionShinyIcon.setPosition(this.pokemonShinyIcon.x, this.pokemonShinyIcon.y);