summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c
index f7e3157bf..3c13404e2 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -25,6 +25,7 @@
#include "script.h"
#include "unit.h"
#include "mercenary.h"
+#include "vending.h"
#include <time.h>
#include <stdio.h>
@@ -6489,6 +6490,15 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
status_set_hp(bl, 10, 0);
status_set_sp(bl, 10, 0);
break;
+ case SC_AUTOTRADE:
+ if (tid == -1)
+ break;
+ vending_closevending(sd);
+ map_quit(sd);
+ // Because map_quit calls status_change_end with tid -1
+ // from here it's not neccesary to continue
+ return 1;
+ break;
}
opt_flag = 1;