From 519deab5c846169b05b92ca9721dadccd476632f Mon Sep 17 00:00:00 2001 From: mekolat Date: Mon, 18 May 2015 10:08:22 -0400 Subject: add version check to mob walkpath --- src/map/clif.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/map/clif.cpp') diff --git a/src/map/clif.cpp b/src/map/clif.cpp index f94c316..327283a 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -825,6 +825,21 @@ void clif_mob007b(dumb_ptr md, Buffer& buf) * Packet to send server's mob walkpath data *------------------------------------------ */ +static +void clif_0225_being_move3_sub(dumb_ptr bl, const Buffer& buf) +{ + nullpo_retv(bl); + dumb_ptr sd = bl->is_player(); + + if (sd->sess != nullptr) + { + if(sd->client_version >= 3) + { + send_buffer(sd->sess, buf); + } + } +} + static int clif_0225_being_move3(dumb_ptr md) { @@ -844,7 +859,12 @@ int clif_0225_being_move3(dumb_ptr md) } Buffer buf = create_vpacket<0x0225, 14, 1>(head_225, repeat_225); - clif_send(buf, md, SendWho::AREA); + + map_foreachinarea(std::bind(clif_0225_being_move3_sub, ph::_1, buf), + md->bl_m, + md->bl_x - AREA_SIZE, md->bl_y - AREA_SIZE, + md->bl_x + AREA_SIZE, md->bl_y + AREA_SIZE, + BL::PC); return 0; } -- cgit v1.2.3-60-g2f50