mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-15 18:42:44 -04:00
Return new balance when it's modified and use that for display so it accounts for concurrent games
This commit is contained in:
@@ -247,15 +247,13 @@ public class LambchopCommand : ICommand
|
||||
{
|
||||
var multi = LambchopPayoutMultiplier(targetTile);
|
||||
var lambchopPayout = Math.Round(wager * multi - wager, 2);
|
||||
await Money.NewWagerAsync(gambler.Id, wager, lambchopPayout, WagerGame.LambChop, ct: ctx);
|
||||
newBalance = gambler.Balance + lambchopPayout;
|
||||
newBalance = await Money.NewWagerAsync(gambler.Id, wager, lambchopPayout, WagerGame.LambChop, ct: ctx);
|
||||
lambchopResultMessage = $"{user.FormatUsername()}, you [B][COLOR={colors[BuiltIn.Keys.KiwiFarmsGreenColor].Value}]WON[/COLOR][/B]" +
|
||||
$" | Multi {multi} | Balance {await newBalance.FormatKasinoCurrencyAsync()}";
|
||||
}
|
||||
else
|
||||
{
|
||||
await Money.NewWagerAsync(gambler.Id, wager, -wager, WagerGame.LambChop, ct: ctx);
|
||||
newBalance = gambler.Balance - wager;
|
||||
newBalance = await Money.NewWagerAsync(gambler.Id, wager, -wager, WagerGame.LambChop, ct: ctx);
|
||||
lambchopResultMessage = $"{user.FormatUsername()}, you [B][COLOR={colors[BuiltIn.Keys.KiwiFarmsGreenColor].Value}]LOST[/COLOR][/B]" +
|
||||
$", better luck next time | Balance {await newBalance.FormatKasinoCurrencyAsync()}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user