From c3c009a7e2c3ad40048935de0d0538081cf613be Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 30 Nov 2014 18:50:08 +0300 Subject: Add script command for change npc dialog title. New script command: setnpcdialogtitle newtitle --- src/map/send.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/map/send.c') 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); +} -- cgit v1.2.3-70-g09d2