diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-29 16:33:55 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-29 16:33:55 +0000 |
commit | 180c7942243c1b1a4a1d01f8f630126b25252e95 (patch) | |
tree | d224c4617465cce047091332cdedd703bfd4f027 /src/map/npc.c | |
parent | 12ca43bf1123acb96fdc2c8f3a0003d79774bd19 (diff) | |
download | hercules-180c7942243c1b1a4a1d01f8f630126b25252e95.tar.gz hercules-180c7942243c1b1a4a1d01f8f630126b25252e95.tar.bz2 hercules-180c7942243c1b1a4a1d01f8f630126b25252e95.tar.xz hercules-180c7942243c1b1a4a1d01f8f630126b25252e95.zip |
Yet another performance improvement: Shut Down processing is now about to 7 times faster.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16006 54d463be-8e91-2dee-dedb-b68131a5f0ec
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(); |