diff options
author | flaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-10-09 13:19:06 +0000 |
---|---|---|
committer | flaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-10-09 13:19:06 +0000 |
commit | a8ee3c14340344c50c34514520c165aa283e91e0 (patch) | |
tree | 2602ffcb2197395e3bd14004a6504093a20c5a6e /src/map/intif.c | |
parent | 5e97766aa1488444f53f55e4a08569da6f88c726 (diff) | |
download | hercules-a8ee3c14340344c50c34514520c165aa283e91e0.tar.gz hercules-a8ee3c14340344c50c34514520c165aa283e91e0.tar.bz2 hercules-a8ee3c14340344c50c34514520c165aa283e91e0.tar.xz hercules-a8ee3c14340344c50c34514520c165aa283e91e0.zip |
* Rework some party code.
- add leader argument to party_fill_member
- add party_getmemberid
- add requester char_id to packets 0x3021 and 0x3821 (party info)
- diff members when replacing party info
- remove fixup all-player-iteration when receiving a party for the first time
- send 'party info' before 'party created'
- send 'party info' before 'party member added'
- update empty party_id when checking the player of a party
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14968 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/intif.c')
-rw-r--r-- | src/map/intif.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index 1b69c0837..9fea3be43 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -381,14 +381,15 @@ int intif_create_party(struct party_member *member,char *name,int item,int item2 return 0; } // パーティ情報要求 -int intif_request_partyinfo(int party_id) +int intif_request_partyinfo(int party_id, int char_id) { if (CheckForCharServer()) return 0; - WFIFOHEAD(inter_fd,6); + WFIFOHEAD(inter_fd,10); WFIFOW(inter_fd,0) = 0x3021; WFIFOL(inter_fd,2) = party_id; - WFIFOSET(inter_fd,6); + WFIFOL(inter_fd,6) = char_id; + WFIFOSET(inter_fd,10); return 0; } // パーティ追加要求 @@ -1007,15 +1008,15 @@ int intif_parse_PartyCreated(int fd) // パーティ情報 int intif_parse_PartyInfo(int fd) { - if( RFIFOW(fd,2)==8){ - ShowWarning("intif: party noinfo %d\n",RFIFOL(fd,4)); - party_recv_noinfo(RFIFOL(fd,4)); + if( RFIFOW(fd,2) == 12 ){ + ShowWarning("intif: party noinfo (char_id=%d party_id=%d)\n", RFIFOL(fd,4), RFIFOL(fd,8)); + party_recv_noinfo(RFIFOL(fd,8), RFIFOL(fd,4)); return 0; } - if( RFIFOW(fd,2)!=sizeof(struct party)+4 ) - ShowError("intif: party info : data size error %d %d %d\n",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct party)+4); - party_recv_info((struct party *)RFIFOP(fd,4)); + if( RFIFOW(fd,2) != 8+sizeof(struct party) ) + ShowError("intif: party info : data size error (char_id=%d party_id=%d packet_len=%d expected_len=%d)\n", RFIFOL(fd,4), RFIFOL(fd,8), RFIFOW(fd,2), 8+sizeof(struct party)); + party_recv_info((struct party *)RFIFOP(fd,8), RFIFOL(fd,4)); return 0; } // パーティ追加通知 |