diff options
author | Ibrahem Hossam <hemagx2@gmail.com> | 2016-04-24 13:13:19 +0200 |
---|---|---|
committer | Ibrahem Hossam <hemagx2@gmail.com> | 2016-04-24 13:13:19 +0200 |
commit | 31e27a130676e3e416b583bb947f9dd87efdce81 (patch) | |
tree | f91422fa8b0ecd93ccb15720bc15a9b9b839cfd2 /src/map/party.c | |
parent | 3ccc681a4bebd5b91b96c1c7059fdec91f2b5d16 (diff) | |
parent | 9fdb4567ab8af97004d7c6dcd35f27f788b0bb15 (diff) | |
download | hercules-31e27a130676e3e416b583bb947f9dd87efdce81.tar.gz hercules-31e27a130676e3e416b583bb947f9dd87efdce81.tar.bz2 hercules-31e27a130676e3e416b583bb947f9dd87efdce81.tar.xz hercules-31e27a130676e3e416b583bb947f9dd87efdce81.zip |
Merge pull request #1264 from HerculesWS/vs2015
Diffstat (limited to 'src/map/party.c')
-rw-r--r-- | src/map/party.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/party.c b/src/map/party.c index 551c4d56f..dbb7b6ae2 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -798,12 +798,16 @@ int party_send_logout(struct map_session_data *sd) return 1; } -int party_send_message(struct map_session_data *sd,const char *mes,int len) +int party_send_message(struct map_session_data *sd, const char *mes) { - if(sd->status.party_id==0) + int len = (int)strlen(mes); + + nullpo_ret(sd); + + 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); + 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); // 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); |