summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-08 18:29:17 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-12 01:03:20 +0300
commitfbd918a61906e6ee2edfd2e05c913e8b94414458 (patch)
treeec2203d34ab55b446be764f1f91eaa5c6ce26651 /src/map/clif.c
parent6110a96ccfca527dfd96f04fcfda5153593b0bd1 (diff)
downloadhercules-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/clif.c')
-rw-r--r--src/map/clif.c23
1 files changed, 17 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).