diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-05-16 07:28:46 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-05-16 07:28:46 +0000 |
commit | 11f60b00d19a194ee4a0cdb4b889aed9ebe96140 (patch) | |
tree | 65ff473efb3f1eb6a0e331d479206d715b297a03 /src/map | |
parent | 6caf74f06f019e4edf78e86c435c5a36c0178566 (diff) | |
download | hercules-11f60b00d19a194ee4a0cdb4b889aed9ebe96140.tar.gz hercules-11f60b00d19a194ee4a0cdb4b889aed9ebe96140.tar.bz2 hercules-11f60b00d19a194ee4a0cdb4b889aed9ebe96140.tar.xz hercules-11f60b00d19a194ee4a0cdb4b889aed9ebe96140.zip |
Added changes missing from the previous update (followup to r12710).
Corrected party invite failure not informing the inviting player.
Cleaned up some foreach() code int_party.c.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12711 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/party.c | 19 | ||||
-rw-r--r-- | src/map/pc.h | 4 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/map/party.c b/src/map/party.c index 5f2ca4e33..4a53d5038 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -408,7 +408,12 @@ int party_member_added(int party_id,int account_id,int char_id, int flag) return 0; } - if( flag ) return 0; + if( flag ) + {// failed + if( sd2 != NULL ) + clif_party_inviteack(sd2,sd->status.name,3); + return 0; + } sd->status.party_id = party_id; @@ -420,13 +425,13 @@ int party_member_added(int party_id,int account_id,int char_id, int flag) p->data[i].sd = sd; } - party_check_conflict(sd); + party_check_conflict(sd); //FIXME: is this neccessary? clif_party_member_info(p,sd); clif_party_option(p,sd,0x100); clif_party_info(p,sd); if( sd2 != NULL ) - clif_party_inviteack(sd2,sd->status.name,flag?3:2); + clif_party_inviteack(sd2,sd->status.name,2); for( i = 0; i < ARRAYLENGTH(p->data); ++i ) {// hp of the other party members @@ -751,14 +756,6 @@ int party_send_xy_timer(int tid, unsigned int tick, int id, intptr data) { struct map_session_data* sd = p->data[i].sd; if( !sd ) continue; - if( !malloc_verify(sd) ) - { - ShowError("party_send_xy_timer: party member zombie reference '0x%8.8x'!\n", (uint32)sd); - ShowDebug("party info: id='%d', name='%s', member count='%d'\n", p->party.party_id, p->party.name, p->party.count); - ShowDebug("member info: charid='%d', name='%s', member no.='%d', online='%d', coords='%s,%d,%d'\n", p->party.member[i].char_id, p->party.member[i].name, i, p->party.member[i].online, mapindex_id2name(p->party.member[i].map), p->data[i].x, p->data[i].y); - p->data[i].sd = NULL; - continue; - } if( p->data[i].x != sd->bl.x || p->data[i].y != sd->bl.y ) {// perform position update diff --git a/src/map/pc.h b/src/map/pc.h index 42a28c78c..bd2baea96 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -295,7 +295,9 @@ struct map_session_data { int zeny, weight; } deal; - int party_invite,party_invite_account; + bool party_creating; // whether the char is requesting party creation + bool party_joining; // whether the char is accepting party invitation + int party_invite, party_invite_account; // for handling party invitation (holds party id and account id) int adopt_invite; // Adoption int guild_invite,guild_invite_account; |