diff options
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 20db3fe..8d1066d 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3383,9 +3383,6 @@ int pc_remove_items (struct map_session_data *player, int item_id, int count) nullpo_retr (0, player); - if (player->trade_partner != 0) - trade_tradecancel (player); - for (i = 0; i < MAX_INVENTORY && count; i++) { if (player->status.inventory[i].nameid == item_id) @@ -3476,6 +3473,9 @@ int pc_delitem (struct map_session_data *sd, int n, int amount, int type) { nullpo_retr (1, sd); + if (sd->trade_partner != 0) + trade_tradecancel (sd); + if (sd->status.inventory[n].nameid == 0 || amount <= 0 || sd->status.inventory[n].amount < amount || sd->inventory_data[n] == NULL) |