summaryrefslogtreecommitdiff
path: root/src/map/send.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-30 18:30:50 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-30 18:30:50 +0300
commit21ec9caab9010b3109050dd891228c191e2b0dd0 (patch)
treea2aea1f87a6e9405922b3357273fd342d41c9385 /src/map/send.c
parent5232d8fa98cbfb7a85e15b182eeb1e22d5b7376a (diff)
downloadplugin-21ec9caab9010b3109050dd891228c191e2b0dd0.tar.gz
plugin-21ec9caab9010b3109050dd891228c191e2b0dd0.tar.bz2
plugin-21ec9caab9010b3109050dd891228c191e2b0dd0.tar.xz
plugin-21ec9caab9010b3109050dd891228c191e2b0dd0.zip
Add script command for change music.
New script command: changemusic mapname, music
Diffstat (limited to 'src/map/send.c')
-rw-r--r--src/map/send.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/map/send.c b/src/map/send.c
index b3ab051..be913e0 100644
--- a/src/map/send.c
+++ b/src/map/send.c
@@ -150,3 +150,19 @@ void send_advmoving(struct unit_data* ud, struct block_list *tbl, enum send_targ
clif->send(buf, i, tbl, target);
aFree(buf);
}
+
+void send_changemusic_brodcast(const int map, const char *music)
+{
+ if (!music)
+ return;
+
+ struct block_list bl;
+ const int sz = strlen (music) + 5;
+ char buf[sz];
+
+ bl.m = map;
+ WBUFW (buf, 0) = 0xb05;
+ WBUFW (buf, 2) = sz;
+ strcpy ((char *)WBUFP (buf, 4), music);
+ clif->send (buf, sz, &bl, ALL_SAMEMAP);
+}