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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 276d615be..e3abe5eaa 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2800,17 +2800,17 @@ int npc_reload (void)
int busy = 0, npc_new_min = npc_id;
char c = '-';
+ //Remove all npcs/mobs. [Skotlex]
+ map_foreachiddb(npc_cleanup_dbsub);
for (m = 0; m < map_num; m++) {
- map_foreachinmap(npc_cleanup_sub, m, 0);
if(battle_config.dynamic_mobs) { //dynamic check by [random]
for (i = 0; i < MAX_MOB_LIST_PER_MAP; i++)
if (map[m].moblist[i]) aFree(map[m].moblist[i]);
memset (map[m].moblist, 0, sizeof(map[m].moblist));
}
- map[m].npc_num = 0;
+ if (map[m].npc_num > 0 && battle_config.error_log)
+ ShowWarning("npc_reload: %d npcs weren't removed at map %s!\n", map[m].npc_num, map[m].name);
}
- //Remove any npcs/mobs that weren't caught by the previous loop. [Skotlex]
- map_foreachiddb(npc_cleanup_dbsub);
// anything else we should cleanup?
// Reloading npc's now