diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-08 18:29:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-12 01:03:20 +0300 |
commit | fbd918a61906e6ee2edfd2e05c913e8b94414458 (patch) | |
tree | ec2203d34ab55b446be764f1f91eaa5c6ce26651 /src/map | |
parent | 6110a96ccfca527dfd96f04fcfda5153593b0bd1 (diff) | |
download | hercules-fbd918a61906e6ee2edfd2e05c913e8b94414458.tar.gz hercules-fbd918a61906e6ee2edfd2e05c913e8b94414458.tar.bz2 hercules-fbd918a61906e6ee2edfd2e05c913e8b94414458.tar.xz hercules-fbd918a61906e6ee2edfd2e05c913e8b94414458.zip |
Add packet id clif_heal for 20150513 (0x0a27 / ZC_RECOVERY2)
Based on 3CeaM commit:
commit f89805da42c792aa9bf4274eb5a30756c06fece7
Author: rytech16 <rytech16@cad27aaa-dce3-4a30-a00a-e4fd67c11881>
Date: Sat Apr 23 13:16:49 2016 +0000
git-svn-id: svn://svn.code.sf.net/p/v1-3ceam/code/trunk@805 cad27aaa-dce3-4a30-a00a-e4fd67c11881
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 23 | ||||
-rw-r--r-- | src/map/packets.h | 1 |
2 files changed, 18 insertions, 6 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 397d80ec3..80f32ae67 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5721,13 +5721,24 @@ void clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigned i /// 5 = HP (SP_HP) /// 7 = SP (SP_SP) /// ? = ignored -void clif_heal(int fd,int type,int val) +void clif_heal(int fd, int type, int val) { - WFIFOHEAD(fd,packet_len(0x13d)); - WFIFOW(fd,0)=0x13d; - WFIFOW(fd,2)=type; - WFIFOW(fd,4)=cap_value(val,0,INT16_MAX); - WFIFOSET(fd,packet_len(0x13d)); +#if PACKETVER < 20150513 + short cmd = 0x13d; +#else + short cmd = 0xa27; +#endif + int len = packet_len(cmd); + + WFIFOHEAD(fd, len); + WFIFOW(fd, 0) = 0x13d; + WFIFOW(fd, 2) = type; +#if PACKETVER < 20150513 + WFIFOW(fd, 4) = cap_value(val, 0, INT16_MAX); +#else + WFIFOL(fd, 4) = cap_value(val, 0, INT_MAX); +#endif + WFIFOSET(fd, len); } /// Displays resurrection effect (ZC_RESURRECTION). diff --git a/src/map/packets.h b/src/map/packets.h index f8ceb266f..5f67a048f 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -2915,6 +2915,7 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0A2E,6,clif->pDull); // TITLE packet(0x0A02,4); // ZC_DRESSROOM_OPEN packet(0x0A35,4,clif->pOneClick_ItemIdentify,2); + packet(0x0a27,8); // ZC_RECOVERY2 #endif #if PACKETVER >= 20150805 // RagexeRE |