summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index b9176fa69..482440978 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2018 Hercules Dev Team
- * Copyright (C) Athena Dev Teams
+ * Copyright (C) 2012-2020 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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