diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-12 12:19:57 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-12 12:19:57 +0800 |
commit | 2ec4b4b319a3403bfb9c38998ff1111b42f716f0 (patch) | |
tree | 6bf076c034d69e549f92a164732de59f1e46d8e2 /mbbsd/talk.c | |
parent | c78306e4c3f9d42acd182362bbbb5e13a06b840b (diff) | |
download | pttbbs-2ec4b4b319a3403bfb9c38998ff1111b42f716f0.tar pttbbs-2ec4b4b319a3403bfb9c38998ff1111b42f716f0.tar.gz pttbbs-2ec4b4b319a3403bfb9c38998ff1111b42f716f0.tar.bz2 pttbbs-2ec4b4b319a3403bfb9c38998ff1111b42f716f0.tar.lz pttbbs-2ec4b4b319a3403bfb9c38998ff1111b42f716f0.tar.xz pttbbs-2ec4b4b319a3403bfb9c38998ff1111b42f716f0.tar.zst pttbbs-2ec4b4b319a3403bfb9c38998ff1111b42f716f0.zip |
integrate two giving-money code
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3028 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/talk.c')
-rw-r--r-- | mbbsd/talk.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 06a366da..bcf16cf0 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -2657,21 +2657,10 @@ userlist(void) redrawall = redraw = 1; break; } - reload_money(); - - if (ch > cuser.money) { - outs(ANSI_COLOR(41) " 現金不足~~" ANSI_RESET); - } else { - deumoney(uentp->uid, ch - give_tax(ch)); - log_file(FN_MONEY, LOG_CREAT | LOG_VF, - "%s\t給%s\t%d\t(稅後 %d)\t%s\n", cuser.userid, - uentp->userid, ch, - ch-give_tax(ch), - ctime4(&currutmp->lastact)); - mail_redenvelop(cuser.userid, uentp->userid, - ch - give_tax(ch), 'Y'); - vmsgf(" 嗯..還剩下 %d 錢..", demoney(-ch)); - } + if (do_give_money(uentp->userid, uentp->uid, ch) < 0) + vmsgf("交易失敗,還剩下 %d 錢", SHM->money[usernum - 1]); + else + vmsgf("交易成功\,還剩下 %d 錢", SHM->money[usernum - 1]); } else { clrtoeol(); vmsg(" 交易取消! "); |