summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-09-11 01:28:31 +0200
committerHaru <haru@dotalux.com>2013-09-11 02:26:04 +0200
commiteb10f355f7e228b59011326a7f84da2e593affea (patch)
tree52c448eeef67c66794e6f8fccee3bfc446893ff3 /src/map/clif.c
parentc1c3ef1e0b356aaa89d8fba6d63b86130e8aae9c (diff)
downloadhercules-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/clif.c')
-rw-r--r--src/map/clif.c10
1 files changed, 5 insertions, 5 deletions
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 <packet len>.W <message>.?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