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;
|
wager.Multiplier = multiplier;
|
||||||
await _dbContext.SaveChangesAsync(ctx);
|
await _dbContext.SaveChangesAsync(ctx);
|
||||||
var balanceAdjustment = finalEffect + wager.WagerAmount;
|
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);
|
$"Blackjack outcome from wager {wager.Id}", null, ctx);
|
||||||
|
|
||||||
// Display result
|
// Display result
|
||||||
@@ -465,7 +465,7 @@ public class BlackjackCommand : ICommand
|
|||||||
message += $"You lost {await Math.Abs(finalEffect).FormatKasinoCurrencyAsync()}! ";
|
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);
|
await botInstance.SendChatMessageAsync(message, true, autoDeleteAfter: cleanupDelay);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user