summaryrefslogtreecommitdiff
path: root/src/map/send.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-30 18:50:08 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-30 18:50:08 +0300
commitc3c009a7e2c3ad40048935de0d0538081cf613be (patch)
tree382fab456507ce0759d28b2ecd6dcd84737a4be0 /src/map/send.c
parent21ec9caab9010b3109050dd891228c191e2b0dd0 (diff)
downloadevol-hercules-c3c009a7e2c3ad40048935de0d0538081cf613be.tar.gz
evol-hercules-c3c009a7e2c3ad40048935de0d0538081cf613be.tar.bz2
evol-hercules-c3c009a7e2c3ad40048935de0d0538081cf613be.tar.xz
evol-hercules-c3c009a7e2c3ad40048935de0d0538081cf613be.zip
Add script command for change npc dialog title.
New script command: setnpcdialogtitle newtitle
Diffstat (limited to 'src/map/send.c')
-rw-r--r--src/map/send.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/map/send.c b/src/map/send.c
index be913e0..029df93 100644
--- a/src/map/send.c
+++ b/src/map/send.c
@@ -166,3 +166,20 @@ void send_changemusic_brodcast(const int map, const char *music)
strcpy ((char *)WBUFP (buf, 4), music);
clif->send (buf, sz, &bl, ALL_SAMEMAP);
}
+
+void send_changenpc_title (struct map_session_data *sd, const int npcId, const char *name)
+{
+ if (!sd || !name)
+ return;
+
+ const int fd = sd->fd;
+ const int len = strlen (name);
+ const int sz = len + 5 + 4 + 2;
+ WFIFOHEAD (fd, sz);
+ WFIFOW (fd, 0) = 0xb06;
+ WFIFOW (fd, 2) = sz;
+ WFIFOL (fd, 4) = npcId;
+ WFIFOW (fd, 8) = len;
+ strcpy (WFIFOP (fd, 10), name);
+ WFIFOSET (fd, sz);
+}