summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index bad3f7eb8..e04d6944e 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -239,6 +239,14 @@ static void mvptomb_destroy(struct mob_data *md)
m = nd->bl.m;
+ struct s_mapiterator *iter = mapit_geteachpc();
+ for (struct map_session_data *sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) {
+ if (sd->npc_id == nd->bl.id) {
+ sd->state.npc_unloaded = 1;
+ }
+ }
+ mapit->free(iter);
+
clif->clearunit_area(&nd->bl,CLR_OUTSIGHT);
map->delblock(&nd->bl);