summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-05-31 23:01:47 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-05-31 23:11:34 +0200
commitd8151aad24c138efcf2ce791c27b85f55119f09c (patch)
treea5ca930d6df4fa6941d64be8d77b23d3005c9771 /src/map/clif.c
parent1cccfca3dd708354bf808068c1210ce353957f2e (diff)
downloadhercules-d8151aad24c138efcf2ce791c27b85f55119f09c.tar.gz
hercules-d8151aad24c138efcf2ce791c27b85f55119f09c.tar.bz2
hercules-d8151aad24c138efcf2ce791c27b85f55119f09c.tar.xz
hercules-d8151aad24c138efcf2ce791c27b85f55119f09c.zip
Implement loudhailer() script command
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index a0ec1fdf6..bc56d13c6 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6224,7 +6224,7 @@ static void clif_displaymessage_sprintf(const int fd, const char *mes, ...)
/// 009a <packet len>.W <message>.?B
static void clif_broadcast(struct block_list *bl, const char *mes, int len, int type, enum send_target target)
{
- int lp = (type&BC_COLOR_MASK) ? 4 : 0;
+ int lp = ((type & BC_COLOR_MASK) != 0 || (type & BC_MEGAPHONE) != 0) ? 4 : 0;
unsigned char *buf = NULL;
nullpo_retv(mes);
@@ -6236,6 +6236,8 @@ static void clif_broadcast(struct block_list *bl, const char *mes, int len, int
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&BC_WOE )
WBUFL(buf,4) = 0x73737373; //If there's "ssss", game client will recognize message as 'WoE broadcast'.
+ else if ((type & BC_MEGAPHONE) != 0)
+ WBUFL(buf, 4) = 0x6363696d; // If there's "micc" at the beginning of the message, the game client will recognize message as 'Megaphone shout'.
memcpy(WBUFP(buf, 4 + lp), mes, len);
clif->send(buf, WBUFW(buf,2), bl, target);