From d2c373ca6405fd3654198fcc730f6bec6139ad9c Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Wed, 11 Feb 2009 10:13:10 +0000 Subject: Cancel trade when not enough GP is available --- src/map/trade.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2