diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-04-27 21:00:16 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-04-27 21:00:16 +0800 |
commit | 9c1dc03dedf0a1d089e8cfb5076e71522e5ae2f5 (patch) | |
tree | 667ccd19a129016f734c3aed17485372f2d3fa2e /mbbsd | |
parent | 534420891bf94fd5ba7656c1b07cf94e8284a822 (diff) | |
download | pttbbs-9c1dc03dedf0a1d089e8cfb5076e71522e5ae2f5.tar pttbbs-9c1dc03dedf0a1d089e8cfb5076e71522e5ae2f5.tar.gz pttbbs-9c1dc03dedf0a1d089e8cfb5076e71522e5ae2f5.tar.bz2 pttbbs-9c1dc03dedf0a1d089e8cfb5076e71522e5ae2f5.tar.lz pttbbs-9c1dc03dedf0a1d089e8cfb5076e71522e5ae2f5.tar.xz pttbbs-9c1dc03dedf0a1d089e8cfb5076e71522e5ae2f5.tar.zst pttbbs-9c1dc03dedf0a1d089e8cfb5076e71522e5ae2f5.zip |
���L�����o��
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@810 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/chicken.c | 15 | ||||
-rw-r--r-- | mbbsd/gamble.c | 4 |
2 files changed, 11 insertions, 8 deletions
diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c index d1938791..2bc1e64c 100644 --- a/mbbsd/chicken.c +++ b/mbbsd/chicken.c @@ -1,4 +1,4 @@ -/* $Id: chicken.c,v 1.10 2003/01/16 12:59:48 kcwu Exp $ */ +/* $Id: chicken.c,v 1.11 2003/04/27 13:00:16 in2 Exp $ */ #include "bbs.h" #define NUM_KINDS 13 /* ¦³¦h¤ÖºØ°Êª« */ @@ -368,7 +368,7 @@ ch_hit() } void -ch_buyitem(int money, char *picture, int *item) +ch_buyitem(int money, char *picture, int *item, int haveticket) { int num = 0; char buf[5]; @@ -381,7 +381,10 @@ ch_buyitem(int money, char *picture, int *item) reload_money(); if (cuser.money > money * num) { *item += num; - vice(money * num, "ÁʶRÃdª«,½ä½L¶µ¥Ø"); + if( haveticket ) + vice(money * num, "ÁʶRÃdª«,½ä½L¶µ¥Ø"); + else + demoney(-money * num); show_file(picture, 5, 14, NO_RELOAD); } else { move(b_lines - 1, 0); @@ -768,7 +771,7 @@ select_menu() break; case '7': ch_buyitem(food_price[(int)mychicken->type], CHICKEN_PIC "/food", - &mychicken->food); + &mychicken->food, 1); break; case '8': ch_eatoo(); @@ -778,11 +781,11 @@ select_menu() break; case 'O': case 'o': - ch_buyitem(100, CHICKEN_PIC "/buyoo", &mychicken->oo); + ch_buyitem(100, CHICKEN_PIC "/buyoo", &mychicken->oo, 1); break; case 'M': case 'm': - ch_buyitem(10, CHICKEN_PIC "/buymedicine", &mychicken->medicine); + ch_buyitem(10, CHICKEN_PIC "/buymedicine", &mychicken->medicine, 1); break; case 'N': case 'n': diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c index b1643fb5..b6b0d61c 100644 --- a/mbbsd/gamble.c +++ b/mbbsd/gamble.c @@ -1,4 +1,4 @@ -/* $Id: gamble.c,v 1.32 2003/01/19 16:06:06 kcwu Exp $ */ +/* $Id: gamble.c,v 1.33 2003/04/27 13:00:16 in2 Exp $ */ #include "bbs.h" #ifndef _BBS_UTIL_C_ @@ -162,7 +162,7 @@ ticket(int bid) if (end || ch >= count || ch < 0) continue; n = 0; - ch_buyitem(price, "etc/buyticket", &n); + ch_buyitem(price, "etc/buyticket", &n, 0); if (n > 0) append_ticket_record(path, ch, n, count); } |