|
@@ -7853,6 +7853,7 @@ void clif_feel_hate_reset(struct map_session_data *sd)
|
|
WFIFOSET(fd, packet_len(0x20e));
|
|
WFIFOSET(fd, packet_len(0x20e));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
// ---------------------
|
|
// ---------------------
|
|
// clif_guess_PacketVer
|
|
// clif_guess_PacketVer
|
|
// ---------------------
|
|
// ---------------------
|
|
@@ -11499,9 +11500,12 @@ void clif_parse_debug(int fd,struct map_session_data *sd)
|
|
*------------------------------------------*/
|
|
*------------------------------------------*/
|
|
int clif_parse(int fd)
|
|
int clif_parse(int fd)
|
|
{
|
|
{
|
|
- int packet_len = 0, cmd, packet_ver, err;
|
|
|
|
|
|
+ int cmd, packet_ver, packet_len, err;
|
|
TBL_PC* sd;
|
|
TBL_PC* sd;
|
|
|
|
|
|
|
|
+ while(1)
|
|
|
|
+ { // begin main client packet processing loop
|
|
|
|
+
|
|
sd = (TBL_PC *)session[fd]->session_data;
|
|
sd = (TBL_PC *)session[fd]->session_data;
|
|
if (session[fd]->eof) {
|
|
if (session[fd]->eof) {
|
|
if (sd) {
|
|
if (sd) {
|
|
@@ -11651,6 +11655,8 @@ int clif_parse(int fd)
|
|
|
|
|
|
RFIFOSKIP(fd, packet_len);
|
|
RFIFOSKIP(fd, packet_len);
|
|
|
|
|
|
|
|
+ }; // main loop end
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -11667,7 +11673,7 @@ static int packetdb_readdb(void)
|
|
int skip_ver = 0;
|
|
int skip_ver = 0;
|
|
int warned = 0;
|
|
int warned = 0;
|
|
char *str[64],*p,*str2[64],*p2,w1[64],w2[64];
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
-1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10,
|
|
//#0x0200
|
|
//#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
|
|
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