summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/npc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 97b41e033..b1def4a08 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3648,12 +3648,16 @@ bool npc_unloadfile( const char* path ) {
for( nd = dbi_first(iter); dbi_exists(iter); nd = dbi_next(iter) ) {
if( nd->path && strcasecmp(nd->path,path) == 0 ) {
found = true;
+ npc_unload_duplicates(nd);/* unload any npcs which could duplicate this but be in a different file */
npc_unload(nd, true);
}
}
dbi_destroy(iter);
+ if( found ) /* refresh event cache */
+ npc_read_event_script();
+
return found;
}
void do_clear_npc(void) {