diff options
Diffstat (limited to 'src/map/clif.cpp')
-rw-r--r-- | src/map/clif.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp index e3cd55f..d327286 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -807,6 +807,8 @@ void clif_mob007b(dumb_ptr<mob_data> md, Buffer& buf) fixed_7b.mob_class = md->mob_class; // snip: stuff for monsters disguised as PCs fixed_7b.tick_and_maybe_part_of_guild_emblem = gettick(); + fixed_7b.max_hp = md->stats[mob_stat::MAX_HP]; + fixed_7b.hp = md->hp; fixed_7b.pos2.x0 = md->bl_x; fixed_7b.pos2.y0 = md->bl_y; @@ -819,7 +821,33 @@ void clif_mob007b(dumb_ptr<mob_data> md, Buffer& buf) buf = create_fpacket<0x007b, 60>(fixed_7b); } +/*========================================== + * Packet to send server's mob walkpath data + *------------------------------------------ + */ +static +int clif_0225_being_move3(dumb_ptr<mob_data> md) +{ + Packet_Head<0x0225> head_225; + std::vector<Packet_Repeat<0x0225>> repeat_225; + + head_225.magic_packet_length = md->walkpath.path_len + 14; + head_225.id = md->bl_id; + head_225.speed = battle_get_speed(md); + head_225.x_position = md->bl_x; + head_225.y_position = md->bl_y; + for (int i = 0; i < md->walkpath.path_len; i++) + { + Packet_Repeat<0x0225> move_225; + move_225.move = md->walkpath.path[i]; + repeat_225.push_back(move_225); + } + + Buffer buf = create_vpacket<0x0225, 14, 1>(head_225, repeat_225); + clif_send(buf, md, SendWho::AREA); + return 0; +} /*========================================== * *------------------------------------------ @@ -901,7 +929,7 @@ int clif_spawnnpc(dumb_ptr<npc_data> nd) { nullpo_retz(nd); - if (nd->npc_class == NEGATIVE_SPECIES || nd->flag & 1 || nd->npc_class == INVISIBLE_CLASS) + if (nd->flag & 1 || nd->npc_class == INVISIBLE_CLASS) return 0; Packet_Fixed<0x007c> fixed_7c; @@ -2320,7 +2348,7 @@ void clif_getareachar_npc(dumb_ptr<map_session_data> sd, dumb_ptr<npc_data> nd) nullpo_retv(sd); nullpo_retv(nd); - if (nd->npc_class == NEGATIVE_SPECIES || nd->flag & 1 || nd->npc_class == INVISIBLE_CLASS) + if (nd->flag & 1 || nd->npc_class == INVISIBLE_CLASS) return; Buffer buf; @@ -2339,6 +2367,7 @@ int clif_movemob(dumb_ptr<mob_data> md) Buffer buf; clif_mob007b(md, buf); clif_send(buf, md, SendWho::AREA); + clif_0225_being_move3(md); return 0; } |