diff options
author | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-09 23:34:57 +0000 |
---|---|---|
committer | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-09 23:34:57 +0000 |
commit | 31840066c4795124a887cd12996cf7dc13fcef25 (patch) | |
tree | c419bd14a3f8d173d78e7f31c703c591169d802f /src/map | |
parent | ac2c5e7b2d74728563371ed204d84369ba743ac6 (diff) | |
download | hercules-31840066c4795124a887cd12996cf7dc13fcef25.tar.gz hercules-31840066c4795124a887cd12996cf7dc13fcef25.tar.bz2 hercules-31840066c4795124a887cd12996cf7dc13fcef25.tar.xz hercules-31840066c4795124a887cd12996cf7dc13fcef25.zip |
* Added 'OnInterIfInitOnce' for WoE scripts & modified the WoE scripts as well [Ajarn & Codemaster] [Thanks to FREYA] [SVN 943]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@943 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/chrif.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index c04630300..f7e6781d6 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -36,13 +36,14 @@ static const int packet_len_table[0x20] = { -1,-1,10, 6,11,-1, 0, 0, // 2b10-2b17 }; -int char_fd; +int char_fd = -1; int srvinfo; static char char_ip_str[16]; static int char_ip; static int char_port = 6121; static char userid[24], passwd[24]; -static int chrif_state; +static int chrif_state = 0; +static int char_init_done = 0; // 設定ファイル読み込み関係 /*========================================== @@ -256,6 +257,11 @@ int chrif_connectack(int fd) ShowStatus(tmp_output); sprintf(tmp_output,"Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit")); ShowStatus(tmp_output); + if(!char_init_done) { + char_init_done = 1; + sprintf(tmp_output,"Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce")); + ShowStatus(tmp_output); + } // <Agit> Run Event [AgitInit] // printf("NPC_Event:[OnAgitInit] do (%d) events (Agit Initialize).\n", npc_event_doall("OnAgitInit")); |