summaryrefslogtreecommitdiff
path: root/src/map/trade.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/trade.c')
-rw-r--r--src/map/trade.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/trade.c b/src/map/trade.c
index f6c587ddb..e4bb4a4b1 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -162,7 +162,7 @@ int impossible_trade_check(struct map_session_data *sd) {
nullpo_retr(1, sd);
- if(sd->deal.zeny > sd->status.zeny)
+ if(sd->deal.zeny > sd->status.zeny)
{
pc_setglobalreg(sd,"ZENY_HACKER",1);
return -1;
@@ -223,6 +223,9 @@ int trade_check(struct map_session_data *sd, struct map_session_data *tsd) {
struct item_data *data;
int trade_i, i, amount, n;
+ if(sd->state.finalsave || tsd->state.finalsave)
+ return 0; //Item transferring fails
+
// check zenys value against hackers (Zeny was already checked on time of adding, but you never know when you lost some zeny since then.
if(sd->deal.zeny > sd->status.zeny || (tsd->status.zeny > MAX_ZENY - sd->deal.zeny))
return 0;