diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-12-12 09:55:13 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-12-12 09:55:13 +0000 |
commit | ed87621c65d7c13ddd4993101a5b7c2287b6609e (patch) | |
tree | a035e4d010d2b9a690c82114dff33dfa36d9f889 /src/map/chrif.c | |
parent | 1c5fab35e935b870939bcae24ea95e957ed76d5a (diff) | |
download | hercules-ed87621c65d7c13ddd4993101a5b7c2287b6609e.tar.gz hercules-ed87621c65d7c13ddd4993101a5b7c2287b6609e.tar.bz2 hercules-ed87621c65d7c13ddd4993101a5b7c2287b6609e.tar.xz hercules-ed87621c65d7c13ddd4993101a5b7c2287b6609e.zip |
* Some preparations for the guild script update
- cleaned up npc event execution code
- cleaned up guild data loading/saving code; to be improved later
- removed dummy 'account name' expulsion list management code
- removed columns 'rsv1' and 'rsv2' from guild member data
- removed columns 'rsv1' 'rsv2' 'rsv3' and 'acc' from guild expulsion data
- added upgrade_svn11895.sql for SQL
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11895 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r-- | src/map/chrif.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index b2a3af4bf..a041d9957 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -92,7 +92,6 @@ static uint32 char_ip = 0; static uint16 char_port = 6121; static char userid[NAME_LENGTH], passwd[NAME_LENGTH]; static int chrif_state = 0; -static int char_init_done = 0; int other_mapserver_count=0; //Holds count of how many other map servers are online (apart of this instance) [Skotlex] //Interval at which map server updates online listing. [Valaris] @@ -342,20 +341,23 @@ int chrif_changemapserverack(int account_id, int login_id1, int login_id2, int c *------------------------------------------*/ int chrif_connectack(int fd) { + static bool char_init_done = false; + if (RFIFOB(fd,2)) { ShowFatalError("Connection to char-server failed %d.\n", RFIFOB(fd,2)); exit(EXIT_FAILURE); } + ShowStatus("Successfully logged on to Char Server (Connection: '"CL_WHITE"%d"CL_RESET"').\n",fd); chrif_state = 1; - chrif_connected=1; + chrif_connected = 1; chrif_sendmap(fd); 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")); - if(!char_init_done) { - char_init_done = 1; + if( !char_init_done ) { + char_init_done = true; ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce")); } |