diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 36 | ||||
-rw-r--r-- | src/map/skill.c | 1 |
2 files changed, 26 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 *); diff --git a/src/map/skill.c b/src/map/skill.c index 500df9aec..5e76f581f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -9684,6 +9684,7 @@ struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int struct skill_unit *unit; nullpo_retr(NULL, group); + nullpo_retr(NULL, group->unit); // crash-protection against poor coding nullpo_retr(NULL, unit=&group->unit[idx]); if(!unit->alive) |