Пример #1
0
// パーティが追加された
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;
	
	if(sd == NULL || sd->status.char_id != char_id){
		if (flag == 0) {
			if(battle_config.error_log)
				ShowError("party: member added error %d is not online\n",account_id);
			intif_party_leave(party_id,account_id,char_id); // キャラ側i登録eきhかaたたぁ脱憎要求も出す
		}
		return 0;
	}
	
	sd->party_invite=0;
	sd->party_invite_account=0;
	
	sd2=map_id2sd(sd->party_invite_account);
	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;
}
Пример #2
0
// パーティメンバの移動
int party_send_movemap(dumb_ptr<map_session_data> sd)
{
    struct party *p;

    nullpo_ret(sd);

    if (sd->status.party_id == 0)
        return 0;
    intif_party_changemap(sd, 1);

    if (sd->party_sended != 0)  // もうパーティデータは送信済み
        return 0;

    // 競合確認
    party_check_conflict(sd);

    // あるならパーティ情報送信
    if ((p = party_search(sd->status.party_id)) != NULL)
    {
        party_check_member(p); // 所属を確認する
        if (sd->status.party_id == p->party_id)
        {
            clif_party_info(p, sd->fd);
            clif_party_option(p, sd, 0x100);
            sd->party_sended = 1;
        }
    }

    return 0;
}
Пример #3
0
// パーティが追加された
int party_member_added(int party_id, int account_id, int flag)
{
    dumb_ptr<map_session_data> sd = map_id2sd(account_id), sd2;
    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;
}
Пример #4
0
// パーティが追加された
int party_member_added(PartyId party_id, AccountId account_id, int flag)
{
    dumb_ptr<map_session_data> sd = map_id2sd(account_to_block(account_id)), sd2;
    PartyPair p = party_search(party_id);

    if (sd == nullptr)
    {
        if (flag == 0)
        {
            if (battle_config.error_log)
                PRINTF("party: member added error %d is not online\n"_fmt,
                        account_id);
            intif_party_leave(party_id, account_id);   // キャラ側に登録できなかったため脱退要求を出す
        }
        return 0;
    }
    sd2 = map_id2sd(account_to_block(sd->party_invite_account));
    sd->party_invite = PartyId();
    sd->party_invite_account = AccountId();

    if (!p)
    {
        PRINTF("party_member_added: party %d not found.\n"_fmt, party_id);
        intif_party_leave(party_id, account_id);
        return 0;
    }

    if (flag == 1)
    {                           // 失敗
        if (sd2 != nullptr)
            clif_party_inviteack(sd2, sd->status_key.name, 0);
        return 0;
    }

    // 成功
    sd->party_sended = 0;
    sd->status.party_id = party_id;

    if (sd2 != nullptr)
        clif_party_inviteack(sd2, sd->status_key.name, 2);

    // いちおう競合確認
    party_check_conflict(sd);

    party_send_xy_clear(p);

    return 0;
}
Пример #5
0
// パーティメンバの移動
int party_send_movemap(struct map_session_data *sd)
{
	int i;
	struct party *p;

	nullpo_retr(0, sd);

	if( sd->status.party_id==0 )
		return 0;
	intif_party_changemap(sd,1);

	
	p=party_search(sd->status.party_id);
	if (p && sd->fd) {
		//Send dots of other party members to this char. [Skotlex]
		for(i=0; i < MAX_PARTY; i++) {
			if (!p->member[i].sd	|| p->member[i].sd == sd ||
				p->member[i].sd->bl.m != sd->bl.m)
				continue;
			clif_party_xy_single(sd->fd, p->member[i].sd);
		}
		
	}
	
	if( sd->state.party_sent )	// もうパーティデータは送信済み
		return 0;

	// 競合確認	
	party_check_conflict(sd);
	
	// あるならパーティ情報送信
	if(p){
		party_check_member(p);	// 所属を確認する
		if(sd->status.party_id==p->party_id){
			clif_party_main_info(p,sd->fd);
			clif_party_option(p,sd,0x100);
			clif_party_info(p,sd->fd);
			sd->state.party_sent=1;
		}
	}
	
	return 0;
}
Пример #6
0
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_data *p = party_search(party_id);
	if(sd == NULL || sd->status.char_id != char_id){
		if (flag == 0) {
			if(battle_config.error_log)
				ShowError("party: member added error %d is not online\n",account_id);
			intif_party_leave(party_id,account_id,char_id);
		}
		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;
	}

	if(!flag) {
		sd->state.party_sent=0;
		sd->status.party_id=party_id;
		party_check_conflict(sd);
		clif_party_member_info(p,sd);
		clif_party_hp(sd);
		clif_party_xy(sd);
		clif_charnameupdate(sd); //Update char name's display [Skotlex]
	}

	sd2=map_id2sd(sd->party_invite_account);
	if (sd2)
		clif_party_inviteack(sd2,sd->status.name,flag?2:1);
	return 0;
}
Пример #7
0
// パ?ティチェック要求
int mapif_parse_PartyCheck(int fd, int party_id, int account_id, int char_id) {
	return party_check_conflict(party_id, account_id, char_id);
}
Пример #8
0
//--------------------
// Party check request
//--------------------
void mapif_parse_PartyCheck(int fd, int party_id, int account_id, char *nick) {
	party_check_conflict(party_id, account_id, nick);
	return;
}
Пример #9
0
// パーティチェック要求
static
void mapif_parse_PartyCheck(int, int party_id, int account_id, CharName nick)
{
    party_check_conflict(party_id, account_id, nick);
}