Fix crash related to weather and issue with level up stats
This commit is contained in:
1 parent
5a1de4d9a5
commit
5ab3b2dab6
4 files changed
+15
-13
No files matched your search
@@ -105,8 +105,8 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
|
||||
super.clear();
|
||||
}
|
||||
|
||||
promptLevelUpStats(prevStats: integer[], showTotals: boolean, callback?: Function) {
|
||||
const newStats = (this.scene as BattleScene).getPlayerPokemon().stats;
|
||||
promptLevelUpStats(partyMemberIndex: integer, prevStats: integer[], showTotals: boolean, callback?: Function) {
|
||||
const newStats = (this.scene as BattleScene).getParty()[partyMemberIndex].stats;
|
||||
let levelUpStatsValuesText = '';
|
||||
const stats = Utils.getEnumValues(Stat);
|
||||
for (let s of stats)
|
||||
@@ -117,7 +117,7 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
|
||||
this.awaitingActionInput = true;
|
||||
this.onActionInput = () => {
|
||||
if (!showTotals)
|
||||
this.promptLevelUpStats(null, true, callback);
|
||||
this.promptLevelUpStats(partyMemberIndex, null, true, callback);
|
||||
else {
|
||||
this.levelUpStatsContainer.setVisible(false);
|
||||
if (callback)
|
||||
|
||||
Reference in new issue
Block a user