summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-06-19 05:47:17 +0000
committerFate <fate-tmw@googlemail.com>2009-06-19 05:47:17 +0000
commit69eaad480cba9f94be8fe16173f94dabf3d5c1c4 (patch)
treed03163b1296ee7852cf54b647af4cb8a971b9b14
parent65e4adfc4f90aa087b7cde089029636257761a36 (diff)
downloadtmwa-69eaad480cba9f94be8fe16173f94dabf3d5c1c4.tar.gz
tmwa-69eaad480cba9f94be8fe16173f94dabf3d5c1c4.tar.bz2
tmwa-69eaad480cba9f94be8fe16173f94dabf3d5c1c4.tar.xz
tmwa-69eaad480cba9f94be8fe16173f94dabf3d5c1c4.zip
Auto-disconnect from trade partner when removing items
-rw-r--r--src/map/pc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index d03b247..4ad09a3 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2842,6 +2842,9 @@ 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) {
int to_delete = count;