diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-02-15 12:37:03 +0000 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-02-15 12:37:03 +0000 |
commit | b152e7e73348473517a58f3ad005fbc3d89fc541 (patch) | |
tree | 7ac8b227fb6ab4e89902769906382ae5330259d7 /src/map/trade.c | |
parent | 6841ab57286c04fce48224c91142d48503ab4cc1 (diff) | |
download | tmwa-b152e7e73348473517a58f3ad005fbc3d89fc541.tar.gz tmwa-b152e7e73348473517a58f3ad005fbc3d89fc541.tar.bz2 tmwa-b152e7e73348473517a58f3ad005fbc3d89fc541.tar.xz tmwa-b152e7e73348473517a58f3ad005fbc3d89fc541.zip |
Allow shop parsing to continue after bad item name
Diffstat (limited to 'src/map/trade.c')
-rw-r--r-- | src/map/trade.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/trade.c b/src/map/trade.c index 5192a08..5f924e0 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -252,11 +252,15 @@ void trade_tradecommit(struct map_session_data *sd) if( (sd->deal_locked >=1) && (target_sd->deal_locked >=1) ){ // both have pressed 'ok' if(sd->deal_locked < 2) {sd->deal_locked=2;} // set locked to 2 if(target_sd->deal_locked==2) { // the other one pressed 'trade' too - if(sd->deal_zeny) { - if (sd->deal_zeny > sd->status.zeny) trade_tradecancel(sd); + if(sd->deal_zeny > sd->status.zeny) { + sd->deal_zeny = 0; + trade_tradecancel(sd); + return; } - if(target_sd->deal_zeny) { - if (target_sd->deal_zeny > target_sd->status.zeny) trade_tradecancel(sd); + if(target_sd->deal_zeny > target_sd->status.zeny) { + target_sd->deal_zeny = 0; + trade_tradecancel(sd); + return; } for(trade_i=0; trade_i<10;trade_i++) { if(sd->deal_item_amount[trade_i] != 0) { |