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/intif.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/intif.c') diff --git a/src/map/intif.c b/src/map/intif.c index 6461dce8e..1713cb38e 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -139,7 +139,7 @@ int intif_rename(struct map_session_data *sd, int type, char *name) // GM Send a message int intif_broadcast(const char* mes, int len, int type) { - int lp = type ? 4 : 0; + int lp = (type|BC_COLOR_MASK) ? 4 : 0; // Send to the local players clif->broadcast(NULL, mes, len, type, ALL_CLIENT); @@ -158,9 +158,9 @@ int intif_broadcast(const char* mes, int len, int type) WFIFOW(inter_fd,10) = 0; // fontSize not used with standard broadcast WFIFOW(inter_fd,12) = 0; // fontAlign not used with standard broadcast WFIFOW(inter_fd,14) = 0; // fontY not used with standard broadcast - if (type == 0x10) // bc_blue + if( type|BC_BLUE ) WFIFOL(inter_fd,16) = 0x65756c62; //If there's "blue" at the beginning of the message, game client will display it in blue instead of yellow. - else if (type == 0x20) // bc_woe + else if( type|BC_WOE ) WFIFOL(inter_fd,16) = 0x73737373; //If there's "ssss", game client will recognize message as 'WoE broadcast'. memcpy(WFIFOP(inter_fd,16 + lp), mes, len); WFIFOSET(inter_fd, WFIFOW(inter_fd,2)); @@ -2176,7 +2176,7 @@ int intif_parse(int fd) switch(cmd){ case 0x3800: if (RFIFOL(fd,4) == 0xFF000000) //Normal announce. - clif->broadcast(NULL, (char *) RFIFOP(fd,16), packet_len-16, 0, ALL_CLIENT); + clif->broadcast(NULL, (char *) RFIFOP(fd,16), packet_len-16, BC_DEFAULT, ALL_CLIENT); else //Color announce. clif->broadcast2(NULL, (char *) RFIFOP(fd,16), packet_len-16, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOW(fd,10), RFIFOW(fd,12), RFIFOW(fd,14), ALL_CLIENT); break; -- cgit v1.2.3-60-g2f50