Switch back to only taking losses when they're losses, instead of taking payin
and then giving it back after the roulette spin
This commit is contained in:
parent
db5d9fdb42
commit
7508b0f5e7
1 changed files with 4 additions and 5 deletions
|
@ -551,8 +551,6 @@ class Module(ModuleManager.BaseModule):
|
|||
raise utils.EventError("%s: You don't have enough coins to bet" %
|
||||
event["user"].nickname)
|
||||
|
||||
payin = sum(bet_amounts)
|
||||
self._take(event["server"], event["user"], payin, wallet_in)
|
||||
# black, red, odds, evens, low (1-18), high (19-36)
|
||||
# 1dozen (1-12), 2dozen (13-24), 3dozen (25-36)
|
||||
# 1column (1,4..34), 2column (2,5..35), 3column (3,6..36)
|
||||
|
@ -621,9 +619,7 @@ class Module(ModuleManager.BaseModule):
|
|||
if odds == 0:
|
||||
losses[bet] = bet_amounts[i]
|
||||
else:
|
||||
win_amount = bet_amounts[i]
|
||||
win_amount += bet_amounts[i]*odds
|
||||
winnings[bet] = [odds, win_amount]
|
||||
winnings[bet] = [odds, bet_amounts[i]]
|
||||
|
||||
winnings_str = ["%s for %s (%d to 1)" % (winnings[bet][1], bet,
|
||||
winnings[bet][0]) for bet in winnings.keys()]
|
||||
|
@ -634,6 +630,9 @@ class Module(ModuleManager.BaseModule):
|
|||
if coin_winnings:
|
||||
self._give(event["server"], event["user"], coin_winnings,
|
||||
wallet_out)
|
||||
if coin_losses:
|
||||
self._take(event["server"], event["user"], coin_losses,
|
||||
wallet_in)
|
||||
|
||||
total_winnings_str = " (%s total)" % coin_winnings if len(
|
||||
winnings.keys()) > 1 else ""
|
||||
|
|
Loading…
Reference in a new issue