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/clif.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 081260ddb..8f82141b2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5718,14 +5718,14 @@ void clif_displaymessage2(const int fd, const char* mes) { /// 009a .W .?B void clif_broadcast(struct block_list* bl, const char* mes, int len, int type, enum send_target target) { - int lp = type ? 4 : 0; + int lp = (type&BC_COLOR_MASK) ? 4 : 0; unsigned char *buf = (unsigned char*)aMalloc((4 + lp + len)*sizeof(unsigned char)); WBUFW(buf,0) = 0x9a; WBUFW(buf,2) = 4 + lp + len; - if (type == 0x10) // bc_blue + if( type&BC_BLUE ) WBUFL(buf,4) = 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 ) WBUFL(buf,4) = 0x73737373; //If there's "ssss", game client will recognize message as 'WoE broadcast'. memcpy(WBUFP(buf, 4 + lp), mes, len); clif->send(buf, WBUFW(buf,2), bl, target); @@ -9580,8 +9580,8 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) { if( map[sd->bl.m].flag.allowks && !map_flag_ks(sd->bl.m) ) { char output[128]; - sprintf(output, "[ Kill Steal Protection Disable. KS is allowed in this map ]"); - clif->broadcast(&sd->bl, output, strlen(output) + 1, 0x10, SELF); + sprintf(output, "[ Kill Steal Protection Disabled. KS is allowed in this map ]"); + clif->broadcast(&sd->bl, output, strlen(output) + 1, BC_BLUE, SELF); } iMap->iwall_get(sd); // Updates Walls Info on this Map to Client -- cgit v1.2.3-70-g09d2