diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-08-29 00:54:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-09-18 22:31:51 +0300 |
commit | 070256d031a01159c588fa62cd849624727e22ff (patch) | |
tree | 3b79fa9522b384c1ab69bb7084f22886ac297a63 /src/map/clif.c | |
parent | 5fd9acf126af159d6a2fef4cccc8b2ed92bc2553 (diff) | |
download | hercules-070256d031a01159c588fa62cd849624727e22ff.tar.gz hercules-070256d031a01159c588fa62cd849624727e22ff.tar.bz2 hercules-070256d031a01159c588fa62cd849624727e22ff.tar.xz hercules-070256d031a01159c588fa62cd849624727e22ff.zip |
Convert packet ZC_TALKBOX_CHATCONTENTS into struct and add new packet version
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 1c245ed43..e9d731224 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8689,14 +8689,14 @@ static void clif_emotion(struct block_list *bl, int type) /// 0191 <id>.L <contents>.80B static void clif_talkiebox(struct block_list *bl, const char *talkie) { - unsigned char buf[MESSAGE_SIZE+6]; nullpo_retv(bl); nullpo_retv(talkie); + struct PACKET_ZC_TALKBOX_CHATCONTENTS p; - WBUFW(buf,0) = 0x191; - WBUFL(buf,2) = bl->id; - safestrncpy(WBUFP(buf,6),talkie,MESSAGE_SIZE); - clif->send(buf,packet_len(0x191),bl,AREA); + p.PacketType = HEADER_ZC_TALKBOX_CHATCONTENTS; + p.aid = bl->id; + safestrncpy(&p.message[0], talkie, TALKBOX_MESSAGE_SIZE); + clif->send(&p, sizeof(struct PACKET_ZC_TALKBOX_CHATCONTENTS), bl, AREA); } /// Displays wedding effect centered on an object (ZC_CONGRATULATION). |