summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-06 02:46:17 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-15 20:36:18 +0300
commit62e26cfe0e2e710bc469036ffb9c2b8bb0e3d225 (patch)
tree58e1429fee4eeb114e9bd13f3602b19e7bb161a9 /src/map/clif.c
parent6900b9087b83da2aa5a4ab62e8618499f7f4835f (diff)
downloadhercules-62e26cfe0e2e710bc469036ffb9c2b8bb0e3d225.tar.gz
hercules-62e26cfe0e2e710bc469036ffb9c2b8bb0e3d225.tar.bz2
hercules-62e26cfe0e2e710bc469036ffb9c2b8bb0e3d225.tar.xz
hercules-62e26cfe0e2e710bc469036ffb9c2b8bb0e3d225.zip
Update packet ZC_SPRITE_CHANGE.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 89164657d..6cc8a4977 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3476,21 +3476,15 @@ static void clif_changetraplook(struct block_list *bl, int val)
/// 01d7 <id>.L <type>.B <value>.L (ZC_SPRITE_CHANGE2)
static void clif_sendlook(struct block_list *bl, int id, int type, int val, int val2, enum send_target target)
{
- unsigned char buf[32];
-#if PACKETVER < 4
- WBUFW(buf,0)=0xc3;
- WBUFL(buf,2)=id;
- WBUFB(buf,6)=type;
- WBUFB(buf,7)=val;
- clif->send(buf,packet_len(0xc3),bl,target);
-#else
- WBUFW(buf,0)=0x1d7;
- WBUFL(buf,2)=id;
- WBUFB(buf,6)=type;
- WBUFW(buf,7)=val;
- WBUFW(buf,9)=val2;
- clif->send(buf,packet_len(0x1d7),bl,target);
+ struct PACKET_ZC_SPRITE_CHANGE p;
+ p.packetType = sendLookType;
+ p.AID = id;
+ p.type = type;
+ p.val = val;
+#if PACKETVER >= 4
+ p.val2 = val2;
#endif
+ clif->send(&p, sizeof(p), bl, target);
}
//For the stupid cloth-dye bug. Resends the given view data to the area specified by bl.