mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Fix balance display on win
This commit is contained in:
@@ -447,7 +447,7 @@ public class BlackjackCommand : ICommand
|
||||
wager.Multiplier = multiplier;
|
||||
await _dbContext.SaveChangesAsync(ctx);
|
||||
var balanceAdjustment = finalEffect + wager.WagerAmount;
|
||||
await Money.ModifyBalanceAsync(gambler.Id, balanceAdjustment, TransactionSourceEventType.Gambling,
|
||||
var newBalance = await Money.ModifyBalanceAsync(gambler.Id, balanceAdjustment, TransactionSourceEventType.Gambling,
|
||||
$"Blackjack outcome from wager {wager.Id}", null, ctx);
|
||||
|
||||
// Display result
|
||||
@@ -465,7 +465,7 @@ public class BlackjackCommand : ICommand
|
||||
message += $"You lost {await Math.Abs(finalEffect).FormatKasinoCurrencyAsync()}! ";
|
||||
}
|
||||
|
||||
message += $"Balance: {await gambler.Balance.FormatKasinoCurrencyAsync()}";
|
||||
message += $"Balance: {await newBalance.FormatKasinoCurrencyAsync()}";
|
||||
|
||||
await botInstance.SendChatMessageAsync(message, true, autoDeleteAfter: cleanupDelay);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user