From 33dd27e7025553d3635dc06200c1189901243ede Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 29 Nov 2014 13:32:06 +0300 Subject: map: send monster info packet. For now include monster attack range. --- src/map/send.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/map/send.c') diff --git a/src/map/send.c b/src/map/send.c index f923dbb..59402ad 100644 --- a/src/map/send.c +++ b/src/map/send.c @@ -10,6 +10,7 @@ #include "../../../common/mmo.h" #include "../../../common/socket.h" #include "../../../common/strlib.h" +#include "../../../map/mob.h" #include "../../../map/pc.h" #include "map/send.h" @@ -100,3 +101,21 @@ void send_mapmask_brodcast(const int map, const int mask) WBUFL (buf, 6) = 0; clif->send(buf, 10, &bl, ALL_SAMEMAP); } + +void send_mob_info(struct block_list* bl1, struct block_list* bl2, + enum send_target target) +{ + char buf[12]; + + if (bl1->type != BL_MOB) + return; + + struct mob_data *md = (struct mob_data *)bl1; + + WBUFW (buf, 0) = 0xb03; + WBUFW (buf, 2) = 12; // len + WBUFL (buf, 4) = md->bl.id; + WBUFL (buf, 8) = md->status.rhw.range; + + clif->send(&buf, sizeof(buf), bl2, target); +} -- cgit v1.2.3-60-g2f50