diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 312c0b228..23eca70d4 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3509,30 +3509,16 @@ int npc_reload(void) { } return 0; } - +void do_clear_npc(void) { + db_clear(npcname_db); + db_clear(ev_db); +} /*========================================== * I—¹ *------------------------------------------*/ -int do_final_npc(void) -{ - int i; - struct block_list *bl; - - db_clear(npcname_db); - db_clear(ev_db); - - for (i = START_NPC_NUM; i < npc_id; i++){ - if ((bl = map_id2bl(i))){ - if (bl->type == BL_NPC) - npc_unload((struct npc_data *)bl, false); - else if (bl->type&(BL_MOB|BL_PET|BL_HOM|BL_MER)) - unit_free(bl, CLR_OUTSIGHT); - } - } +int do_final_npc(void) { ev_db->destroy(ev_db, NULL); - //There is no free function for npcname_db because at this point there shouldn't be any npcs left! - //So if there is anything remaining, let the memory manager catch it and report it. npcname_db->destroy(npcname_db, NULL); ers_destroy(timer_event_ers); npc_clearsrcfile(); |