From eb10f355f7e228b59011326a7f84da2e593affea Mon Sep 17 00:00:00 2001 From: Haru Date: Wed, 11 Sep 2013 01:28:31 +0200 Subject: Fixed announce script command support for bc_blue and bc_woe - Fixes an issue where it wasn't possible to use bc_blue or bc_woe at the same time as bc_map, bc_area or bc_self. (this partly works around bugreport:7693 - http://hercules.ws/board/tracker/issue-7693-character-with-name ) - Replaced bc_* related values from various places through the sources with constants. Signed-off-by: Haru --- src/map/atcommand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 4a4487c3b..df97740e1 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1046,9 +1046,9 @@ ACMD(kami) sscanf(message, "%199[^\n]", atcmd_output); if (strstr(command, "l") != NULL) - clif->broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0, ALL_SAMEMAP); + clif->broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, BC_DEFAULT, ALL_SAMEMAP); else - intif->broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? 0x10 : 0); + intif->broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? BC_BLUE : BC_YELLOW); } else { if(!message || !*message || (sscanf(message, "%lx %199[^\n]", &color, atcmd_output) < 2)) { clif->message(fd, msg_txt(981)); // Please enter color and message (usage: @kamic ). @@ -4960,7 +4960,7 @@ ACMD(broadcast) } sprintf(atcmd_output, "%s: %s", sd->status.name, message); - intif->broadcast(atcmd_output, strlen(atcmd_output) + 1, 0); + intif->broadcast(atcmd_output, strlen(atcmd_output) + 1, BC_DEFAULT); return true; } @@ -4981,7 +4981,7 @@ ACMD(localbroadcast) sprintf(atcmd_output, "%s: %s", sd->status.name, message); - clif->broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0, ALL_SAMEMAP); + clif->broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, BC_DEFAULT, ALL_SAMEMAP); return true; } -- cgit v1.2.3-60-g2f50