summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-06-01 05:24:22 +0200
committerGitHub <noreply@github.com>2020-06-01 05:24:22 +0200
commitf1734dcd29ae8177fde4df78d78ed8c7c086d599 (patch)
tree64f11a4a8e4fadb48651116f3ccb7cc9ceed2142 /src/map/clif.c
parentf0aef9c8d8278b593b9de86148417c2aee78ab54 (diff)
parentc54623866cc7764ce6b2c0844c7d98a80b5f0592 (diff)
downloadhercules-f1734dcd29ae8177fde4df78d78ed8c7c086d599.tar.gz
hercules-f1734dcd29ae8177fde4df78d78ed8c7c086d599.tar.bz2
hercules-f1734dcd29ae8177fde4df78d78ed8c7c086d599.tar.xz
hercules-f1734dcd29ae8177fde4df78d78ed8c7c086d599.zip
Merge pull request #2758 from Kenpachi2k13/loudhailer
Add 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 5cc11c494..8688ee771 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6235,7 +6235,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);
@@ -6247,6 +6247,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);