diff options
author | TAW Dev <tawdev@taw> | 2009-06-30 11:30:38 -0400 |
---|---|---|
committer | TAW Dev <tawdev@taw> | 2009-06-30 11:30:38 -0400 |
commit | d23c620a88ac71c68af195f5fe82b09ee171187f (patch) | |
tree | 0545df798c3a5c4cf59a14c16b65bf5ee9ed1419 /src | |
parent | 4b5f2988c895f083169bb828360730ebcb3aac87 (diff) | |
parent | 381151eb83dbfb753b6cbb031546fd2d4a828f69 (diff) | |
download | tmwa-d23c620a88ac71c68af195f5fe82b09ee171187f.tar.gz tmwa-d23c620a88ac71c68af195f5fe82b09ee171187f.tar.bz2 tmwa-d23c620a88ac71c68af195f5fe82b09ee171187f.tar.xz tmwa-d23c620a88ac71c68af195f5fe82b09ee171187f.zip |
Merge branch 'master' of git://gitorious.org/tmw-eathena/mainline
Diffstat (limited to 'src')
-rw-r--r-- | src/map/party.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/map/party.c b/src/map/party.c index 73f85c4..feacc25 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -251,32 +251,44 @@ int party_reply_invite(struct map_session_data *sd,int account_id,int flag) int party_member_added(int party_id,int account_id,int flag) { struct map_session_data *sd= map_id2sd(account_id),*sd2; - if(sd==NULL || flag==0){ - if(battle_config.error_log) - printf("party: member added error %d is not online\n",account_id); - intif_party_leave(party_id,account_id); // キャラ側に登録できなかったため脱退要求を出す + struct party *p=party_search(party_id); + + if(sd == NULL){ + if (flag == 0) { + if(battle_config.error_log) + printf("party: member added error %d is not online\n",account_id); + intif_party_leave(party_id,account_id); // キャラ側に登録できなかったため脱退要求を出す + } return 0; } sd2=map_id2sd(sd->party_invite_account); sd->party_invite=0; sd->party_invite_account=0; - + + if (p==NULL) { + printf("party_member_added: party %d not found.\n",party_id); + intif_party_leave(party_id,account_id); + return 0; + } + if(flag==1){ // 失敗 if( sd2!=NULL ) clif_party_inviteack(sd2,sd->status.name,0); return 0; } - - // 成功 + + // 成功 sd->party_sended=0; sd->status.party_id=party_id; - + if( sd2!=NULL) clif_party_inviteack(sd2,sd->status.name,2); // いちおう競合確認 party_check_conflict(sd); + party_send_xy_clear(p); + return 0; } // パーティ除名要求 |