mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Don't modify the balance directly
This commit is contained in:
@@ -358,7 +358,8 @@ public class BlackjackCommand : ICommand
|
|||||||
|
|
||||||
// Double the wager
|
// Double the wager
|
||||||
var additionalWager = wager.WagerAmount;
|
var additionalWager = wager.WagerAmount;
|
||||||
gambler.Balance -= additionalWager;
|
await Money.ModifyBalanceAsync(gambler.Id, -additionalWager, TransactionSourceEventType.Gambling,
|
||||||
|
$"Double down for {wager.Id}", ct: ctx);
|
||||||
wager.WagerAmount *= 2;
|
wager.WagerAmount *= 2;
|
||||||
wager.WagerEffect -= additionalWager; // Subtract the additional wager
|
wager.WagerEffect -= additionalWager; // Subtract the additional wager
|
||||||
gameState.HasDoubledDown = true;
|
gameState.HasDoubledDown = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user