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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/trade.c b/src/map/trade.c
index 7fcfb41..5505e68 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -277,7 +277,7 @@ void trade_tradecommit(struct map_session_data *sd)
}
}
if(sd->deal_zeny) {
- if (sd->deal_zeny > sd->status.zeny) sd->deal_zeny = sd->status.zeny;
+ if (sd->deal_zeny > sd->status.zeny) trade_tradecancel(sd);
sd->status.zeny -= sd->deal_zeny;
clif_updatestatus(sd,SP_ZENY);
target_sd->status.zeny += sd->deal_zeny;
@@ -285,7 +285,7 @@ void trade_tradecommit(struct map_session_data *sd)
sd->deal_zeny=0;
}
if(target_sd->deal_zeny) {
- if (target_sd->deal_zeny > target_sd->status.zeny) target_sd->deal_zeny = target_sd->status.zeny;
+ if (target_sd->deal_zeny > target_sd->status.zeny) trade_tradecancel(sd);
target_sd->status.zeny -= target_sd->deal_zeny;
clif_updatestatus(target_sd,SP_ZENY);
sd->status.zeny += target_sd->deal_zeny;