summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-20 11:59:22 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-20 11:59:22 +0000
commit1f2c14189bc029af3045de816290d3e488ee9c32 (patch)
treee2c33cae8d15cafc81d65d42f1bd97f7c88e64c3 /src/map/clif.c
parent01f8804d4eebaae80443a1613fc3ebc92adf1de0 (diff)
downloadhercules-1f2c14189bc029af3045de816290d3e488ee9c32.tar.gz
hercules-1f2c14189bc029af3045de816290d3e488ee9c32.tar.bz2
hercules-1f2c14189bc029af3045de816290d3e488ee9c32.tar.xz
hercules-1f2c14189bc029af3045de816290d3e488ee9c32.zip
Added support for the new monster purple hp bar packet (packetver >= 20120404), make sure to toggle /monsterhp in the client to show the bar. Special Thanks to EvilPuncker and scriptor for the packet structure
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16669 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index d97959b49..9ee0a27bf 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16221,6 +16221,19 @@ void clif_snap( struct block_list *bl, short x, short y ) {
clif_send(buf,packet_len(0x8d2),bl,AREA);
}
+void clif_monster_hp_bar( struct mob_data* md, int fd ) {
+#if PACKETVER >= 20120404
+ WFIFOHEAD(fd,packet_len(0x977));
+
+ WFIFOW(fd,0) = 0x977;
+ WFIFOL(fd,2) = md->bl.id;
+ WFIFOL(fd,6) = md->status.hp;
+ WFIFOL(fd,10) = md->status.max_hp;
+
+ WFIFOSET(fd,packet_len(0x977));
+#endif
+}
+
/*==========================================
* Main client packet processing function
*------------------------------------------*/
@@ -16615,7 +16628,13 @@ static int packetdb_readdb(void)
0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ //#0x0940
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0,
+
};
struct {
void (*func)(int, struct map_session_data *);