summaryrefslogtreecommitdiff
path: root/src/map/send.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-29 13:32:06 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-29 13:32:06 +0300
commit33dd27e7025553d3635dc06200c1189901243ede (patch)
treefaf8038ddcea8f5f634dfb5922141a66f4819e32 /src/map/send.c
parentf7557fca587fac9d7bb410dba724e2c53f3c831a (diff)
downloadplugin-33dd27e7025553d3635dc06200c1189901243ede.tar.gz
plugin-33dd27e7025553d3635dc06200c1189901243ede.tar.bz2
plugin-33dd27e7025553d3635dc06200c1189901243ede.tar.xz
plugin-33dd27e7025553d3635dc06200c1189901243ede.zip
map: send monster info packet.
For now include monster attack range.
Diffstat (limited to 'src/map/send.c')
-rw-r--r--src/map/send.c19
1 files changed, 19 insertions, 0 deletions
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);
+}