From f673ec583e417b7df360edd69baf51add58aa36b Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 8 May 2006 20:53:46 +0000 Subject: - ES magic will now put the caster on stun for 0.5 secs regardless of whether the skill-target is a mob or not. - Added function clif_party_join_info which sends packet 0x1e9 each time a party-member joins. This packet (as redundant info as it has) should also contain the field for "adoptability", but that needs to be coded in yet. - Added clif_ParseAdoptRequest which does the basic adoption handling. More checks and the reply packets still need to be coded in. - Happy State and TK stances won't dispel on death now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6521 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/party.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'src/map/party.c') diff --git a/src/map/party.c b/src/map/party.c index 601c49c18..8ee9f715d 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -278,7 +278,7 @@ 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 char_id, int flag) { struct map_session_data *sd = map_id2sd(account_id),*sd2; - + struct party *p = party_search(party_id); if(sd == NULL || sd->status.char_id != char_id){ if (flag == 0) { if(battle_config.error_log) @@ -287,23 +287,28 @@ int party_member_added(int party_id,int account_id,int char_id, int flag) } return 0; } - sd->party_invite=0; sd->party_invite_account=0; - + + if (!p) { + if(battle_config.error_log) + ShowError("party_member_added: party %d not found.\n",party_id); + intif_party_leave(party_id,account_id,char_id); + return 0; + } + sd2=map_id2sd(sd->party_invite_account); + if(!flag) { + sd->state.party_sent=0; + sd->status.party_id=party_id; + party_check_conflict(sd); + clif_party_join_info(p,sd); + clif_charnameupdate(sd); //Update char name's display [Skotlex] + clif_party_hp(sd); + clif_party_xy(sd); + } if (sd2) clif_party_inviteack(sd2,sd->status.name,flag?2:0); - if(flag) - return 0; - - sd->state.party_sent=0; - sd->status.party_id=party_id; - - party_check_conflict(sd); - clif_charnameupdate(sd); //Update char name's display [Skotlex] - clif_party_hp(sd); - clif_party_xy(sd); return 0; } // パーティ除名要求 -- cgit v1.2.3-70-g09d2