diff options
Diffstat (limited to 'src/map/trade.cpp')
-rw-r--r-- | src/map/trade.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/map/trade.cpp b/src/map/trade.cpp index 5ec63c9..bc6e98f 100644 --- a/src/map/trade.cpp +++ b/src/map/trade.cpp @@ -174,7 +174,7 @@ void trade_tradeadditem(dumb_ptr<map_session_data> sd, IOff2 index, int amount) sd->status.inventory[index.unshift()].nameid) continue; - if OPTION_IS_SOME_INLOOP(id, target_sd->inventory_data[i]) + OMATCH_BEGIN_SOME (id, target_sd->inventory_data[i]) { if (id->type != ItemType::WEAPON && id->type != ItemType::ARMOR @@ -182,9 +182,12 @@ void trade_tradeadditem(dumb_ptr<map_session_data> sd, IOff2 index, int amount) && id->type != ItemType::_8) { free_++; - break; + goto break_outer1; } } + OMATCH_END (); + break_outer1: + break; } if (target_sd->weight + trade_weight > @@ -231,7 +234,7 @@ void trade_tradeadditem(dumb_ptr<map_session_data> sd, IOff2 index, int amount) sd->status. inventory[sd->deal_item_index[trade_i].unshift()].nameid) continue; - if OPTION_IS_SOME_INLOOP(id, target_sd->inventory_data[i]) + OMATCH_BEGIN_SOME (id, target_sd->inventory_data[i]) { if (id->type != ItemType::WEAPON && id->type != ItemType::ARMOR @@ -239,9 +242,12 @@ void trade_tradeadditem(dumb_ptr<map_session_data> sd, IOff2 index, int amount) && id->type != ItemType::_8) { free_++; - break; + goto break_outer2; } } + OMATCH_END (); + break_outer2: + break; } } // used a slot, but might be cancelled out by stackable checks above |