From 66a0e0e786412114be7e2439b816b2780601e016 Mon Sep 17 00:00:00 2001 From: scw Date: Wed, 4 Mar 2009 15:40:51 +0000 Subject: correct new gamble BM money function git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4447 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/gamble.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c index d749bf33..0b17a9c6 100644 --- a/mbbsd/gamble.c +++ b/mbbsd/gamble.c @@ -318,9 +318,12 @@ openticket(int bid) /* 還沒開完獎不能賭博 只要mv一項就好 */ if (bet != 98) { - int forBM = money * 0.0005; - if(forBM > 500) forBM = 500; + int forBM; money = total * price; + + forBM = money * 0.0005; + if(forBM > 500) forBM = 500; + demoney(forBM); mail_redenvelop("[賭場抽頭]", cuser.userid, forBM, NULL); money = ticket[bet] ? money * 0.95 / ticket[bet] : 9999999; -- cgit v1.2.3