summaryrefslogtreecommitdiff
path: root/src/map/battleground.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-04-21 20:38:18 +0200
committerHaru <haru@dotalux.com>2016-04-23 19:11:52 +0200
commit4788c813c654c522d336dd9fb1229c1cbdd2d7de (patch)
treeb96507116fb1863680c6101c4add29b041e536bb /src/map/battleground.c
parentd7ffa6adbcf4800821fe3f961513952450d06f98 (diff)
downloadhercules-4788c813c654c522d336dd9fb1229c1cbdd2d7de.tar.gz
hercules-4788c813c654c522d336dd9fb1229c1cbdd2d7de.tar.bz2
hercules-4788c813c654c522d336dd9fb1229c1cbdd2d7de.tar.xz
hercules-4788c813c654c522d336dd9fb1229c1cbdd2d7de.zip
Removed the 'len' argument from various message-related functions
- The argument was redundant, since the passed value is always the same as the passed string's length (it doesn't make sense otherwise). The argument is implicit now. Less typing and less errors. - Affected functions: `clif->bg_message()`, `bg->send_message()`, `party->send_message()`, `guild->send_message()`. Signed-off-by: Haru <haru@dotalux.com> Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/battleground.c')
-rw-r--r--src/map/battleground.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/battleground.c b/src/map/battleground.c
index 629122c87..5231ce3d2 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -171,7 +171,7 @@ int bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag) {
sprintf(output, "Server : %s has been afk-kicked from the battlefield...", sd->status.name);
break;
}
- clif->bg_message(bgd, 0, "Server", output, strlen(output) + 1);
+ clif->bg_message(bgd, 0, "Server", output);
}
if( bgd->logout_event[0] && flag )
@@ -265,14 +265,15 @@ int bg_team_get_id(struct block_list *bl) {
return 0;
}
-bool bg_send_message(struct map_session_data *sd, const char *mes, int len) {
+bool bg_send_message(struct map_session_data *sd, const char *mes)
+{
struct battleground_data *bgd;
nullpo_ret(sd);
nullpo_ret(mes);
if( sd->bg_id == 0 || (bgd = bg->team_search(sd->bg_id)) == NULL )
return false; // Couldn't send message
- clif->bg_message(bgd, sd->bl.id, sd->status.name, mes, len);
+ clif->bg_message(bgd, sd->bl.id, sd->status.name, mes);
return true;
}