summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-09-12 13:13:23 -0300
committerJesusaves <cpntb1@ymail.com>2020-09-12 13:13:23 -0300
commit1443f47ca63972f737bd9cc0322f77dc416ff2a0 (patch)
tree6b851ced5b878ac8b2b13eeb01e04d598bacfe43 /src/map/mob.c
parentc53f8a099151f2e8c26c0ab36f35d34256c0d6cb (diff)
downloadhercules-1443f47ca63972f737bd9cc0322f77dc416ff2a0.tar.gz
hercules-1443f47ca63972f737bd9cc0322f77dc416ff2a0.tar.bz2
hercules-1443f47ca63972f737bd9cc0322f77dc416ff2a0.tar.xz
hercules-1443f47ca63972f737bd9cc0322f77dc416ff2a0.zip
This is Hercules v2019.09.22
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);