From 2fb3c8551e25f0a545612edf8a57f3311af71721 Mon Sep 17 00:00:00 2001 From: panikon Date: Tue, 17 Jun 2014 16:41:31 -0300 Subject: Removed ZENY_HACKER according to issue 295 (github) Documented impossible_trade_check --- src/map/trade.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/map/trade.c') diff --git a/src/map/trade.c b/src/map/trade.c index 8bb47e0cb..b3960bef9 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -166,11 +166,13 @@ void trade_tradeack(struct map_session_data *sd, int type) { clif->tradestart(sd, type); } -/*========================================== - * Check here hacker for duplicate item in trade - * normal client refuse to have 2 same types of item (except equipment) in same trade window - * normal client authorize only no equipped item and only from inventory - *------------------------------------------*/ +/** + * Checks if an impossible trade will occur + * Normal clients refuse to have 2 same types of item (except equipament) in the same trade window + * Normal clients authorize only no equipped items and only items from inventory + * @retval 0 The trade can continue + * @retval 1 Hack attempt + **/ int impossible_trade_check(struct map_session_data *sd) { struct item inventory[MAX_INVENTORY]; @@ -179,10 +181,8 @@ int impossible_trade_check(struct map_session_data *sd) nullpo_retr(1, sd); - if(sd->deal.zeny > sd->status.zeny) { - pc_setglobalreg(sd,script->add_str("ZENY_HACKER"),1); - return -1; - } + if( sd->deal.zeny > sd->status.zeny ) + return 1; // get inventory of player memcpy(&inventory, &sd->status.inventory, sizeof(struct item) * MAX_INVENTORY); -- cgit v1.2.3-60-g2f50