diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2013-10-16 21:01:07 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2013-10-16 21:01:07 +0800 |
commit | f943c061b5c29bf906830c8ff9e9114f00a88951 (patch) | |
tree | 3fb19a8e76d132e7d811da1b13b4b09a85f48f7d /src/map/clif.c | |
parent | d31790a2e2305fac4acb48a42a7ab2ef69830428 (diff) | |
download | hercules-f943c061b5c29bf906830c8ff9e9114f00a88951.tar.gz hercules-f943c061b5c29bf906830c8ff9e9114f00a88951.tar.bz2 hercules-f943c061b5c29bf906830c8ff9e9114f00a88951.tar.xz hercules-f943c061b5c29bf906830c8ff9e9114f00a88951.zip |
Fixed Bug#7770
-split 'item_delay.txt'.
Follow up @ 9692bc034537693d331148ae8bd15153265c6cf0
-implement PACKET_ZC_SHOWSCRIPT. Special thanks to Kyeme and super awesome Yommy.
Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 81dbc28ec..060509807 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17541,6 +17541,28 @@ void clif_partytickack(struct map_session_data* sd, bool flag) { WFIFOSET(sd->fd, packet_len(0x2c9)); } +void clif_ShowScript(struct block_list* bl, const char* message) { + char buf[256]; + int len; + nullpo_retv(bl); + + if(!message) + return; + + len = strlen(message)+1; + + if( len > sizeof(buf)-8 ) { + ShowWarning("clif_ShowScript: Truncating too long message '%s' (len=%d).\n", message, len); + len = sizeof(buf)-8; + } + + WBUFW(buf,0)=0x8b3; + WBUFW(buf,2)=len+8; + WBUFL(buf,4)=bl->id; + safestrncpy((char *) WBUFP(buf,8),message,len); + clif->send((unsigned char *) buf,WBUFW(buf,2),bl,ALL_CLIENT); +} + void clif_status_change_end(struct block_list *bl, int tid, enum send_target target, int type) { struct packet_status_change_end p; @@ -18395,6 +18417,7 @@ void clif_defaults(void) { clif->wisexin = clif_wisexin; clif->wisall = clif_wisall; clif->PMIgnoreList = clif_PMIgnoreList; + clif->ShowScript = clif_ShowScript; /* trade handling */ clif->traderequest = clif_traderequest; clif->tradestart = clif_tradestart; |