From 0d8c3857c9e39e421be0f516b98ea1d79e480490 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Tue, 5 Apr 2011 08:14:54 +0000 Subject: * Paying and obtaining Zeny (pc_payzeny/pc_getzeny) no longer silently reverses the effect for negative amounts, that is, getting Zeny instead of paying up and vice versa (since r8273, related r8072). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14766 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index aac8b45ec..3006b2138 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3245,7 +3245,10 @@ int pc_payzeny(struct map_session_data *sd,int zeny) nullpo_ret(sd); if( zeny < 0 ) - return pc_getzeny(sd, -zeny); + { + ShowError("pc_payzeny: Paying negative Zeny (zeny=%d, account_id=%d, char_id=%d).\n", zeny, sd->status.account_id, sd->status.char_id); + return 1; + } if( sd->status.zeny < zeny ) return 1; //Not enough. @@ -3301,7 +3304,10 @@ int pc_getzeny(struct map_session_data *sd,int zeny) nullpo_ret(sd); if( zeny < 0 ) - return pc_payzeny(sd, -zeny); + { + ShowError("pc_getzeny: Obtaining negative Zeny (zeny=%d, account_id=%d, char_id=%d).\n", zeny, sd->status.account_id, sd->status.char_id); + return 1; + } if( zeny > MAX_ZENY - sd->status.zeny ) zeny = MAX_ZENY - sd->status.zeny; -- cgit v1.2.3-70-g09d2