diff options
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/pc.c | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 0711b713f..f7ca75961 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -1,5 +1,7 @@ Date Added +2011/04/05 + * 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). [Ai4rei] 2011/03/29 * Added TargetName values to VS2010 project files to prevent MSB8012 warnings (follow-up to r14562). [Gepard] 2011/03/28 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; |