From 08e94d4afdc33e99787b506a9c3fb2d9fd625b32 Mon Sep 17 00:00:00 2001 From: skotlex Date: Sat, 1 Apr 2006 22:42:54 +0000 Subject: - Added function clif_changetraplook to handle changing the appearance of traps as they are triggered (rather than using clif_changelook which is meant for view_data objects) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5852 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 21c8bcbcc..f43b1afbd 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2715,6 +2715,36 @@ int clif_changelook(struct block_list *bl,int type,int val) return 0; } +//Sends a change-base-look packet required for traps as they are triggered. +void clif_changetraplook(struct block_list *bl,int val) +{ + unsigned char buf[32]; +#if PACKETVER < 4 + WBUFW(buf,0)=0xc3; + WBUFL(buf,2)=bl->id; + WBUFB(buf,6)=LOOK_BASE; + WBUFB(buf,7)=val; + clif_send(buf,packet_len_table[0xc3],bl,AREA); +#else + if (val > 255) + { + WBUFW(buf,0)=0x1d7; + WBUFL(buf,2)=bl->id; + WBUFB(buf,6)=LOOK_BASE; + WBUFW(buf,7)=val; + WBUFW(buf,9)=0; + clif_send(buf,packet_len_table[0x1d7],bl,AREA); + } else { + WBUFW(buf,0)=0xc3; + WBUFL(buf,2)=bl->id; + WBUFB(buf,6)=LOOK_BASE; + WBUFB(buf,7)=val; + clif_send(buf,packet_len_table[0xc3],bl,AREA); + } +#endif + + +} //For the stupid cloth-dye bug. Resends the given view data //to the area specified by bl. void clif_refreshlook(struct block_list *bl,int id,int type,int val,int area) -- cgit v1.2.3-70-g09d2