summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-01 22:42:54 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-01 22:42:54 +0000
commit08e94d4afdc33e99787b506a9c3fb2d9fd625b32 (patch)
tree676267fba8e5788109eff7ade47132695173af31 /src/map/clif.c
parent83be2ad0b8c0543bc7403a0cc40b5ec1545f3ec2 (diff)
downloadhercules-08e94d4afdc33e99787b506a9c3fb2d9fd625b32.tar.gz
hercules-08e94d4afdc33e99787b506a9c3fb2d9fd625b32.tar.bz2
hercules-08e94d4afdc33e99787b506a9c3fb2d9fd625b32.tar.xz
hercules-08e94d4afdc33e99787b506a9c3fb2d9fd625b32.zip
- 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
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c30
1 files changed, 30 insertions, 0 deletions
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)