summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-03-14 14:32:07 -0300
committershennetsind <ind@henn.et>2014-03-14 14:32:07 -0300
commit95892027052d6123805a16e12dbd12ec44d3b85d (patch)
tree30c50151d6273f26feeb6153a66e4bb783b4ffc2 /src/map/clif.c
parent1007d606645c16d5246761976b7648809edb8b1d (diff)
downloadhercules-95892027052d6123805a16e12dbd12ec44d3b85d.tar.gz
hercules-95892027052d6123805a16e12dbd12ec44d3b85d.tar.bz2
hercules-95892027052d6123805a16e12dbd12ec44d3b85d.tar.xz
hercules-95892027052d6123805a16e12dbd12ec44d3b85d.zip
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 <ind@henn.et>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c7
1 files changed, 7 insertions, 0 deletions
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;