Fixed bugreport:5804 Instances no longer leave "broken" timers behind. Instances also will destroy themselves upon @reloadscript since they break at that.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16183 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
shennetsind 2012-05-31 17:46:20 +00:00
parent 13067714a3
commit cde1d9c0a4
2 changed files with 5 additions and 0 deletions

View File

@ -323,6 +323,9 @@ void instance_del_map(int m)
map_removemapdb(&map[m]); map_removemapdb(&map[m]);
memset(&map[m], 0x00, sizeof(map[0])); memset(&map[m], 0x00, sizeof(map[0]));
/* for it is default and makes it not try to delete a non-existent timer since we did not delete this entry. */
map[m].mob_delete_timer = INVALID_TIMER;
} }
/*-------------------------------------- /*--------------------------------------

View File

@ -3508,6 +3508,8 @@ int npc_reload(void) {
"\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n", "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n",
npc_id - npc_new_min, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob); npc_id - npc_new_min, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
do_final_instance();
for( i = 0; i < ARRAYLENGTH(instance); ++i ) for( i = 0; i < ARRAYLENGTH(instance); ++i )
instance_init(instance[i].instance_id); instance_init(instance[i].instance_id);