diff options
Diffstat (limited to 'src/map/party.c')
-rw-r--r-- | src/map/party.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/map/party.c b/src/map/party.c index e4fb18c23..7d7f69620 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2018 Hercules Dev Team - * Copyright (C) Athena Dev Teams + * Copyright (C) 2012-2020 Hercules Dev Team + * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -424,6 +424,12 @@ static int party_invite(struct map_session_data *sd, struct map_session_data *ts return 0; } + if ((tsd->status.allow_party & 1) != 0) { + // party invite blocked by player + clif->party_inviteack(sd, tsd->status.name, 5); + return 0; + } + tsd->party_invite=sd->status.party_id; tsd->party_invite_account=sd->status.account_id; @@ -689,6 +695,7 @@ static int party_broken(int party_id) if( p->data[i].sd!=NULL ) { clif->party_withdraw(p,p->data[i].sd,p->party.member[i].account_id,p->party.member[i].name,0x10); p->data[i].sd->status.party_id=0; + clif->charnameupdate(p->data[i].sd); } } @@ -880,17 +887,20 @@ static int party_send_logout(struct map_session_data *sd) static int party_send_message(struct map_session_data *sd, const char *mes) { - int len; - nullpo_ret(sd); nullpo_ret(mes); - len = (int)strlen(mes); - if (sd->status.party_id == 0) return 0; - intif->party_message(sd->status.party_id, sd->status.account_id, mes, len); - party->recv_message(sd->status.party_id, sd->status.account_id, mes, len); + + struct party_data *p = party->search(sd->status.party_id); + + if (p == NULL) + return 0; + + int len = (int)strlen(mes); + + clif->party_message(p, sd->status.account_id, mes, len); // Chat logging type 'P' / Party Chat logs->chat(LOG_CHAT_PARTY, sd->status.party_id, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, mes); @@ -898,15 +908,6 @@ static int party_send_message(struct map_session_data *sd, const char *mes) return 0; } -static int party_recv_message(int party_id, int account_id, const char *mes, int len) -{ - struct party_data *p; - if( (p=party->search(party_id))==NULL) - return 0; - clif->party_message(p,account_id,mes,len); - return 0; -} - static int party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv) { struct party_data *p; @@ -1526,7 +1527,6 @@ void party_defaults(void) party->send_levelup = party_send_levelup; party->send_logout = party_send_logout; party->send_message = party_send_message; - party->recv_message = party_recv_message; party->skill_check = party_skill_check; party->send_xy_clear = party_send_xy_clear; party->exp_share = party_exp_share; |