From 8fd7ea9e4f38bd02b99e4fa42fc2003390a25adc Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Sun, 7 Jan 2007 17:59:25 +0000 Subject: - Fixed the sleep timers not being removed when the an npc was being unloaded and when reloading scripts. Ref: http://www.eathena.ws/board/index.php?showtopic=131464 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9629 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/npc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index b90886da6..802bc3b4a 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1471,6 +1471,7 @@ int npc_unload(struct npc_data *nd) } } } + script_stop_sleeptimers(nd->bl.id); aFree(nd); return 0; @@ -2922,7 +2923,7 @@ int npc_reload (void) //Re-read the NPC Script Events cache. npc_read_event_script(); - + //Execute the OnInit event for freshly loaded npcs. [Skotlex] ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '" CL_WHITE"%d"CL_RESET"' NPCs.\n",npc_event_doall("OnInit")); -- cgit v1.2.3-60-g2f50