summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorRidley <ridley8819@gmail.com>2020-01-08 01:21:21 +0100
committerRidley <ridley8819@gmail.com>2020-01-09 01:00:55 +0100
commite6199edca8ad4eee32b7e34318f99f365d8520db (patch)
tree7b1a6e123e80bc667530b7abaac28812035b41a0 /src/map/unit.c
parentbf99547843038bc15dc1948748d969950e866465 (diff)
downloadhercules-e6199edca8ad4eee32b7e34318f99f365d8520db.tar.gz
hercules-e6199edca8ad4eee32b7e34318f99f365d8520db.tar.bz2
hercules-e6199edca8ad4eee32b7e34318f99f365d8520db.tar.xz
hercules-e6199edca8ad4eee32b7e34318f99f365d8520db.zip
Adding PCBLOCK_NPC to setpcblock script command
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index b9176fa69..d7d95c57b 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1932,8 +1932,10 @@ static int unit_attack(struct block_list *src, int target_id, int continuous)
if (src->type == BL_PC) {
struct map_session_data *sd = BL_UCAST(BL_PC, src);
- if( target->type == BL_NPC ) { // monster npcs [Valaris]
- npc->click(sd, BL_UCAST(BL_NPC, target)); // submitted by leinsirk10 [Celest]
+ if (target->type == BL_NPC) { // monster npcs [Valaris]
+ if (sd->block_action.npc == 0) { // *pcblock script command
+ npc->click(sd, BL_UCAST(BL_NPC, target)); // submitted by leinsirk10 [Celest]
+ }
return 0;
}
if( pc_is90overweight(sd) || pc_isridingwug(sd) ) { // overweight or mounted on warg - stop attacking