Fix excessive payouts due to not subtracting wager

This commit is contained in:
barelyprofessional
2026-02-23 12:26:26 -06:00
parent 81a6f0fdd5
commit 7779189cee

View File

@@ -193,9 +193,9 @@ public class KenoCommand : ICommand
}
//you win
var win = wager * (decimal)payoutMulti;
var win = (wager * (decimal)payoutMulti) - wager;
// Required to avoid compiler errors when trying to format it in the win message
newBalance = await Money.NewWagerAsync(gambler.Id, wager, wager * (decimal)payoutMulti, WagerGame.Keno, ct: ctx);
newBalance = await Money.NewWagerAsync(gambler.Id, wager, win, WagerGame.Keno, ct: ctx);
await botInstance.SendChatMessageAsync(
$"{user.FormatUsername()}, you [color={colors[BuiltIn.Keys.KiwiFarmsGreenColor].Value}]won {await win.FormatKasinoCurrencyAsync()} with a {payoutMulti}x multi![/color]. Your balance is now: {await newBalance.FormatKasinoCurrencyAsync()}.",
true, autoDeleteAfter: cleanupDelay);