summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 3d15ba6c8..88304940b 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1840,6 +1840,11 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l
else
if (--map[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex]
map_removemobs(bl->m);
+ if( map[bl->m].instance_id )
+ {
+ instance[map[bl->m].instance_id].users--;
+ map_instance_check_idle(map[bl->m].instance_id);
+ }
sd->state.debug_remove_map = 1; // temporary state to track double remove_map's [FlavioJS]
sd->debug_file = file;
sd->debug_line = line;