diff options
author | Haru <haru@dotalux.com> | 2020-01-12 20:29:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-12 20:29:39 +0100 |
commit | 7391e5d257587ec92b96f6ebbdc77f82072ee23d (patch) | |
tree | 16d15357ca2073eb37eca7e02d57ea149a9c65cb /src/map/unit.c | |
parent | 5ee3fcc3fc89304b8be221a9cb1406002ce0b0e3 (diff) | |
parent | e6199edca8ad4eee32b7e34318f99f365d8520db (diff) | |
download | hercules-7391e5d257587ec92b96f6ebbdc77f82072ee23d.tar.gz hercules-7391e5d257587ec92b96f6ebbdc77f82072ee23d.tar.bz2 hercules-7391e5d257587ec92b96f6ebbdc77f82072ee23d.tar.xz hercules-7391e5d257587ec92b96f6ebbdc77f82072ee23d.zip |
Merge pull request #2606 from Ridley8819/pcblocknpc
Adding PCBLOCK_NPC to setpcblock script command
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 6 |
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 |