Fix update issue for battle stats display
parent
7a418109c3
commit
89e2642d91
|
@ -498,11 +498,14 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||||
this.lastLevel = pokemon.level;
|
this.lastLevel = pokemon.level;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pokemon.summonData) {
|
const battleStats = pokemon.summonData
|
||||||
const battleStats = pokemon.summonData.battleStats.join('');
|
? pokemon.summonData.battleStats
|
||||||
|
: battleStatOrder.map(() => 0);
|
||||||
if (this.lastBattleStats !== battleStats)
|
const battleStatsStr = battleStats.join('');
|
||||||
this.updateBattleStats(pokemon.summonData.battleStats);
|
|
||||||
|
if (this.lastBattleStats !== battleStatsStr) {
|
||||||
|
this.updateBattleStats(battleStats);
|
||||||
|
this.lastBattleStats = battleStatsStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.shinyIcon.setVisible(pokemon.isShiny());
|
this.shinyIcon.setVisible(pokemon.isShiny());
|
||||||
|
|
Loading…
Reference in New Issue