[Bug] Fix shiny save bug (#5780)

Correctly determine shininess and variant during saving
This commit is contained in:
Xavion3 2025-05-06 07:34:35 +10:00 committed by GitHub
parent bd913a201c
commit a3039ef6a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,8 +91,8 @@ export default class PokemonData {
this.formIndex = Math.max(Math.min(source.formIndex, getPokemonSpecies(this.species).forms.length - 1), 0);
this.abilityIndex = source.abilityIndex;
this.passive = source.passive;
this.shiny = sourcePokemon?.isShiny() ?? source.shiny;
this.variant = sourcePokemon?.getVariant() ?? source.variant;
this.shiny = source.shiny;
this.variant = source.variant;
this.pokeball = source.pokeball ?? PokeballType.POKEBALL;
this.level = source.level;
this.exp = source.exp;