commit 725d543f5b93f23f0392fa538a184cd8aa597707
parent 9eb920304a4ac70b992ea8d46645cf1c4f3581fd
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Sun, 17 Dec 2023 05:41:55 -0500
cleanup
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -145,6 +145,7 @@ func (p *PokerPlayer) refundPartialBet(db *database.DkfDB, pokerTableID int64, d
func (p *PokerPlayer) doBet(db *database.DkfDB, pokerTableID int64, bet database.PokerChip) {
_ = db.PokerTableAccountBet(p.UserID, pokerTableID, bet)
+ p.GameBet += bet
p.Bet += bet
p.Cash -= bet
}
@@ -167,7 +168,6 @@ func (p *PokerPlayer) refundBet(db *database.DkfDB, pokerTableID int64) {
func (p *PokerPlayer) doBetAndNotif(db *database.DkfDB, pokerTableID int64, bet database.PokerChip, roomTopic string) {
p.doBet(db, pokerTableID, bet)
- p.GameBet += bet
PokerPubSub.Pub(roomTopic, PlayerBetEvent{PlayerSeatIdx: p.SeatIdx, Player: p.Username, Bet: bet, TotalBet: p.GetBet(), Cash: p.GetCash()})
}