summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-04-05 08:14:54 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-04-05 08:14:54 +0000
commit0d8c3857c9e39e421be0f516b98ea1d79e480490 (patch)
tree7f94e97436aa02038666c6ffeb9d2e44e4153748 /src/map/pc.c
parentd841fc529949f361e915b73a073d1fa9d4ec60f7 (diff)
downloadhercules-0d8c3857c9e39e421be0f516b98ea1d79e480490.tar.gz
hercules-0d8c3857c9e39e421be0f516b98ea1d79e480490.tar.bz2
hercules-0d8c3857c9e39e421be0f516b98ea1d79e480490.tar.xz
hercules-0d8c3857c9e39e421be0f516b98ea1d79e480490.zip
* 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
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c10
1 files changed, 8 insertions, 2 deletions
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;