diff options
author | Haru <haru@dotalux.com> | 2013-09-11 01:28:31 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-09-11 02:26:04 +0200 |
commit | eb10f355f7e228b59011326a7f84da2e593affea (patch) | |
tree | 52c448eeef67c66794e6f8fccee3bfc446893ff3 /src/map/intif.c | |
parent | c1c3ef1e0b356aaa89d8fba6d63b86130e8aae9c (diff) | |
download | hercules-eb10f355f7e228b59011326a7f84da2e593affea.tar.gz hercules-eb10f355f7e228b59011326a7f84da2e593affea.tar.bz2 hercules-eb10f355f7e228b59011326a7f84da2e593affea.tar.xz hercules-eb10f355f7e228b59011326a7f84da2e593affea.zip |
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 <haru@dotalux.com>
Diffstat (limited to 'src/map/intif.c')
-rw-r--r-- | src/map/intif.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |