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/chicken.c | |
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/chicken.c')
-rw-r--r-- | mbbsd/chicken.c | 15 |
1 files changed, 9 insertions, 6 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': |