diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-08-21 07:16:40 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-08-21 07:16:40 +0000 |
commit | 1013fd3227f78a0b02c121a36a6f66fdcbd75203 (patch) | |
tree | 53421a13c87309aa56c4dd87dbaf3cc0917d7b74 /src/map/intif.c | |
parent | ad8b21eed7219a457340278ed39642578d48b2eb (diff) | |
download | hercules-1013fd3227f78a0b02c121a36a6f66fdcbd75203.tar.gz hercules-1013fd3227f78a0b02c121a36a6f66fdcbd75203.tar.bz2 hercules-1013fd3227f78a0b02c121a36a6f66fdcbd75203.tar.xz hercules-1013fd3227f78a0b02c121a36a6f66fdcbd75203.zip |
Fixed the wrong packet length makes client choke when add_quest packets are sent.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14019 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/intif.c')
-rw-r--r-- | src/map/intif.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index 9b60d40c0..204fbe497 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -38,7 +38,7 @@ static const int packet_len_table[]={ 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830 9, 9,-1,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840 -1,-1, 7, 7, 7,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus] - -1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish] + -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish] -1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3870 Mercenaries [Zephyrus] 11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880 -1,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] @@ -1365,26 +1365,8 @@ int intif_parse_questlog(int fd) int intif_parse_questsave(int fd) { - TBL_PC * sd = map_charid2sd(RFIFOL(fd, 4)); - int i,j; - int count = (RFIFOW(fd, 2) - 8) / 4; - - if( !sd ) - return -1; - - for( i = 0; i < count; i++ ) - { - int qid = RFIFOL(fd, 4*i+8); - - ARR_FIND(0, sd->avail_quests, j, sd->quest_log[j].quest_id == qid); - if(j == sd->avail_quests) //shouldn't happen - { - ShowError("intif_parse_questsave: Quest %d not found in your quest log!\n", qid); - continue; - } - //This packet can't go before 'close' and 'next'. That's weird and why I send it here. [Inkfish] - clif_send_quest_info(sd, &sd->quest_log[j]); - } + if( !RFIFOB(fd, 6) ) + ShowError("intif_parse_questsave: Failed to save quest(s) for character %d!\n", RFIFOL(fd, 2)); return 0; } |