diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-10-11 16:17:11 +0000 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-10-11 16:17:11 +0000 |
commit | e7ff598d02c8559661bcd39ad63e7a6d2577f3d0 (patch) | |
tree | 0fe4d1f6227a642416c0c46ab405147d2ca801d2 /src/emap/send.c | |
parent | 7fc3f47e2660ae5b88a4dcdc1c1ca2e6f41ecd9e (diff) | |
parent | 7bd8183936b5f01ef789822d1f114e85ac391d47 (diff) | |
download | plugin-e7ff598d02c8559661bcd39ad63e7a6d2577f3d0.tar.gz plugin-e7ff598d02c8559661bcd39ad63e7a6d2577f3d0.tar.bz2 plugin-e7ff598d02c8559661bcd39ad63e7a6d2577f3d0.tar.xz plugin-e7ff598d02c8559661bcd39ad63e7a6d2577f3d0.zip |
Merge branch 'jesusalva/music' into 'master'
changeplayermusic() script function
See merge request evol/evol-hercules!29
Diffstat (limited to 'src/emap/send.c')
-rw-r--r-- | src/emap/send.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/emap/send.c b/src/emap/send.c index 08c57b0..7938048 100644 --- a/src/emap/send.c +++ b/src/emap/send.c @@ -298,6 +298,24 @@ void send_advmoving(struct unit_data* ud, bool moving, struct block_list *tbl, e aFree(buf); } +void send_changemusic(int fd, const char *music) +{ + if (!music) + return; + + const int sz = (int)strlen(music) + 5; + char *buf; + + CREATE(buf, char, sz); + WBUFW (buf, 0) = 0xb05 + evolPacketOffset; + WBUFW (buf, 2) = sz; + strcpy (WBUFP (buf, 4), music); + WFIFOHEAD(fd,sz); + memcpy(WFIFOP(fd,0), buf, sz); + WFIFOSET(fd,sz); + aFree(buf); +} + void send_changemusic_brodcast(const int map, const char *music) { if (!music) |