Jump to content
  • 0
Sign in to follow this  
Napster

I need help abort party reply invite

Question

this code

 

void party_reply_invite(struct map_session_data *sd,int party_id,int flag){	struct map_session_data* tsd;	struct party_member member;	if( sd->party_invite != party_id )	{// forged		sd->party_invite = 0;		sd->party_invite_account = 0;		return;	}	tsd = map_id2sd(sd->party_invite_account);	if( flag == 1 && !sd->party_creating && !sd->party_joining )	{// accepted and allowed		sd->party_joining = true;		party_fill_member(&member, sd, 0);		intif_party_addmember(sd->party_invite, &member);	}	else	{// rejected or failure		sd->party_invite = 0;		sd->party_invite_account = 0;		if( tsd != NULL )			clif_party_inviteack(tsd,sd->status.name,1);	}}

 

I want check count member of party when player click reply ok

 

ex. variable set partylimit count = 3 users

 

player A -> send party request to player B (now player A party member = 3 online/offline)

player B --> click reply party request player A (source code check party limit )

 

if true < 3 user (accepted and allowed)

else false > 3 user (rejected or failure)

 

thank you

Edited by Napster

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

the party size check is made when the request is made on:

int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
ARR_FIND(0, MAX_PARTY, i, p->party.member[i].account_id == 0);	if( i == MAX_PARTY ) {		clif_party_inviteack(sd, (tsd?tsd->status.name:""), 3);		return 0;	}
you just would need to change max_party with your custom limit

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.