From 3912f4c3139413a3d162bc53f6feb657bccc9098 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 21 Apr 2024 15:27:25 +0200 Subject: [PATCH] Add checking for correct status in crash game --- luckydiamond/src/pages/games-pages/CrashgamePage.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luckydiamond/src/pages/games-pages/CrashgamePage.vue b/luckydiamond/src/pages/games-pages/CrashgamePage.vue index 5198ee6..a8a0fdf 100644 --- a/luckydiamond/src/pages/games-pages/CrashgamePage.vue +++ b/luckydiamond/src/pages/games-pages/CrashgamePage.vue @@ -144,13 +144,13 @@ export default { 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.updateUserMoney() } if ( 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.crashObject.Status !== 'GameEnd'