Esempio n. 1
0
//options: 0-exp, 1-item share, 2-pickup distribution
int party_setoption(struct party_data *party, int option, int flag)
{
	int i;

	ARR_FIND(0,MAX_PARTY,i,party->party.member[i].leader);
	if(i >= MAX_PARTY)
		return 0;

	switch(option) {
		case 0:
			intif_party_changeoption(party->party.party_id,party->party.member[i].account_id,flag,party->party.item);
			break;
		case 1:
			if(flag) flag = party->party.item|1;
			else flag = party->party.item&~1;
			intif_party_changeoption(party->party.party_id,party->party.member[i].account_id,party->party.exp,flag);
			break;
		case 2:
			if(flag) flag = party->party.item|2;
			else flag = party->party.item&~2;
			intif_party_changeoption(party->party.party_id,party->party.member[i].account_id,party->party.exp,flag);
			break;
		default:
			return 0;
			break;
	}

	return 1;
}
Esempio n. 2
0
int party_changeoption(struct map_session_data *sd,int exp,int item)
{
	nullpo_retr(0, sd);

	if( sd->status.party_id==0)
		return 0;
	intif_party_changeoption(sd->status.party_id,sd->status.account_id,exp,item);
	return 0;
}
Esempio n. 3
0
// パーティの設定変更要求
int party_changeoption(struct map_session_data *sd,int exp,int item)
{
	struct party *p;

	nullpo_retr(0, sd);

	if( sd->status.party_id==0 || (p=party_search(sd->status.party_id))==NULL )
		return 0;
	intif_party_changeoption(sd->status.party_id,sd->status.account_id,exp,item);
	return 0;
}
Esempio n. 4
0
File: party.cpp Progetto: mrktj/tmwa
// パーティの設定変更要求
int party_changeoption(dumb_ptr<map_session_data> sd, int exp, int item)
{
    PartyPair p;

    nullpo_retz(sd);

    if (!sd->status.party_id
        || !(p = party_search(sd->status.party_id)))
        return 0;
    intif_party_changeoption(sd->status.party_id, sd->status_key.account_id, exp,
                              item);
    return 0;
}