From 3fefab81425004d67c61fb911a417ddfdd089693 Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 5 May 2006 23:22:16 +0000 Subject: - Added a npc-script-event cache to avoid looking up event-scripts every time they need to be executed. Events cached are all those defined in script_config. - Since the cache holds direct pointers to the npcs/events, do NOT unload the related NPCs or you'll get dangling pointers. However, @reloadscript will work fine. - Set the etc_log to on to see a summary of npcs/events loaded for script execution on startup. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6494 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 95a3a5c29..f95c9aec0 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8228,16 +8228,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) sc_start(&sd->bl,SC_NOCHAT,100,0,0); // Lance - if (script_config.event_script_type == 0) { - struct npc_data *npc; - if ((npc = npc_name2id(script_config.loadmap_event_name))) { - run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); - ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.loadmap_event_name); - } - } else { - ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n", - npc_event_doall_id(script_config.loadmap_event_name, sd->bl.id), script_config.loadmap_event_name); - } + npc_script_event(sd, NPCE_LOADMAP); if (pc_checkskill(sd, SG_DEVIL) && !pc_nextjobexp(sd)) clif_status_load(&sd->bl, SI_DEVIL, 1); //blindness [Komurka] -- cgit v1.2.3-70-g09d2