mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 06:19:29 +02:00
Thank you Torranx
This commit is contained in:
parent
91c505476a
commit
1f72a802ec
@ -173,16 +173,18 @@ export class GameOverPhase extends BattlePhase {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Added a local check to see if the game is running offline on victory
|
/* Added a local check to see if the game is running offline
|
||||||
If Online, execute apiFetch as intended
|
If Online, execute apiFetch as intended
|
||||||
If Offline, execute offlineNewClear(), a localStorage implementation of newClear daily run checks */
|
If Offline, execute offlineNewClear() only for victory, a localStorage implementation of newClear daily run checks */
|
||||||
if (!Utils.isLocal || Utils.isLocalServerConnected) {
|
if (!Utils.isLocal || Utils.isLocalServerConnected) {
|
||||||
pokerogueApi.savedata.session.newclear({ slot: this.scene.sessionSlotId, isVictory: this.isVictory, clientSessionId: clientSessionId })
|
pokerogueApi.savedata.session.newclear({ slot: this.scene.sessionSlotId, isVictory: this.isVictory, clientSessionId: clientSessionId })
|
||||||
.then((success) => doGameOver(!!success));
|
.then((success) => doGameOver(!!success));
|
||||||
} else {
|
} else {
|
||||||
this.scene.gameData.offlineNewClear(this.scene).then(result => {
|
if (this.isVictory) {
|
||||||
doGameOver(result);
|
this.scene.gameData.offlineNewClear(this.scene).then(result => {
|
||||||
});
|
doGameOver(result);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user