Add checking for correct status in crash game

This commit is contained in:
Hepatica
2024-04-21 15:27:25 +02:00
parent 6ab6c881b4
commit 3912f4c313

View File

@@ -144,13 +144,13 @@ export default {
console.error(e) console.error(e)
} }
if (this.crashObject.Status === 'GameEnd' && this.startGame === true && this.crashObject.Players.some(player => player.UserName === GetCookie('SpUserName'))) { if (this.crashObject.Status === 'MoneyPaid' && this.startGame === true && this.crashObject.Players.some(player => player.UserName === GetCookie('SpUserName'))) {
this.startGame = false this.startGame = false
this.updateUserMoney() this.updateUserMoney()
} }
if ( if (
this.crashObject.Players.some(player => this.crashObject.Players.some(player =>
player.UserName === GetCookie('SpUserName') && player.UserGameState !== 'Win' player.UserName === GetCookie('SpUserName') && (player.UserGameState !== 'Win'|| player.UserGameState !== 'MoneyPaid')
) && ) &&
this.startGame === false && this.startGame === false &&
this.crashObject.Status !== 'GameEnd' this.crashObject.Status !== 'GameEnd'