diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-08-06 19:05:37 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-08-06 19:05:37 +0000 |
commit | aec807d9ba3c67308ac10cfe0de8d1a4568e9aaa (patch) | |
tree | f80a26aa0d80b10f4b0c95081edd072908c874f7 /src/map/clif.c | |
parent | 6b459b8eeed83ca4c18782c85fa853993cc58731 (diff) | |
download | hercules-aec807d9ba3c67308ac10cfe0de8d1a4568e9aaa.tar.gz hercules-aec807d9ba3c67308ac10cfe0de8d1a4568e9aaa.tar.bz2 hercules-aec807d9ba3c67308ac10cfe0de8d1a4568e9aaa.tar.xz hercules-aec807d9ba3c67308ac10cfe0de8d1a4568e9aaa.zip |
* Added a null-pointer check to skill_initunit() to prevent a crash
* Added a while() loop to the client packet processor (for performance)
* Added support for kRO 2007-05-14aSakexe langtype 0 login packet 0x2b0
* Added Job_Baby_Alchemist define to complement the Job_Alchemist update
* Added custom Hollow Poring mob_db2 entry
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10954 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 54632a3b5..6e96d79a4 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7853,6 +7853,7 @@ void clif_feel_hate_reset(struct map_session_data *sd) WFIFOSET(fd, packet_len(0x20e)); } + // --------------------- // clif_guess_PacketVer // --------------------- @@ -11499,9 +11500,12 @@ void clif_parse_debug(int fd,struct map_session_data *sd) *------------------------------------------*/ int clif_parse(int fd) { - int packet_len = 0, cmd, packet_ver, err; + int cmd, packet_ver, packet_len, err; TBL_PC* sd; + while(1) + { // begin main client packet processing loop + sd = (TBL_PC *)session[fd]->session_data; if (session[fd]->eof) { if (sd) { @@ -11651,6 +11655,8 @@ int clif_parse(int fd) RFIFOSKIP(fd, packet_len); + }; // main loop end + return 0; } @@ -11667,7 +11673,7 @@ static int packetdb_readdb(void) int skip_ver = 0; int warned = 0; char *str[64],*p,*str2[64],*p2,w1[64],w2[64]; - int packet_len_table[0x290] = { + int packet_len_table[MAX_PACKET_DB] = { 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -11716,17 +11722,25 @@ static int packetdb_readdb(void) 30, 8, 34, 14, 2, 6, 26, 2, 28, 81, 6, 10, 26, 2, -1, -1, -1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10, //#0x0200 - 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 0, 0, -1, 32, 10, // 0x20c change to 0 (was 19) - 22, 0, 26, 26, 42, 6, 6, 2, 2,282,282,10, 10, -1, -1, 66, - 10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 64, 5, 71, 5, - 12, 26, 9, 11, -1, -1, 10, 2, 282, 11, 4, 36, -1,-1, 4, 2, + 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 0, 0, -1, 32, 10, // 0x20c change to 0 (was 19) + 22, 0, 26, 26, 42, 6, 6, 2, 2,282,282, 10, 10, -1, -1, 66, + 10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 64, 5, 71, 5, + 12, 26, 9, 11, -1, -1, 10, 2, 282, 11, 4, 36, -1, -1, 4, 2, //#0x0240 - -1, -1, -1, -1, -1, 3, 4, 8, -1, 3, 70, 4, 8,12, 4, 10, - 3, 32, -1, 3, 3, 5, 5, 8, 2, 3, -1, -1, 4,-1, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1, -1, -1, -1, -1, 3, 4, 8, -1, 3, 70, 4, 8, 12, 4, 10, + 3, 32, -1, 3, 3, 5, 5, 8, 2, 3, -1, -1, 4, -1, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //#0x0280 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + //#0x02C0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; struct { void (*func)(int, struct map_session_data *); |