summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/intif.h2
-rw-r--r--src/map/npc.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/map/intif.h b/src/map/intif.h
index 0d0fc563d..2306063f1 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -58,4 +58,6 @@ int intif_request_petdata(int account_id, int char_id, int pet_id);
int intif_save_petdata(int account_id, struct s_pet *p);
int intif_delete_petdata(int pet_id);
+int CheckForCharServer(void);
+
#endif
diff --git a/src/map/npc.c b/src/map/npc.c
index b890a4ce6..e39d9abb6 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2611,6 +2611,12 @@ int npc_reload (void)
//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"));
+ // Execute rest of the startup events if connected to char-server. [Lance]
+ if(!CheckForCharServer()){
+ ShowStatus("Event '"CL_WHITE"OnCharIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnCharIfInit"));
+ ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit"));
+ ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce"));
+ }
return 0;
}