From 95892027052d6123805a16e12dbd12ec44d3b85d Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 14 Mar 2014 14:32:07 -0300 Subject: Follow up 1007d606645c16d5246761976b7648809edb8b1d A bonus. Fixed unitwalk's non-x/y possibility, NPCs can now be set to chase players around for as long as they keep walking, which opens a number of possibilities e.g. help npc y get thru z. Signed-off-by: shennetsind --- src/map/clif.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index e72a3c204..d023455e3 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10057,6 +10057,8 @@ void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) { void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, int64 tick) { + struct block_list *target = NULL; + if (pc_isdead(sd)) { clif->clearunit_area(&sd->bl, CLR_DEAD); return; @@ -10082,6 +10084,11 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, case 0x00: // once attack case 0x07: // continuous attack + if( (target = map->id2bl(target_id)) && target->type == BL_NPC ) { + npc->click(sd,(TBL_NPC*)target); + return; + } + if( pc_cant_act(sd) || sd->sc.option&OPTION_HIDE ) return; -- cgit v1.2.3-60-g2f50