summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index f4027096c..46e6d0fd2 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1867,6 +1867,7 @@ int npc_unload(struct npc_data* nd, bool single) {
aFree(nd->u.scr.timer_event);
if (nd->src_id == 0) {
if(nd->u.scr.script) {
+ script_stop_instances(nd->bl.id);
script_free_code(nd->u.scr.script);
nd->u.scr.script = NULL;
}
@@ -1885,8 +1886,6 @@ int npc_unload(struct npc_data* nd, bool single) {
nd->ud = NULL;
}
- script_stop_sleeptimers(nd->bl.id);
-
aFree(nd);
return 0;