diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-02-11 10:13:10 +0000 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-02-11 10:13:10 +0000 |
commit | d2c373ca6405fd3654198fcc730f6bec6139ad9c (patch) | |
tree | e32f869d4310b4e90ad98eb056d48db7d2454cf3 /src/map/trade.c | |
parent | a4650533313a4dc74c77488f83132522506efb3d (diff) | |
download | tmwa-d2c373ca6405fd3654198fcc730f6bec6139ad9c.tar.gz tmwa-d2c373ca6405fd3654198fcc730f6bec6139ad9c.tar.bz2 tmwa-d2c373ca6405fd3654198fcc730f6bec6139ad9c.tar.xz tmwa-d2c373ca6405fd3654198fcc730f6bec6139ad9c.zip |
Cancel trade when not enough GP is available
Diffstat (limited to 'src/map/trade.c')
-rw-r--r-- | src/map/trade.c | 4 |
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; |